This repository contains the Fullstack Test for Factored. It showcases backend and frontend integration, authentication, protected routes, Dockerization, and data visualization with charts.
- Frontend: React, Vite, TailwindCSS, Chart.js
- Backend: Node.js, Express, MongoDB, Mongoose, JWT
- Containerization: Docker, Docker Compose
- Database Initialization: Custom script (
scriptdb.js)
- Clone the repository:
git clone https://github.com/your-username/Fullstack-Test-Factored.git
cd Fullstack-Test-Factored- Build and run the containers:
docker-compose up --build- Frontend: http://localhost:5173
- Backend API: http://localhost:5000/api
client/ → React frontend
server/ → Express backend
└── scriptdb.js → Seeds the DB with employee data
The backend expects a .env file in server/:
MONGO_URI=mongodb://mongo:27017/employeeDB
JWT_SECRET=your_jwt_secret
PORT=5000
In Docker, these are handled automatically. You don't need to set them manually.