This is a minimal full‑stack scaffold: React (Vite) frontend, Node.js/Express API, MySQL via Sequelize, JWT auth.
- Start DB and API
docker-compose up -d-
API runs at http://localhost:4000. Seeded admin user:
- email: admin@example.com
- password: admin123
-
Start frontend
cd client
npm install
npm run devOpen http://localhost:5173 and login with the seeded admin.
- Start MySQL locally and create
ems_db. - Create
server/.env(see variables indocker-compose.yml). - Run API:
cd server
npm install
npm run dev- Run frontend as above.
- POST /api/auth/login
- POST /api/auth/register
- GET /api/employees (auth)
- POST /api/employees (admin/manager)
- GET /api/employees/:id (auth)
- PUT /api/employees/:id (admin/manager)
- DELETE /api/employees/:id (admin)
- JWT is returned on login; frontend stores it in localStorage.
- Sequelize syncs models automatically on boot.