VibeKoding / Level 2 ยท DeveloperLevel 2 ยท Developer / Proyek: Sistem Ujian Online & Panel ManajemenProyek: Sistem Ujian Online & Panel Manajemen
VK

Proyek: Sistem Ujian Online & Panel ManajemenProyek: Sistem Ujian Online & Panel Manajemen

๐Ÿ“š Level 2 ยท DeveloperLevel 2 ยท Developer ๐ŸŒ Dual Bahasa (ID / EN) โšก VibeKoding Native

Modul praktis Level 2 VibeKoding: Proyek: Sistem Ujian Online & Panel Manajemen.Modul praktis Level 2 VibeKoding: Proyek: Sistem Ujian Online & Panel Manajemen.

OverviewOverview

This project requires you to build an online exam and management system from scratch, based on a real PRD. What makes this project special is its multi-role design โ€” students and admins see different pages and can perform different actions. You'll use Express to build the backend, implementing the complete exam business pipeline.This project requires you to build an online exam and management system from scratch, based on a real PRD. What makes this project special is its multi-role design โ€” students and admins see different pages and can perform different actions. You'll use Express to build the backend, implementing the complete exam business pipeline.

This is the comprehensive practical section of Stage 2. Multi-role permission systems are very common in real-world applications. Once you master this pattern, you'll be able to handle education, SaaS, and admin management scenarios of all kinds.This is the comprehensive practical section of Stage 2. Multi-role permission systems are very common in real-world applications. Once you master this pattern, you'll be able to handle education, SaaS, and admin management scenarios of all kinds.

PrerequisitesPrerequisites

Before starting this project, you should already be familiar with:Before starting this project, you should already be familiar with:

Learning ObjectivesLearning Objectives

After completing this project, you will be able to:After completing this project, you will be able to:

  1. Read and understand a real PRD, extracting a development task listRead and understand a real PRD, extracting a development task list
  2. Design permission control and page routing for multi-role systemsDesign permission control and page routing for multi-role systems
  3. Build a complete backend API using ExpressBuild a complete backend API using Express
  4. Implement the exam, submission, and auto-grading business pipelineImplement the exam, submission, and auto-grading business pipeline
  5. Complete end-to-end integration and deliver a demo-ready business system prototypeComplete end-to-end integration and deliver a demo-ready business system prototype
  6. Project OverviewProject Overview

    You will build an online exam and management system with three subsystems:You will build an online exam and management system with three subsystems:

    SubsystemResponsibility
    Public WebsitePlatform introduction, login entry
    Student PortalExam list, taking exams, submission, grade viewing
    Admin DashboardQuestion bank management, exam management, submission records, grade statistics

    The backend uses Express and needs to support: login auth, role permissions, exam and question bank management, submission flow with auto-grading, and grade/statistics management.The backend uses Express and needs to support: login auth, role permissions, exam and question bank management, submission flow with auto-grading, and grade/statistics management.

    ๐Ÿ’ก Tips Praktis๐Ÿ’ก Pro Tip

    The requirements document for this project is on GitHub: [View PRD](https://github.com/datawhalechina/easy-vibe/blob/main/docs/en/stage-2/assignments/exam-management-express/PRD.md)The requirements document for this project is on GitHub: [View PRD](https://github.com/datawhalechina/easy-vibe/blob/main/docs/en/stage-2/assignments/exam-management-express/PRD.md)

    { title: 'Requirements', description: 'Read PRD, define roles, pages, exam flow, and data models' },{ title: 'Requirements', description: 'Read PRD, define roles, pages, exam flow, and data models' },

    { title: 'Scaffold', description: 'Use AI to generate student and admin page skeletons' },{ title: 'Scaffold', description: 'Use AI to generate student and admin page skeletons' },

    { title: 'Backend', description: 'Connect login, exams, submission, and grading with Express' },{ title: 'Backend', description: 'Connect login, exams, submission, and grading with Express' },

    { title: 'Launch', description: 'End-to-end testing, deploy, and prepare demo' }{ title: 'Launch', description: 'End-to-end testing, deploy, and prepare demo' }

    ]" />]" />

    Part 1: Requirements AnalysisPart 1: Requirements Analysis

    1.1 Read the PRD1.1 Read the PRD

    Open the PRD document and answer these key questions:Open the PRD document and answer these key questions:

    • How many roles does the system have? What can each role do?How many roles does the system have? What can each role do?
    • Is the page list complete? What pages do the student portal and admin dashboard each have?Is the page list complete? What pages do the student portal and admin dashboard each have?
    • What question types are supported? What is the grading logic for each type?What question types are supported? What is the grading logic for each type?
    • What is the complete exam flow? (Publish โ†’ Start โ†’ Answer โ†’ Submit โ†’ Grade โ†’ View results)What is the complete exam flow? (Publish โ†’ Start โ†’ Answer โ†’ Submit โ†’ Grade โ†’ View results)
    โš ๏ธ Catatan Keamanan / Peringatanโš ๏ธ Warning / Security Note

    If the above questions don't have clear answers, don't start coding. Unclear requirements are the most common cause of rework.If the above questions don't have clear answers, don't start coding. Unclear requirements are the most common cause of rework.

    1.2 Confirm System Architecture1.2 Confirm System Architecture

    Map out the overall architecture based on the PRD:Map out the overall architecture based on the PRD:

    mermaid
    flowchart TD prd["PRD"] --> web["Public Website"] prd --> student["Student Portal"] prd --> admin["Admin Dashboard"] student --> auth["Auth"] student --> exam["Exam & Answering"] exam --> db["Database"] admin --> question["Question Bank"] admin --> submission["Submissions & Grades"] question --> db submission --> db
    

    Part 2: Project ScaffoldingPart 2: Project Scaffolding

    2.1 Generate Frontend Pages2.1 Generate Frontend Pages

    Prompt reference:Prompt reference:

    text
    Based on the current PRD, help me generate a frontend scaffold for an online exam and management system. Tech stack: - Next.js App Router - TypeScript - Tailwind CSS - shadcn/ui Page list: 1. Homepage / 2. Login page /login 3. Student exam list /student/exams 4. Student exam taking /student/exams/[id] 5. Student grades /student/history 6. Admin dashboard /admin 7. Exam management /admin/exams 8. Question bank /admin/questions 9. Submission records /admin/submissions Requirements: - Student pages should be clean, focused, and easy to answer questions on - Admin pages should use sidebar + top bar layout - Use mock data first, no real API integration - Ensure basic usability on both desktop and mobile
    

    2.2 Refine the Student Exam Page2.2 Refine the Student Exam Page

    The exam-taking page is the core of the student portal. Focus on refining it:The exam-taking page is the core of the student portal. Focus on refining it:

    text
    Continue refining the student exam-taking page. This is an exam-taking page for an online exam system, it should include: - Top bar: exam title, countdown timer, number of answered questions - Main area: question stem and options - Support three question types: single choice, true/false, short answer - Answer card on the left or top showing which questions have been answered - Confirmation dialog before submission Use mock data for interactions first, no real API. Requirements: - Clean interface, shouldn't look like a backend table page - Countdown should be prominent but not overly stressful - Include empty states and loading states
    

    2.3 Refine the Admin Dashboard2.3 Refine the Admin Dashboard

    The first version of the admin dashboard focuses on three core areas:The first version of the admin dashboard focuses on three core areas:

    • Exam Management: Create exams, set duration, manage publish statusExam Management: Create exams, set duration, manage publish status
    • Question Bank: Add questions, edit questions, filter by typeQuestion Bank: Add questions, edit questions, filter by type
    • Submission Records: View student submissions, scores, timestampsSubmission Records: View student submissions, scores, timestamps

    2.4 Verify Page Structure2.4 Verify Page Structure

    Check each item:Check each item:

    • [ ] Student and admin entry points are separate[ ] Student and admin entry points are separate
    • [ ] Login, exam list, exam-taking, and grades pages are complete[ ] Login, exam list, exam-taking, and grades pages are complete
    • [ ] Admin question bank, exam management, and submission records pages are accessible[ ] Admin question bank, exam management, and submission records pages are accessible
    • [ ] Student and admin page styles are clearly differentiated[ ] Student and admin page styles are clearly differentiated

    Stuck?Stuck?

    If you get stuck during frontend scaffolding, review these chapters:If you get stuck during frontend scaffolding, review these chapters:

    • [Database to Supabase](../../backend/database-supabase/)[Database to Supabase](../../backend/database-supabase/)
    • [Backend API Design & Development](../../backend/ai-interface-code/)[Backend API Design & Development](../../backend/ai-interface-code/)
    • [Modern Component Libraries](../../frontend/modern-component-library/)[Modern Component Libraries](../../frontend/modern-component-library/)

    Part 3: Backend DevelopmentPart 3: Backend Development

    3.1 Login & Permission Control3.1 Login & Permission Control

    text
    Treat me as a beginner and help me implement login and permission control for the online exam system. Backend: Express. Goals: 1. Both students and admins can log in 2. Login returns the user's role 3. Students can only access /student/* APIs 4. Admins can only access /admin/* APIs 5. Unauthenticated users accessing protected pages redirect to /login Requirements: - Suggest a clear directory structure - Explain what the middleware is responsible for - Don't hardcode environment variables - Explain how to verify permissions work after implementation
    

    3.2 Exam & Question Bank APIs3.2 Exam & Question Bank APIs

    Recommended implementation by module:Recommended implementation by module:

    ModuleSuggested APIs
    Exam ManagementGET /api/exams, POST /api/admin/exams, PATCH /api/admin/exams/:id
    Question BankGET /api/admin/questions, POST /api/admin/questions
    Start ExamPOST /api/submissions/start
    Submit ExamPOST /api/submissions/:id/submit
    Grade RecordsGET /api/student/history, GET /api/admin/submissions

    Prompt reference:Prompt reference:

    text
    Help me design and implement Express APIs for the online exam system. Scope: - Admin creates exams - Admin manages question bank - Students view published exams - Students start exam and create submission - Student submissions auto-grade multiple choice and true/false - Short answer questions marked as pending review - Students view their grade history - Admins view all submission records Requirements: - Clear API naming - Unified JSON response structure - Separate code into controller, service, middleware, and db layers - Explain how to test each API
    

    3.3 Grading Logic3.3 Grading Logic

    Grading logic is the core business rule of the exam system:Grading logic is the core business rule of the exam system:

    • Multiple Choice: Score if the user's answer matches the correct answerMultiple Choice: Score if the user's answer matches the correct answer
    • True/False: Can also be auto-gradedTrue/False: Can also be auto-graded
    • Short Answer: First version just saves the answer, score is null, status is reviewed = falseShort Answer: First version just saves the answer, score is null, status is reviewed = false
    ๐Ÿ’ก Tips Praktis๐Ÿ’ก Pro Tip

    If you want to add AI capabilities, you could let admins enter "topic + difficulty" and have the model generate candidate questions for manual review before adding to the bank. But this is a bonus, not required.If you want to add AI capabilities, you could let admins enter "topic + difficulty" and have the model generate candidate questions for manual review before adding to the bank. But this is a bonus, not required.

    Part 4: Integration & LaunchPart 4: Integration & Launch

    4.1 End-to-End Testing4.1 End-to-End Testing

    At minimum, verify these scenarios:At minimum, verify these scenarios:

    • Student login โ†’ View exam list โ†’ Start exam โ†’ Submit โ†’ View gradesStudent login โ†’ View exam list โ†’ Start exam โ†’ Submit โ†’ View grades
    • Admin login โ†’ Create exam โ†’ Add questions โ†’ Publish โ†’ View submission recordsAdmin login โ†’ Create exam โ†’ Add questions โ†’ Publish โ†’ View submission records

    4.2 Deployment4.2 Deployment

    • Frontend: Deploy to Vercel / ZeaburFrontend: Deploy to Vercel / Zeabur
    • Express API: Deploy to Zeabur / Railway / RenderExpress API: Deploy to Zeabur / Railway / Render
    • Database: Use Supabase Postgres or managed PostgreSQLDatabase: Use Supabase Postgres or managed PostgreSQL

    Pre-deployment checklist:Pre-deployment checklist:

    • [ ] Environment variables are complete[ ] Environment variables are complete
    • [ ] Frontend and backend API URLs are correct[ ] Frontend and backend API URLs are correct
    • [ ] Login state works in production[ ] Login state works in production
    • [ ] Admin account can actually access the dashboard[ ] Admin account can actually access the dashboard
    • [ ] README includes setup, deployment, and testing instructions[ ] README includes setup, deployment, and testing instructions

    DeliverablesDeliverables

    After completing this project, submit the following:After completing this project, submit the following:

    • [ ] Accessible live demo link[ ] Accessible live demo link
    • [ ] Source code repository link (with README)[ ] Source code repository link (with README)
    • [ ] PRD document[ ] PRD document
    • [ ] Core page screenshots (homepage, student exam list, exam-taking page, admin dashboard)[ ] Core page screenshots (homepage, student exam list, exam-taking page, admin dashboard)
    • [ ] 60-second demo video (covering student exam flow and admin management flow)[ ] 60-second demo video (covering student exam flow and admin management flow)

    README should include at minimum: project overview, core page descriptions, tech stack, local setup steps, and environment variable list.README should include at minimum: project overview, core page descriptions, tech stack, local setup steps, and environment variable list.

    Grading CriteriaGrading Criteria

    DimensionBasic RequirementsAdvanced Requirements
    Page CompletenessStudent and admin main pages are accessibleUnified page style, basic mobile responsiveness
    Business LoopStudents can login, take exams, submit, and view gradesAdmins can fully create and publish exams
    Data CorrectnessSubmitted answers are saved to database, objective questions auto-gradedShort answers support manual review or AI assistance
    Permission ControlStudent and admin access boundaries are clearServer-side APIs also have role verification
    Engineering DeliveryProject runs and is deployable, README is clearHas demo video and testing instructions

    Pre-Submission ChecklistPre-Submission Checklist

    ReferencesReferences

    • [UI Design](../../frontend/ui-design/)[UI Design](../../frontend/ui-design/)
    • [Modern Component Libraries](../../frontend/modern-component-library/)[Modern Component Libraries](../../frontend/modern-component-library/)
    • [Database to Supabase](../../backend/database-supabase/)[Database to Supabase](../../backend/database-supabase/)
    • [API Code with LLM Assistance](../../backend/ai-interface-code/)[API Code with LLM Assistance](../../backend/ai-interface-code/)
    • [Git & GitHub Workflow](../../backend/git-workflow/)[Git & GitHub Workflow](../../backend/git-workflow/)
    • [Web App Deployment](../../backend/zeabur-deployment/)[Web App Deployment](../../backend/zeabur-deployment/)