Ever been stuck in a coding bug spiral or felt too shy to ask for help?
JustCode was born out of that moment β where youβre staring at your code, frustrated, and wishing there was someone (or something) to just explain whatβs going wrong. So, I built this.
π JustCode HERE !...
JustCode is a powerful, all-in-one online code editor made for developers, students, and curious minds. Itβs more than just a code runner β itβs your debugging buddy, your AI-powered teacher, and your live collaboration hub.
Built with β€οΈ using React, Node.js, MongoDB, and integrated with GPT, JustCode is designed to help you:
- Understand why a piece of code works (or doesnβt).
- Debug code with GPTβs insights.
- Share sessions and collaborate in real-time (DevZone π¬).
- Store your inputs, outputs, and even export your session as a clean PDF.
- Stay in your flow, with themes, language support, and intuitive UI.
Iβve been through those moments β the ones where you know the syntax but not the logic, or where you feel stuck even after hours of searching Stack Overflow.
JustCode is my attempt to bridge that gap.
To make code feel less isolating and more collaborative, supportive, and fun.
-
π§ AI-Powered Question Explainer
Paste a question, and get a natural language explanation powered by GPT. -
π οΈ Debug with GPT
Don't just stare at the error message β get suggestions tailored to your code. -
π» Code Editor with Input/Output
Supports multiple languages like Python, JavaScript, Java, C++, and more. -
π€ Export Everything as PDF
Download your question, code, explanation, input/output, and debug logs β all neatly formatted. -
π Theme Toggle (Dark/Light)
Because your eyes deserve love too. -
π€ DevZone β Real-Time Collaboration
Create or join rooms, share the link, and code together. No extensions, no fuss. -
π€ Profile Dashboard (No login required)
- Save and manage code snippets
- View past collaboration sessions (basic local history)
- Track usage stats (runs, visualizes, AI actions)
- Note: data is stored locally in your browser (
localStorage), so it wonβt sync across devices yet.
JustCode/
βββ client/ # Frontend (React + Vite)
β βββ src/
β β βββ components/ # React UI components
β β β βββ Challenges.jsx # Displays coding challenges, filters, contests, leaderboard
β β β βββ HomePage.jsx # Landing page component
β β β βββ CodeEditor.jsx # Main code editor with input/output
β β β βββ LiveRoom.jsx # Real-time collaboration room
β β β βββ ... # Other UI components (Navbar, Profile, etc.)
β β βββ Style/ # CSS stylesheets
β β β βββ Challenges.css # Styles for challenges page
β β β βββ HomePage.css # Styles for home page
β β β βββ ... # Other component styles
β β βββ hooks/ # Custom React hooks
β β β βββ useCollaboration.js # Hook for real-time collaboration
β β βββ services/ # Client-side services
β β β βββ localStore.js # Local storage utilities
β β βββ assets/ # Static assets (images, icons)
β β βββ __tests__/ # Unit tests for components and hooks
β βββ public/ # Public static files
β βββ index.html # Main HTML template
β
βββ server/ # Backend (Node.js + Express)
β βββ models/ # Mongoose database schemas
β β βββ Challenge.js # Challenge schema (title, difficulty, testCases, starterCode)
β β βββ User.js # User profile and authentication schema
β β βββ Submission.js # Code submission tracking schema
β β βββ Contest.js # Contest configuration schema
β β βββ ... # Other data models
β βββ services/ # Business logic and utilities
β β βββ ChallengeService.js # Code execution, test case validation, leaderboard logic
β β βββ BadgeService.js # Achievement and badge management
β β βββ AnalyticsService.js # User progress and analytics
β β βββ collaboration/ # Real-time collaboration features
β β β βββ index.js # Collaboration service entry point
β β β βββ OperationalTransform.js # Operational transformation for concurrent editing
β β β βββ SessionManager.js # Manages collaboration sessions
β β βββ visualizer/ # Code execution visualization
β β βββ index.js # Visualizer service
β β βββ parsers/ # Language-specific code parsers
β β βββ javascript.js # JavaScript code visualization
β β βββ python.js # Python code visualization
β β βββ ... # Other language parsers
β βββ routes/ # API route handlers
β β βββ challenges.js # Challenge CRUD and submission endpoints
β β βββ codeQuality.js # Code quality analysis endpoints
β β βββ progress.js # User progress tracking endpoints
β β βββ gptRoute.js # AI-powered explanation endpoints
β β βββ ... # Other API routes
β βββ middleware/ # Express middleware
β β βββ simpleRateLimiter.js # Rate limiting middleware
β βββ config/ # Configuration files
β β βββ database.js # Database connection configuration
β βββ seeds/ # Database seed data
β β βββ challenges.js # Initial challenge data
β βββ index.js # Main server entry point
β
βββ README.md # Project documentation
βββ CONTRIBUTING.md # Contribution guidelines
βββ package.json # Root package configuration
βββ .gitignore # Git ignore rules
βββ ... # Other root files (LICENSE, etc.)- Node.js (v18 or above)
- npm or yarn
- MongoDB (local or MongoDB Atlas)
git clone https://github.com/ANU-2524/JustCoding.git
cd JustCodingcp .env.example .envEdit the .env file and add your OpenAI API key. Adjust other settings if needed (e.g., MongoDB URI for Atlas).
Note: Ensure MongoDB is running locally (default: mongodb://localhost:27017/justcoding) or update MONGODB_URI for MongoDB Atlas.
cd client
npm install
npm run devFrontend will run at:
http://localhost:5173
Open a new terminal and run:
cd server
npm install
npm run devBackend will run at:
http://localhost:4334
Important: Keep both terminals running simultaneously β one for the client and one for the server.
(OR)
The easiest way to get started! Docker handles all dependencies and setup automatically.
Steps:
# Clone the repository
git clone https://github.com/ANU-2524/JustCoding.git
cd JustCoding
# Copy environment variables
cp .env.example .env
# Edit .env and add your OpenAI API key
# Start all services (MongoDB, Backend, Frontend)
docker-compose upThat's it! π
- Frontend: http://localhost:5173
- Backend: http://localhost:4334
- MongoDB: localhost:27017
For detailed Docker documentation, see DOCKER.md
| Layer | Stack |
|---|---|
| Frontend | |
| Backend | |
| Database | |
| AI | |
| Utilities |
Contributions are welcome!
Please refer to CONTRIBUTING.md for guidelines on forking, branching, committing, and submitting pull requests.
π View all contributors: https://github.com/ANU-2524/JustCoding/graphs/contributors
MIT License
JustCode is built to make learning and debugging code less intimidating and more human.
If this project helped you β even a little β that means everything π±
This section outlines the consistent response formats used across all API endpoints to ensure uniformity and simplify client-side handling.
Success responses should return the relevant data object directly, without unnecessary wrappers. This keeps responses clean and focused on the data.
Format:
{
"key": "value",
"anotherKey": {
"nested": "object"
}
}Examples:
- From
/contests/:slug/join(challenges.js):{ "participant": { "odId": "user123", "odName": "John Doe" } } - From
/explain(gptRoute.js):{ "explanation": "This is a simple explanation of the programming concept." }
All error responses use a consistent format with an error key containing a descriptive string message.
Format:
{
"error": "Descriptive error message"
}Examples:
- Validation error:
{ "error": "Missing required fields" } - Not found error:
{ "error": "Challenge not found" }
Joins a contest.
Request Body:
{
"odId": "string",
"odName": "string" (optional)
}Response:
{
"participant": {
"odId": "string",
"odName": "string"
}
}Examples:
- Successful join:
{
"participant": {
"odId": "user123",
"odName": "John Doe"
}
}- Already joined:
{
"participant": {
"odId": "user123",
"odName": "John Doe"
}
}