Skip to content

vallabhalabs/JustCoding

Β 
Β 

Repository files navigation

🧠 JustCode β€” Where Code Meets Clarity

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.


πŸ”— Live Demo

🌐 JustCode HERE !...


πŸš€ What is JustCode?

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.

✨ Why I Made This

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.


🌟 Features That Matter

  • 🧠 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.

πŸ“ Folder Structure

JustCode/
β”œβ”€β”€ client/ # Frontend (React + Vite)
β”‚ β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ public/
β”‚ └── index.html
β”‚
β”œβ”€β”€ server/ # Backend (Node + Express)
β”‚
β”œβ”€β”€ README.md
β”œβ”€β”€ CONTRIBUTING.md
└── .gitignore

πŸ› οΈ How to Run Locally

Prerequisites

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

1️⃣ Clone the Repository

git clone https://github.com/your-username/JustCoding.git

cd JustCoding

2️⃣ Run the Frontend (Client)

cd client
npm install
npm run dev

Frontend will run at: http://localhost:5173

3️⃣ Run the Backend (Server) Open a new terminal and run:

cd server
npm install
npm run dev

Backend will run at: http://localhost:4334

Important: You must keep two terminals running at the same time β€” one for the client and one for the server.


πŸ§ͺ Tech Stack (Because we love this stuff)

Layer Stack
Frontend
Backend
Database
AI
Utilities

🀝 Contributing

Contributions are welcome!
Please refer to CONTRIBUTING.md for guidelines on forking, branching, committing, and submitting pull requests.


❀️ Our Contributors

Contributors

πŸ‘‰ View all contributors: https://github.com/ANU-2524/JustCoding/graphs/contributors

πŸ“„ License

MIT License


πŸ’™ Final Note

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 🌱


πŸ—οΈ API Standards

This section outlines the consistent response formats used across all API endpoints to ensure uniformity and simplify client-side handling.

Success Responses

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."
    }

Error Responses

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"
    }

Inconsistent Routes (To Be Updated)

Some routes currently use a wrapper format for success responses ({ success: true, data: object }). These should be updated to return data directly for consistency:

  • progress.js: Routes like /dashboard/:userId, /event, /leaderboard, /export/:userId
  • codeQuality.js: Route /analyze

Current inconsistent format:

{
  "success": true,
  "data": {
    "key": "value"
  }
}

Should be changed to:

{
  "key": "value"
}

πŸ“š API Reference

POST /contests/:slug/join

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"
  }
}

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 67.0%
  • CSS 32.1%
  • HTML 0.9%