How himadri-das-10/cs works
Purpose and Entry Points
This is a Java desktop application for managing students and generating seating/allotment arrangements. The executable entry point is src/main/java/Main/Main.java; application bootstrapping and backend initialization are represented by src/main/java/Backend/Backend.java. The UI is JavaFX-style, backed by FXML views and controllers.
UI Navigation and Screens
Screen lifecycle and navigation are centralized in src/main/java/SceneManager/SceneManager.java. Primary screens are implemented by controllers src/main/java/Controller/Home.java, src/main/java/Controller/MainPage.java, and src/main/java/Controller/Otp.java, corresponding to src/main/resources/FXMLfiles/home.fxml, src/main/resources/FXMLfiles/mainpage.fxml, and src/main/resources/FXMLfiles/otp.fxml. Student presentation is separated into reusable card UI via src/main/resources/FXMLfiles/studentCard.fxml and src/main/java/UI_Element/Cards.java.
Authentication / OTP Boundary
The OTP flow is a distinct application boundary: src/main/java/Controller/Otp.java manages the verification screen, while src/main/java/EMAIL/Email.java sends messages and src/main/java/EMAIL/EmailConfig.java holds email integration configuration. This makes SMTP/email delivery an external runtime dependency, though provider details are not present in the repository tree.
Persistence and Backend Access
src/main/java/Backend/Database.java is the persistence boundary and should own database connectivity and CRUD behavior. UI controllers and feature workflows should communicate through src/main/java/Backend/Backend.java rather than embedding storage concerns in views. The repository does not expose schema, migration, or deployment files, so the database engine and hosting model cannot be determined.
Student Domain and Input Semantics
src/main/java/Features/Student.java is the core student record used by search, display, and allocation workflows. Domain choices are modeled as enums: src/main/java/Enums/ClassLevel.java, src/main/java/Enums/Division.java, src/main/java/Enums/SeatingPreference.java, with conversion support in src/main/java/Enums/EnumMapper.java. Validation is isolated in src/main/java/Validation/Validation.java, forming the input boundary before records reach database or arrangement logic.
Arrangement Pipeline
Seating/allotment logic is organized around strategy selection. src/main/java/Features/AllotStudents.java orchestrates allocation using src/main/java/Features/StudentArrangementStrategy.java; concrete policies include src/main/java/Features/AlphabeticalSortStrategy.java, src/main/java/Features/RandomShuffleStrategy.java, and src/main/java/Features/GenderPartitionStrategy.java. This supports adding allocation policies without changing the main UI or student model.
Search, Export, and Background Work
src/main/java/Features/SearchStudents.java provides the student retrieval/filtering feature used by the main workflow. Generated arrangements can be exported through src/main/java/Features/PdfExport.java, creating a document-generation boundary likely dependent on a PDF library. src/main/java/Offload/SeprateTask.java indicates potentially expensive work—such as database access, allocation, export, or email—is intended to run outside the JavaFX UI thread.
Main entry points: Backend.java Backend Facade · SeprateTask.java Background Tasks · SceneManager.java Scene Manager · MainPage.java Main Workflow Screen
Components 22
JavaFX UI
- Scene Manager · Owns screen lifecycle and navigation.
src/main/java/SceneManager/SceneManager.java - Home Screen
src/main/java/Controller/Home.java - Main Workflow Screen
src/main/java/Controller/MainPage.java - OTP Screen
src/main/java/Controller/Otp.java - Home View
src/main/resources/FXMLfiles/home.fxml - Main View
src/main/resources/FXMLfiles/mainpage.fxml - OTP View
src/main/resources/FXMLfiles/otp.fxml - Student Cards
src/main/java/UI_Element/Cards.java - Student Card View
src/main/resources/FXMLfiles/studentCard.fxml
Application Services
- Application Entry
src/main/java/Main/Main.java - Backend Facade · Coordinates UI-facing backend operations.
src/main/java/Backend/Backend.java - Input Validation
src/main/java/Validation/Validation.java - Student Search
src/main/java/Features/SearchStudents.java - PDF Export
src/main/java/Features/PdfExport.java - Background Tasks · Moves expensive work off the JavaFX UI thread.
src/main/java/Offload/SeprateTask.java
Student Domain & Allocation
- Allotment Orchestrator
src/main/java/Features/AllotStudents.java - Arrangement Strategies · Implemented by alphabetical, random, and gender-partition policies.
src/main/java/Features/StudentArrangementStrategy.java - Student Record
src/main/java/Features/Student.java - Student Choice Enums · Class level, division, seating preference, and mapping.
src/main/java/Enums/ClassLevel.java
Persistence & External Services
- Database Access · Owns connectivity and CRUD behavior.
src/main/java/Backend/Database.java - Email Delivery · External email runtime dependency for OTP messages.
src/main/java/EMAIL/Email.java - Email Configuration
src/main/java/EMAIL/EmailConfig.java
Connections 28
- Application Entry → Backend Facade: bootstraps
- Application Entry → Scene Manager: launches UI
- Scene Manager → Home Screen: navigates
- Scene Manager → Main Workflow Screen: navigates
- Scene Manager → OTP Screen: navigates
- Home Screen → Home View: backs
- Main Workflow Screen → Main View: backs
- OTP Screen → OTP View: backs
- Main Workflow Screen → Student Cards: renders students
- Student Cards → Student Card View: backs
- Home Screen → Backend Facade: uses
- Main Workflow Screen → Backend Facade: uses
- OTP Screen → Email Delivery: sends OTP
- Backend Facade → Input Validation: validates input
- Backend Facade → Student Search: retrieves students
- Backend Facade → Allotment Orchestrator: generates arrangements
- Backend Facade → PDF Export: exports arrangements
- Backend Facade → Database Access: persists data
- Student Search → Database Access: queries
- Allotment Orchestrator → Arrangement Strategies: selects policy
- Allotment Orchestrator → Student Record: arranges
- Input Validation → Student Record: accepts valid records
- Student Record → Student Choice Enums: uses choices
- Background Tasks → Database Access: offloads access
- Background Tasks → Allotment Orchestrator: offloads allocation
- Background Tasks → PDF Export: offloads export
- Background Tasks → Email Delivery: offloads delivery
- Email Delivery → Email Configuration: uses