This README explains how to install, run and build the application locally, and how to run it with Docker.Currently, two official plugins are available:
Prerequisites- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
-
@vitejs/plugin-react-swc uses SWC for Fast Refresh
-
Node.js (recommended versions: 16.x or 18.x)
-
npm (or yarn / pnpm) — examples below use
npm## React Compiler -
Git (for cloning the repository)
-
(Optional) Docker & Docker Compose — if you want to run the app in a containerThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
cd app_front-end- Install dependencies:
npm install
# or with yarn: yarn
# or with pnpm: pnpm install- Start the development server (Vite):
npm run devBy default Vite serves the app at http://localhost:5173 (or another free port if 5173 is in use).
npm run dev— start development server with HMRnpm run build— build the app for production (output indist)npm run preview— serve the production build locally (if configured)npm run lint— run ESLint (if configured)
Check package.json for the exact scripts available in this project.
- Create a production build:
npm run build- Build output will be written to
app_front-end/dist.
Serve that folder with any static server (nginx, serve, Surge, etc.). This project includes an nginx.conf and a Dockerfile to help deploy the build.
There is a Dockerfile and a docker-compose.yaml at the repository root. Minimal examples to build and run the image:
# Build the Docker image from the repository root
docker build -t trocskillhub-frontend .
# Or use docker compose (from the repository root)
docker compose up --build