How codemaestro27/teachers_preferences works
Project type and purpose
• This is a full‐stack web application (“teachers_preferences”) designed to collect and manage university instructors’ scheduling and exam preferences.
• Backend: Java + Spring Boot REST API with security (JWT), database initialization, and Excel export.
• Frontend: React.js SPA built with Vite and Tailwind CSS, served via Nginx in Docker.
• Use cases: Teacher login & preference submission; Admin login, data review, deadline management, and Excel export.
File structure
• Top‐level:
• backend/ – Spring Boot service
• frontend/ – React SPA
• docker-compose.yml – orchestration of containers
• backend/
• pom.xml – Maven dependencies
• src/main/java/com/example…
– config (DataInitializer, SecurityConfig)
– controller (AuthController, TeacherController, AdminController)
– service (AuthService, TeacherService, AdminService)
– repository (UserRepository, TeacherRepository, PreferenceRepository)
– model/DTO (User, Teacher, Preference, Role, PreferenceDto)
– security (JwtAuthFilter)
• application.properties – DB & security settings
• tests – unit & integration tests per layer
• frontend/
• package.json, vite.config.js – build & dev setup
• src/
– components (Login, Register, PreferencesForm, Dashboards)
– api.js – REST client wrapper
– data/rooms.json – static data
– App.jsx, main.jsx – entry points
• nginx.conf – reverse proxy instructions
• Dockerfile – container setup
Key insights from README
• RESTful API on port 8080; React dev server on 5173.
• PostgreSQL (production) / H2 (test) backends.
• Spring Security + JWT for auth.
• Excel export via Apache POI.
• Two roles: TEACHER and ADMIN with different UI flows.
Elements
• Labels
• “React SPA”
• “Nginx Reverse Proxy”
• “Spring Boot API”
• “PostgreSQL DB”
• “JWTAuthFilter”, “Controllers”, “Services”, “Repositories”
• From Browser → Nginx → API → DB → back
• From API → Apache POI (export flow)
• Client: light blue / rectangle
• Server components: green / blocks grouped by layer
• External libs (POI) in different shade