Z-Code — Automated Assessment Platform
Z-Code is a MERN-stack web application designed to streamline programming assessments.
It provides contest-style workflows, automated grading pipelines, and structured practice arenas that deliver fast, fair, and consistent feedback while reducing instructor overhead.
🚀 Inspiration
Manual grading in programming courses is:
- Slow
- Inconsistent
- Hard to scale
Z-Code was conceived to solve these pain points with:
- Automated test-case evaluation
- Real-time leaderboards
- Practice & contest environments
The goal: fair, fast grading with actionable feedback that accelerates learning outcomes.
📚 What We Learned
- Full-stack orchestration (MERN): Mapping MongoDB schemas & Express routes cleanly to React views for Admin, Lecturer, and Student roles.
- Authentication patterns: Blending JWT sessions with Google OAuth, handling token lifecycles and secret storage.
- Grading pipelines: Test-case–driven evaluation for deterministic I/O validation.
- Operational concerns: Email delivery, Cloudinary asset storage, strict secret segregation (
.env,.gitignore). - Learning UX: Dashboards, leaderboards, and filters that support motivation & iteration.
🛠️ How It Was Built
🔧 Stack & Structure
Backend (Node.js + Express)
- Organized into:
config/,controllers/,routes/,models/,middleware/ - Controllers expose endpoints for contests, questions, users, and grading
- Middleware centralizes authentication and role-based access control
- Organized into:
Database (MongoDB)
- Schemas for users, questions, contests, submissions, and results
- Efficient lookups for contest states & role-based visibility rules
- Schemas for users, questions, contests, submissions, and results
Frontend (React + Vite)
- Organized into:
components/,contexts/,hooks/,sections/,store/,pages/ - Pages cover: dashboards, contests (available/completed), practice, profile management
- Real-time feedback via toasts and leaderboard views
- Organized into:
🔗 Key Integrations
- Google OAuth — one-click sign-up/sign-in
- Email Notifications — transactional messaging for key events
- Cloudinary — avatar & asset storage
🧑💻 Developer Workflow
Clone the repository:
https://github.com/CodeCraftITSolutions/Z-Code.git cd z-codeInstall server dependencies:
cd server npm installInstall client dependencies:
cd ../client npm install
Configuration
Create a
.envfile in theserverdirectory and complete the following:PORT=4000 MONGO_URI="" ACCESS_TOKEN="" OAUTH_REFRESH_TOKEN="" OAUTH_CLIENT_SECRET="" OAUTH_CLIENTID="" MAIL_PASSWORD="" MAIL_USERNAME="" CLOUD_NAME="" CLOUD_KEY="" CLOUD_KEY_SECRET=""Create a cludinary api key and complete above .env for last three variables
Running the Application
Start the backend server:
cd server npm run devStart the frontend server:
cd ../client npm run devOpen your browser and go to
http://localhost:5173to see the application running.
⚡ Challenges & Resolutions
Role Separation & Permissions
✅ Centralized authorization middleware with explicit capability checks
Secret Management
✅ Strict .env usage and .gitignore enforcement
Deterministic Automated Grading
✅ Pure input/output test cases (no side effects)
Contest Modeling at Scale
✅ Indexed fields & denormalized results collection for fast leaderboard reads
Immediate Feedback Loops
✅ Instant UI notifications + Completed Contests dashboard
🌍 Impact
- Instructors → Predictable workflows, easier contest creation, less grading overhead
- Students → Consistent, fast, actionable feedback that boosts learning
- Admins → Clear oversight and smooth scaling
🔮 Next Steps
- Sandboxed execution for additional languages
- Rubric-based partial credit & code-quality metrics (complexity, linting)
- Analytics dashboards → question difficulty & failure patterns
Built With
- cloudinary
- express.js
- firebase
- mongodb
- node.js
- piston
- react
- tailwindcss


Log in or sign up for Devpost to join the conversation.