solvenet

SolveNet - Community Coding & Problem Solving Platform

A full-stack web application inspired by GeeksforGeeks and LeetCode, built with React.js, Node.js, Express, and MongoDB.

Features

Tech Stack

Frontend

Backend

Project Structure

SolveNet/
├── backend/
│   ├── config/
│   │   └── db.js
│   ├── controllers/
│   │   ├── userController.js
│   │   ├── problemController.js
│   │   ├── solutionController.js
│   │   └── leaderboardController.js
│   ├── middleware/
│   │   └── authMiddleware.js
│   ├── models/
│   │   ├── User.js
│   │   ├── Problem.js
│   │   ├── Solution.js
│   │   └── Vote.js
│   ├── routes/
│   │   ├── userRoutes.js
│   │   ├── problemRoutes.js
│   │   ├── solutionRoutes.js
│   │   └── leaderboardRoutes.js
│   ├── server.js
│   ├── seed.js
│   └── package.json
│
├── frontend/
│   ├── src/
│   │   ├── components/
│   │   │   ├── Navbar.jsx
│   │   │   ├── ProblemCard.jsx
│   │   │   ├── SolutionCard.jsx
│   │   │   ├── SearchBar.jsx
│   │   │   └── VoteButton.jsx
│   │   ├── pages/
│   │   │   ├── Home.jsx
│   │   │   ├── Problems.jsx
│   │   │   ├── ProblemDetail.jsx
│   │   │   ├── CreateProblem.jsx
│   │   │   ├── SubmitSolution.jsx
│   │   │   ├── Login.jsx
│   │   │   ├── Register.jsx
│   │   │   ├── Profile.jsx
│   │   │   ├── Dashboard.jsx
│   │   │   ├── Leaderboard.jsx
│   │   │   └── Archive.jsx
│   │   ├── services/
│   │   │   └── api.js
│   │   ├── styles/
│   │   ├── App.jsx
│   │   └── main.jsx
│   ├── index.html
│   ├── package.json
│   └── vite.config.js
│
└── README.md

Setup Instructions

Prerequisites

Backend Setup

# Navigate to backend directory
cd backend

# Install dependencies
npm install

# Create .env file (optional, defaults provided)
# PORT=5000
# MONGODB_URI=mongodb://localhost:27017/solvenet
# JWT_SECRET=your_secret_key

# Seed database with sample data
npm run seed

# Start server
npm start
# or for development
npm run dev

Frontend Setup

# Navigate to frontend directory
cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

The frontend will run on http://localhost:3000

Test Credentials

After seeding the database, you can login with:

API Endpoints

Authentication

Problems

Solutions

Leaderboard

Badge System

Users earn badges based on reputation:

Users gain reputation by:

Categories

Problems are organized by:

License

MIT