How santosh4568/quizzmaker works
Project type and purpose
• This is a full-stack web application (“Quiz Maker”) combining:
• A Java/Spring Boot backend with Thymeleaf server-rendered views and REST endpoints
• A modern React/Vite frontend in the frontend/ directory
• A relational database (configured via application.properties) for persisting users, questions, and results
• Purpose: Allow authenticated users (role-based) to create quizzes, take them, and view history.
File structure
• Top-level:
• pom.xml, Maven wrapper (mvnw): backend build & dependency management
• frontend/: React application (Vite, Node)
• src/main/java/com/quizz/QuizzMaker/: Spring Boot application code
• src/main/resources/templates + static: Thymeleaf HTML/CSS
• src/main/java/.../Controller, Service, Model, Repository: standard layered MVC
• Patterns and conventions:
• Layered architecture (Controller → Service → Repository → DB)
• MVC for server-side pages (Thymeleaf)
• REST API layer for React frontend (MyController.java likely exposes JSON endpoints)
Key insights from README
• Modules: Controller, Service, Model, Templates, Static resources
• Features: Authentication & RBAC, quiz creation/participation/history, responsive UI
• Tech stack: Java 11+, Spring Boot, Thymeleaf, React, Vite, Maven, Node/NPM
Main components
a. Client tier
• React/Vite SPA (frontend/)
• Browser consuming server-rendered Thymeleaf pages (optional path)
b. API & Web tier
• Spring Boot application (Application.java)
• Controllers (MyController.java, Error.java) exposing JSON & HTML views
• WebConfig for CORS/URL mappings
c. Service layer
• UserService, QuestionService, ResultService (business logic)
d. Data access layer
• Spring Data Repositories (UserRepo, QuestionRepo, ResultRepo)
• JPA Entities (User, Question, Result)
e. Database
• External RDBMS (configured via application.properties)
f. Static assets
• CSS/JS under src/main/resources/static
g. Build & deployment tools
• Maven (backend), Node/NPM & Vite (frontend)
Relationships & interactions
• React SPA → HTTP/HTTPS → Spring Boot REST endpoints → Service layer → Repository → Database
• Browser → Spring Boot MVC controllers → Thymeleaf templates → HTML/CSS → Browser
• All Controllers delegate authentication/authorization to Spring Security (implied by RBAC)
• Build pipelines:
• mvn clean install produces jar
• npm run build (in frontend) produces static bundle, which can be served from Spring Boot or CDN
Architectural patterns & principles
• Layered Architecture (Presentation → Business → Data)
• MVC for server-rendered views
• Client-Server separation: SPA vs REST API
• Dependency Injection (Spring IoC)
• Repository pattern (Spring Data JPA)
Essential elements to capture
• All Controllers (entry points)
• Service classes (business rules)
• Repositories & Entities (data model)
• Frontend (React) vs Thymeleaf templates
• External database
• Build & deployment steps