A full-stack, developer-focused platform to Write, Run, and Master Java — all in one place. Built with React, Vite, Node.js, Express, Prisma, and Monaco Editor.
| Feature | Description |
|---|---|
| 🖥️ Live Java IDE | Monaco Editor (same as VS Code) with Java syntax highlighting. Compile & run code instantly using your local JDK. |
| 📝 Notes System | Create, edit, and organize Markdown notes by topic — inspired by Notion. |
| 📚 Learning Hub | Structured Java modules: Basics, OOP, Collections, Threads, and more. |
| 🔐 JWT Auth | Register/Login with JSON Web Tokens. Snippets and notes are saved per-user. |
| 💾 Snippet Saving | Save your favourite code snippets to the database and retrieve them anytime. |
| 🌑 Dark Mode UI | Ultra-high-contrast dark theme designed specifically for long coding sessions. |
Frontend
- ⚡ Vite + React + TypeScript
- 🎨 Tailwind CSS v3
- 🖊️ Monaco Editor (
@monaco-editor/react) - 🌐 Axios + React Router DOM
Backend
- 🟢 Node.js + Express.js (TypeScript)
- 🔐 JWT Authentication + bcryptjs
- 🗄️ Prisma ORM + SQLite (zero-config database)
Code Execution
- ☕ Local JDK — Java code is compiled and run natively on your machine using
javac+java.
JavaLearningPlatform/
├── backend/ # Node.js Express API
│ ├── prisma/
│ │ └── schema.prisma # DB schema (User, Snippet, Note, KnowledgeModule)
│ ├── src/
│ │ ├── controllers/ # Auth, Snippets, Notes, Knowledge
│ │ ├── middlewares/ # JWT Auth Middleware
│ │ ├── routes/ # API route definitions
│ │ └── index.ts # Express entry point
│ └── .env # Environment variables (not committed)
│
├── frontend/ # React + Vite Application
│ ├── src/
│ │ ├── components/
│ │ │ ├── Editor.tsx # Monaco Editor + Java Runner
│ │ │ ├── Notes.tsx # Notes creation/editing UI
│ │ │ └── LearningHub.tsx# Learning module browser
│ │ ├── App.tsx # Sidebar navigation + routing
│ │ └── index.css # Tailwind base styles
│ └── tailwind.config.js # Custom dark-mode theme
│
├── package.json # Root concurrent start script
└── memory.md # Persistent development context
- Node.js v18+
- Java JDK 11+ installed and on your
PATH
git clone https://github.com/CH-USAMA/JavaLearningPlatform-.git
cd JavaLearningPlatform-# Root concurrently runner
npm install
# Backend
cd backend && npm install && npx prisma generate && npx prisma db push
cd ..
# Frontend
cd frontend && npm install
cd ..Create a file at backend/.env:
PORT=5000
JWT_SECRET=your_secret_key_herenpm startThis starts both the backend (port 5000) and frontend (port 5173) concurrently.
Open http://localhost:5173 in your browser.
| Method | Route | Auth | Description |
|---|---|---|---|
POST |
/api/auth/register |
❌ | Register a new user |
POST |
/api/auth/login |
❌ | Login and get a JWT token |
POST |
/api/snippets/run |
❌ | Compile and run Java code |
GET |
/api/snippets |
✅ | Get all saved snippets |
POST |
/api/snippets |
✅ | Save a new snippet |
GET |
/api/notes |
✅ | Get all user notes |
POST |
/api/notes |
✅ | Create a new note |
GET |
/api/knowledge |
❌ | List all learning modules |
- JWT secrets are stored in
.env(never committed to Git) - Java code execution is sandboxed with a 10-second timeout to prevent infinite loops
- Passwords are hashed using
bcryptjs
- Full Authentication UI (Login/Register pages)
- Snippet version history
- PDF export for Notes
- AI code explanation (OpenAI integration)
- Docker-based sandbox for more secure execution
- Deploy to production (Railway + Vercel)
CH Usama — Full-Stack Developer
- GitHub: @CH-USAMA
MIT License — feel free to use, modify, and share!