Skip to content
ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

96 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ codeShastra

Bridging the gap between academic knowledge and real-world coding skills.

License: MIT PRs Welcome Made with React Node.js


๐Ÿ”— Project Links

Resource Link
๐ŸŒ Live Demo (Frontend) code-shastra-dncn.vercel.app
๐ŸŽจ Figma Design View Design on Figma
๐Ÿ“บ YouTube Demo Watch Demo Video
โš™๏ธ Backend API codeshastra-backend.onrender.com/api
๐Ÿ“ฎ Postman API Docs View API Documentation

๐Ÿ“Œ Problem Statement

Why do fresh graduates lack practical coding skills despite strong academic performance?

Score: 86.5 | Domain: EdTech

Companies hiring fresh graduates consistently discover that candidates possess strong theoretical knowledge and impressive academic scores โ€” yet they cannot solve basic programming problems, debug real code, or apply concepts practically.

The root cause is clear:

  • ๐Ÿ“š College curricula rely heavily on theoretical lectures with little to no hands-on coding.
  • ๐Ÿญ There are no industry-simulation labs where students work on real engineering challenges.
  • ๐ŸŒ Students graduate without real-world project experience that companies expect on day one.

๐Ÿ’ก Our Solution โ€” codeShastra

codeShastra (meaning "Code Scripture") is a full-stack EdTech platform that transforms the way students learn programming. We provide:

Feature Description
๐Ÿงช Hands-on Labs Industry-simulation coding environments with real problem sets
๐Ÿ—๏ธ Project-Based Learning End-to-end guided projects mirroring actual company workflows
๐Ÿค– AI Code Reviewer Instant feedback on code quality, logic, and best practices
๐Ÿ“Š Skill Tracker Visual dashboard tracking progress, weak areas, and improvements
๐Ÿ† Challenges & Hackathons Timed competitive programming rounds to simulate hiring tests
๐Ÿ‘จโ€๐Ÿซ Mentor Connect 1:1 sessions with industry professionals and senior developers
๐Ÿ“œ Certificates Verifiable skill certificates accepted by hiring partners

๐Ÿ—๏ธ Tech Stack

Frontend

  • React.js โ€” Component-based UI
  • Vite โ€” Lightning-fast dev server and bundler
  • React Router v6 โ€” Client-side routing
  • Axios โ€” HTTP client for API calls
  • Vanilla CSS / CSS Modules โ€” Styling (no Tailwind)

Backend

  • Node.js โ€” Runtime environment
  • Express.js โ€” REST API framework
  • MongoDB โ€” NoSQL database for users, courses, submissions
  • Mongoose โ€” ODM for MongoDB schema modeling
  • JWT โ€” Authentication and authorization
  • Bcrypt โ€” Password hashing
  • Multer โ€” File/image uploads
  • Dotenv โ€” Environment variable management

๐Ÿ“ Folder Structure

codeShastra/
โ”œโ”€โ”€ frontend/                          # React.js Client Application
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”‚   โ”œโ”€โ”€ favicon.ico
โ”‚   โ”‚   โ””โ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ assets/                    # Images, icons, fonts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ logo.svg
โ”‚   โ”‚   โ”œโ”€โ”€ components/                # Reusable UI components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Navbar/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Navbar.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Footer/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Footer.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Footer.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodeEditor/            # In-browser code editor component
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodeEditor.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ CodeEditor.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ SkillCard/             # Skill progress display card
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ SkillCard.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ SkillCard.css
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Loader/
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ Loader.jsx
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ Loader.css
โ”‚   โ”‚   โ”œโ”€โ”€ pages/                     # Route-level page components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Home/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Home.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Home.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Auth/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Login.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Register.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Auth.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard/             # Student progress dashboard
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Dashboard.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Labs/                  # Hands-on coding labs
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Labs.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ LabDetail.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Labs.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Projects/              # Guided project tracks
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Projects.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ProjectDetail.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Projects.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Challenges/            # Timed coding challenges
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Challenges.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ChallengeRoom.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Challenges.css
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Mentors/               # Mentor listing & booking
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Mentors.jsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Mentors.css
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Profile/               # User profile & certificates
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ Profile.jsx
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ Profile.css
โ”‚   โ”‚   โ”œโ”€โ”€ context/                   # React Context (global state)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AuthContext.jsx        # Authentication state
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ThemeContext.jsx       # Light/Dark theme toggle
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/                     # Custom React hooks
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ useAuth.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ useFetch.js
โ”‚   โ”‚   โ”œโ”€โ”€ services/                  # Axios API service layer
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ api.js                 # Base Axios instance
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ authService.js         # Login, Register, Logout API calls
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ labService.js          # Labs API calls
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ projectService.js      # Projects API calls
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ challengeService.js    # Challenges API calls
โ”‚   โ”‚   โ”œโ”€โ”€ utils/                     # Helper functions
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ formatDate.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ validateForm.js
โ”‚   โ”‚   โ”œโ”€โ”€ routes/                    # Route definitions
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ AppRoutes.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx                    # Root application component
โ”‚   โ”‚   โ”œโ”€โ”€ App.css                    # Global styles
โ”‚   โ”‚   โ”œโ”€โ”€ index.css                  # CSS reset & design tokens
โ”‚   โ”‚   โ””โ”€โ”€ main.jsx                   # React entry point
โ”‚   โ”œโ”€โ”€ .env                           # Frontend env variables (VITE_API_URL)
โ”‚   โ”œโ”€โ”€ vite.config.js
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ backend/                           # Node.js + Express REST API
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ db.js                  # MongoDB connection setup
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ cloudinary.js          # Cloudinary config for file uploads
โ”‚   โ”‚   โ”œโ”€โ”€ models/                    # Mongoose data models
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ User.model.js          # User schema (students, mentors)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Lab.model.js           # Coding lab schema
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Project.model.js       # Guided project schema
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Challenge.model.js     # Timed challenge schema
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Submission.model.js    # Code submission schema
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Certificate.model.js   # Certificate schema
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/               # Route handler logic (MVC)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth.controller.js     # Register, Login, Logout
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ user.controller.js     # Profile CRUD
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ lab.controller.js      # Lab management
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ project.controller.js  # Project management
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ challenge.controller.js# Challenge management
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ submission.controller.js # Code submission & evaluation
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ certificate.controller.js # Certificate generation
โ”‚   โ”‚   โ”œโ”€โ”€ routes/                    # Express route definitions
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth.routes.js         # /api/auth/*
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ user.routes.js         # /api/users/*
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ lab.routes.js          # /api/labs/*
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ project.routes.js      # /api/projects/*
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ challenge.routes.js    # /api/challenges/*
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ submission.routes.js   # /api/submissions/*
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ certificate.routes.js  # /api/certificates/*
โ”‚   โ”‚   โ”œโ”€โ”€ middlewares/               # Express middleware
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth.middleware.js     # JWT verification
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ role.middleware.js     # Role-based access (student/mentor/admin)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ validate.middleware.js # Request body validation
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ error.middleware.js    # Global error handler
โ”‚   โ”‚   โ””โ”€โ”€ utils/                     # Backend utility helpers
โ”‚   โ”‚       โ”œโ”€โ”€ generateToken.js       # JWT token creation
โ”‚   โ”‚       โ”œโ”€โ”€ hashPassword.js        # Bcrypt helpers
โ”‚   โ”‚       โ””โ”€โ”€ apiResponse.js         # Standardized API response format
โ”‚   โ”œโ”€โ”€ app.js                         # Express app setup & middleware
โ”‚   โ”œโ”€โ”€ server.js                      # Server entry point (port listener)
โ”‚   โ”œโ”€โ”€ .env                           # Backend env variables
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ README.md                          # โ† You are here

๐Ÿ”Œ API Endpoints Overview

Method Endpoint Description
POST /api/auth/register Register a new user
POST /api/auth/login Login and receive JWT
GET /api/users/profile Get logged-in user profile
PUT /api/users/profile Update user profile
GET /api/labs List all coding labs
GET /api/labs/:id Get a specific lab
GET /api/projects List all guided projects
GET /api/challenges List all challenges
POST /api/submissions Submit code for evaluation
GET /api/certificates/:userId Get user's certificates

โš™๏ธ Getting Started

Prerequisites

  • Node.js v18+
  • MongoDB (local or Atlas)
  • npm or yarn

1. Clone the Repository

git clone https://github.com/Prathvikmehra/codeShastra.git
cd codeShastra

2. Setup Backend

cd backend
npm install
cp .env.example .env      # Add your MongoDB URI, JWT_SECRET, etc.
npm run dev

3. Setup Frontend

cd frontend
npm install
cp .env.example .env      # Add VITE_API_URL=http://localhost:5000
npm run dev

The frontend will run on http://localhost:5173 and the backend on http://localhost:5000.


๐ŸŒ Environment Variables

Backend .env

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_super_secret_key
JWT_EXPIRES_IN=7d
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

Frontend .env

VITE_API_URL=http://localhost:5000

๐Ÿ—บ๏ธ Roadmap

  • Project initialization & README
  • Backend: Auth system (Register/Login/JWT)
  • Backend: Labs, Projects & Challenges CRUD
  • Backend: Code submission & evaluation engine
  • Frontend: Landing page & authentication flow
  • Frontend: Student dashboard with skill tracker
  • Frontend: In-browser code editor (Monaco Editor)
  • Frontend: Challenges & timed coding room
  • Frontend: Mentor connect & booking
  • Certificate generation system
  • Admin panel for content management
  • Deployment (Frontend: Vercel | Backend: Render)

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/your-feature-name
  3. Commit your changes: git commit -m "feat: add your feature"
  4. Push to the branch: git push origin feature/your-feature-name
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


๐Ÿ‘จโ€๐Ÿ’ป Author

Prathvik Mehra


"The best way to learn to code is to actually code." โ€” codeShastra

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages