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
  • Database (MongoDB)

    • Schemas for users, questions, contests, submissions, and results
    • Efficient lookups for contest states & role-based visibility rules
  • 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

🔗 Key Integrations

  • Google OAuth — one-click sign-up/sign-in
  • Email Notifications — transactional messaging for key events
  • Cloudinary — avatar & asset storage

🧑‍💻 Developer Workflow

  1. Clone the repository:

    https://github.com/CodeCraftITSolutions/Z-Code.git
    cd z-code
    
  2. Install server dependencies:

    cd server
    npm install
    
  3. Install client dependencies:

    cd ../client
    npm install
    

Configuration

  1. Create a .env file in the server directory 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=""
    
  2. Create a cludinary api key and complete above .env for last three variables

Running the Application

  1. Start the backend server:

    cd server
    npm run dev
    
  2. Start the frontend server:

    cd ../client
    npm run dev
    
  3. Open your browser and go to http://localhost:5173 to 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
Share this project:

Updates