Skip to content

zonedoutdg/new

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codeforces Aggregator

A web application to aggregate and visualize Codeforces user data and contest statistics.

Project Structure

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.

Prerequisites

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)

Installation

  1. 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
  2. Environment Configuration

    The server requires environment variables. Create a .env file in the server/ directory:

    cd server
    touch .env

    Add the following to server/.env:

    PORT=5001
    MONGO_URI=mongodb://localhost:27017/cf_aggregator

    (Adjust MONGO_URI if your MongoDB setup is different)

Running the Application

Option 1: Run All (Recommended)

You can run both the client and server simultaneously from the root directory:

npm start

This will simultaneously start:

Option 2: Run Separately

If you prefer to run them in separate terminal windows:

1. Start Backend:

cd server
npm run dev

2. Start Frontend:

cd client
npm run dev

Troubleshooting

  • Ports in use: Ensure ports 5173 (client) and 5001 (server) are free.
  • MongoDB connection: If the server fails to connect, check if your MongoDB service is running (mongod).

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors