The Contest Tracker is a full-stack web application built with TypeScript, Node.js, Express.js (backend), and React.js (frontend). It tracks programming contests across multiple platforms and allows users to bookmark contests, attach solutions, and retrieve contest details.
- User authentication with JWT.
- Fetching programming contest details from Codeforces, CodeChef, LeetCode.
- Bookmarking contests for easy access.
- Attaching solution links to past contests.
- Fetching YouTube videos related to contests.
- Caching services for optimized performance.
Ensure you have the following installed:
- Node.js (v16 or later)
- React.js with Vite
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the development server:
npm run dev
The frontend is built with React + React Router and uses TanStack React Query for data fetching.
| Route | Component | Description |
|---|---|---|
/ |
HomePage | Landing page |
/contests |
ContestsPage | List of contests |
/bookmarks |
BookmarksPage | User's bookmarked contests |
/solutions |
SolutionsPage | Solutions linked to contests |
/login |
LoginPage | User login form |
/register |
RegisterPage | User registration form |
* |
NotFoundPage | 404 Not Found |
- Uses TanStack Query (React Query) for API calls.
- Uses React Router for navigation.
- Uses ThemeProvider for light/dark mode toggle.
- Uses Redux for bookmarks and notes handles.
- Endpoint:
POST /api/auth/register - Description: Registers a new user.
- Request Body:
{ "username": "user123", "email": "user@example.com", "password": "password123" } - Response:
{ "message": "User registered successfully" }
- Endpoint:
POST /api/auth/login - Description: Logs in an existing user and returns a JWT token.
- Request Body:
{ "email": "user@example.com", "password": "password123" } - Response:
{ "token": "your_jwt_token" }
- Endpoint:
GET /api/contests - Description: Fetches upcoming and past contests from multiple platforms.
- Endpoint:
GET /api/contests/:id - Description: Fetches details of a specific contest.
- Endpoint:
POST /api/bookmarks - Description: Adds a contest to the user's bookmarks.
- Request Body:
{ "contestId": "12345" }
- Endpoint:
GET /api/bookmarks - Description: Fetches all bookmarked contests for the user.
- Endpoint:
POST /api/solutions - Description: Allows users to add a solution link for a contest.
- Request Body:
{ "contestId": "12345", "solutionUrl": "https://youtube.com/solution" }
- Endpoint:
GET /api/solutions/:contestId - Description: Fetches all solutions for a specific contest.
- The backend implements caching using Redis (or an alternative in-memory solution) to improve performance for frequently accessed contest data.
- To deploy, use a cloud service like AWS, DigitalOcean, or Vercel.
- Set up a production database and update the
.envfile accordingly. - Run the production build:
npm run build npm start
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch - Commit your changes:
git commit -m 'Add new feature' - Push to the branch:
git push origin feature-branch - Open a pull request.
This project is licensed under the MIT License.
For further assistance, feel free to reach out or create an issue in the repository.