A web application to aggregate and visualize Codeforces user data and contest statistics.
The project is divided into two main directories:
- client/: The frontend application built with React, Vite, and Tailwind CSS.
- server/: The backend API built with Express.js and MongoDB.
Before running the application, ensure you have the following installed:
- Node.js (v14 or higher)
- MongoDB (Ensure the service is running locally or you have a connection string)
-
Install All Dependencies
From the root directory, run the helper script to install dependencies for the root, client, and server:
npm run install-all
Alternatively, you can install them manually:
npm install # Root dependencies cd client && npm install # Client dependencies cd ../server && npm install # Server dependencies
-
Environment Configuration
The server requires environment variables. Create a
.envfile in theserver/directory:cd server touch .envAdd the following to
server/.env:PORT=5001 MONGO_URI=mongodb://localhost:27017/cf_aggregator
(Adjust
MONGO_URIif your MongoDB setup is different)
You can run both the client and server simultaneously from the root directory:
npm startThis will simultaneously start:
- Frontend at http://localhost:5173
- Backend API at http://localhost:5001
If you prefer to run them in separate terminal windows:
1. Start Backend:
cd server
npm run dev2. Start Frontend:
cd client
npm run dev- Ports in use: Ensure ports
5173(client) and5001(server) are free. - MongoDB connection: If the server fails to connect, check if your MongoDB service is running (
mongod).