AlgoWars is an online coding practice platform inspired by sites like LeetCode and HackerRank. Users can solve algorithmic challenges, test code against custom and hidden test cases, and improve their problem-solving skills in a battle-like interface.
- 🧠 Solve algorithmic coding challenges
- 👥 User authentication (login/register)
- 💾 Code execution with real-time feedback
- 📈 Track progress and completed problems
- 🌐 RESTful API using Express.js
- 🔐 Secure MongoDB database for storing users and problem data
| Layer | Technology |
|---|---|
| Frontend | React, CSS |
| Backend | Node.js, Express |
| Database | MongoDB |
| Auth | JWT, Bcrypt |
algowars/
├───backend/
│ └───semicolon-main/
│ ├───controllers/ # Route handlers
│ ├───middleware/ # Authentication and other middleware
│ ├───models/ # Mongoose schemas
│ ├───res/
│ │ └───images/ # Static image assets
│ ├───routes/ # API route definitions
│ └───utils/ # Utility functions
├───frontend/
│ ├───build/ # Production build output
│ ├───public/ # Public static files
│ └───src/
│ ├───components/
│ │ ├───codewindow/ # Code editor window
│ │ ├───footer/ # Footer component
│ │ ├───header/ # Header/navbar component
│ │ ├───langdrop/ # Language selector dropdown
│ │ └───themedrop/ # Theme selector dropdown
│ ├───constants/ # Constant values
│ ├───images/ # Frontend image assets
│ ├───lib/ # Libraries (e.g., code execution, API hooks)
│ ├───pages/
│ │ ├───addProblem/ # Add new problem interface
│ │ ├───editor/ # Code editor page
│ │ ├───home/ # Landing page
│ │ ├───leaderboard/ # Leaderboard UI
│ │ ├───login/ # Login page
│ │ ├───problems/ # Problems list page
│ │ ├───profile/ # User profile page
│ │ └───registration/ # Registration form
│ ├───routes/ # React Router routes
│ └───utils/ # Helper functions
git clone https://github.com/yourusername/algowars.git
cd algowarscd backend/semicolon-main
npm install or npm icd ../../frontend
npm install or npm iCreate a .env file in the backend/semicolon-main/ directory with the following:
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret_key
cd backend/semicolon-main
npm run devcd frontend
npm start- Uses JWT for secure login/session handling.
- Passwords are hashed using Bcrypt before storing.
Basic endpoints include:
POST /api/auth/register– User registrationPOST /api/auth/login– User loginGET /api/problems– Fetch all coding problemsPOST /api/submit– Submit code and receive verdict
(For a full list, see API docs in /backend/semicolon-main/docs)
- Contest mode and timed battles
- Rooms formation for contests
- Upgraded Judge0 API
Contributions are welcome! Please fork the repository and submit a pull request. For major changes, open an issue first.
This project is licensed under the MIT License - see the LICENSE file for details.