Skip to content

Latest commit

Β 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ CodeCrux β€” Competitive Programming Companion

CodeCrux, CompeCompetitive Programming Portal is a customized full-stack web application that brings together competitive programming features in a single platform. From personalized problem recommendations to daily streaks and calendar-synced contests, it integrates multiple services like Codeforces, AtCoder, LeetCode, and Clist.by into a single competitive programming hub.


Features

  • User Authentication: Secure login system to track individual user progress and preferences.
  • Contest Aggregation: Displays upcoming contests from various platforms (Codeforces, AtCoder, LeetCode, CodeChef, GeeksForGeeks) using APIs like Clist.by.
  • Google Calendar Integration: Allows users to add contest reminders directly to their Google Calendar.
  • Personalized Problem Lists: Shows unsolved problems tailored to the user.
  • Problem Search & Filtering:
    • Search by problem title or ID.
    • Filter problems by tags (e.g., dynamic programming, graphs, data structures).
    • Filter problems by difficulty level.
  • Favorites List: Users can add preferred problems and contests to a dedicated favorites list.
  • Daily Problem Streak:
    • Suggests a random problem daily to logged-in users.
    • Solving the daily problem maintains the user's streak.
    • The streak resets to 0 if the daily problem isn't solved by the end of the day.
  • Links to Original Problems: Provides direct links to problems on their respective host sites.

πŸ› οΈ Tech Stack

  • Frontend: React.js
  • Backend: Node.js, Express.js
  • Database: MongoDB with Mongoose
  • APIs:
    • Clist.by API (for contest aggregation)
    • Official APIs from Codeforces, AtCoder, LeetCode, CodeChef, GeeksForGeeks (where available)
  • Package Managers: npm or yarn

πŸ“ Folder Structure

The project is organized into two main directories: backend_ and front_end.

CP_PORTAL/
β”œβ”€β”€ backend/
β”‚ β”œβ”€β”€ controllers/
β”‚ β”‚ β”œβ”€β”€ authController.js
β”‚ β”‚ β”œβ”€β”€ contestController.js
β”‚ β”‚ β”œβ”€β”€ dailyChallengeController.js
β”‚ β”‚ β”œβ”€β”€ dashController.js
β”‚ β”‚ β”œβ”€β”€ favoritesController.js
β”‚ β”‚ β”œβ”€β”€ problemListController.js
β”‚ β”‚ β”œβ”€β”€ syncController.js
β”‚ β”œβ”€β”€ middleware/
β”‚ β”‚ β”œβ”€β”€ authMiddleware.js
β”‚ β”‚ β”œβ”€β”€ errorHandler.js
β”‚ β”œβ”€β”€ models/
β”‚ β”‚ β”œβ”€β”€ user.js
β”‚ β”‚ β”œβ”€β”€ contest.js
β”‚ β”‚ β”œβ”€β”€ dailyChallenge.js
β”‚ β”‚ β”œβ”€β”€ favorites.js
β”‚ β”‚ β”œβ”€β”€ problemList.js
β”‚ β”‚ β”œβ”€β”€ solvedProblem.js
β”‚ β”œβ”€β”€ routes/
β”‚ β”‚ β”œβ”€β”€ authRoutes.js
β”‚ β”‚ β”œβ”€β”€ contestRoutes.js
β”‚ β”‚ β”œβ”€β”€ dailyChallengeRoutes.js
β”‚ β”‚ β”œβ”€β”€ dashboardRoutes.js
β”‚ β”‚ β”œβ”€β”€ favoritesRoutes.js
β”‚ β”‚ β”œβ”€β”€ problemListRoutes.js
β”‚ β”‚ β”œβ”€β”€ syncRoutes.js
β”‚ β”œβ”€β”€ services/
β”‚ β”œβ”€β”€ scripts/
β”‚ β”œβ”€β”€ utils/
β”‚ β”œβ”€β”€ config/
β”‚ β”œβ”€β”€ server.js
β”‚ └── .env
β”‚
β”œβ”€β”€ frontend/
β”‚ β”œβ”€β”€ public/
β”‚ β”‚ └── index.html
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ api/
β”‚ β”‚ β”‚ └── apiService.js
β”‚ β”‚ β”œβ”€β”€ assets/
β”‚ β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”‚ β”œβ”€β”€ ContestCard/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ContestCard.jsx
β”‚ β”‚ β”‚ β”‚ └── ContestCard.css
β”‚ β”‚ β”‚ β”œβ”€β”€ Navbar/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ Navbar.jsx
β”‚ β”‚ β”‚ β”‚ └── Navbar.css
β”‚ β”‚ β”‚ β”œβ”€β”€ ProblemCard/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ProblemCard.jsx
β”‚ β”‚ β”‚ β”‚ └── ProblemCard.css
β”‚ β”‚ β”‚ β”œβ”€β”€ StreakCard/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ StreakCard.jsx
β”‚ β”‚ β”‚ β”‚ └── StreakCard.css
β”‚ β”‚ β”‚ └── ProtectedRoute.jsx
β”‚ β”‚ β”œβ”€β”€ context/
β”‚ β”‚ β”‚ └── AuthContext.jsx
β”‚ β”‚ β”œβ”€β”€ pages/
β”‚ β”‚ β”‚ β”œβ”€β”€ Auth/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ AuthPage.jsx
β”‚ β”‚ β”‚ β”‚ └── AuthPage.css
β”‚ β”‚ β”‚ β”œβ”€β”€ Contests/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ Contests.jsx
β”‚ β”‚ β”‚ β”‚ └── Contests.css
β”‚ β”‚ β”‚ β”œβ”€β”€ DailyChallenge/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ DailyChallenge.jsx
β”‚ β”‚ β”‚ β”‚ └── DailyChallenge.css
β”‚ β”‚ β”‚ β”œβ”€β”€ Dashboard/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ Dashboard.jsx
β”‚ β”‚ β”‚ β”‚ └── Dashboard.css
β”‚ β”‚ β”‚ β”œβ”€β”€ Favorite/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ Favorites.jsx
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ Favorites.css
β”‚ β”‚ β”‚ β”‚ └── sampleData.js
β”‚ β”‚ β”‚ β”œβ”€β”€ ProblemList/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ProblemList.jsx
β”‚ β”‚ β”‚ β”‚ └── ProblemList.css
β”‚ β”‚ β”‚ β”œβ”€β”€ Profile/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ProfilePage.jsx
β”‚ β”‚ β”‚ β”‚ └── ProfilePage.css
β”‚ β”‚ β”œβ”€β”€ styles/
β”‚ β”‚ β”‚ └── index.css
β”‚ β”‚ β”œβ”€β”€ utils/
β”‚ β”‚ β”œβ”€β”€ App.jsx
β”‚ β”‚ β”œβ”€β”€ App.css
β”‚ β”‚ └── index.jsx
β”‚ β”œβ”€β”€ .env
β”‚ β”œβ”€β”€ package.json
β”‚ └── yarn.lock

βš™οΈ Setup and Installation

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-name>
  2. Backend Setup:

    cd backend_
    npm install  # or yarn install
    # Create a .env file based on .env.example (if provided) and fill in necessary environment variables (API keys, database URI, etc.)
    npm start    # or yarn start (or npm run dev / yarn dev depending on package.json scripts)
  3. Frontend Setup:

    cd ../front_end
    npm install  # or yarn install
    # Create a .env file if needed for frontend environment variables (e.g., backend API URL)
    npm start    # or yarn start
  4. Open your browser and navigate to http://localhost:3000 (or the port specified for the frontend).

πŸš€ Usage

###🧾 User Registration & Authentication:

β€’ Users can securely register and log in to create their personalized programming workspace.

β€’ Authenticated sessions are managed using JWT tokens, ensuring secure and persistent access.

πŸ“… Real-Time Contest Tracking:

β€’ Navigate to the "Contests" section to explore upcoming contests from Codeforces, AtCoder, LeetCode, CodeChef, and GFG, aggregated using the Clist.by API.

β€’ Apply advanced filters like contest duration, platform, and start time.

β€’ One-click integration with Google Calendar lets users set personalized contest reminders.

πŸ“š Intelligent Problem Practice:

β€’ Access a curated list of unsolved problems tailored to your skill level and previous activity.

β€’ Use powerful filtering options:

β€’ By tags: e.g., dynamic programming, greedy, graph, trees.

β€’ By difficulty level, platform, or problem status (solved/unsolved).

β€’ By title keyword or problem ID.

πŸ”₯ Daily Challenge with Streak System:

β€’ Receive a daily problem based on your performance and tag preferences.

β€’ Track your daily streak visually on the dashboard.

β€’ Failure to solve the daily problem by midnight resets the streak.

βœ… Problem Status & Progress Tracker:

β€’ The portal maintains a history of all solved and attempted problems.

β€’ Users can revisit:

β€’ All solved problems.

β€’ Unsolved or skipped problems.

β€’ Favorite problems they marked for later.

❀️ Favorites System:

β€’ Bookmark problems or contests to revisit later.

β€’ Favorites are stored per user and displayed on the dashboard for quick access.

πŸ“Š Dashboard & User Analytics:

β€’ View your current streak, problem-solving stats, and platform usage breakdown.

β€’ Monitor your growth over time with a progress indicator.

πŸ” User Profile & Data Persistence:

β€’ Each user’s data (solved problems, streaks, favorites, preferences) is securely stored and persists across sessions.

β€’ Users can update profile information and view all interactions in one centralized profile view.

🌐 APIs Used

  • Clist.by: For aggregating contest information from multiple platforms.
  • Platform Specific APIs: (e.g., Codeforces API, etc.) for fetching problem details, user-specific data if available and permissible.

Project Overview

Login

Login

SignUp

SignUp

Dashboard

Dashboard

Daily Problem

Daily Problem

Completing Daily Challenge

Completing Daily Challenge

Updated Dashboard

Updated Dashboard

Problem List

Problem List

Filters

Filters

After Applying Filters

After Applying Filters

Marking as solved and adding to favorites

Marking as solved and adding to favorites

Contests

Contests

favorites

favorites

Adding to google Calender

 Adding to google Calender

Adding to google Calender

 Adding to google Calender

User

User

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages