CEMS is a robust, 3-tier enterprise application designed to streamline the proposal, approval, and registration of academic and extracurricular events across a university campus.
CEMS utilizes a strict 3-Tier architecture to prevent direct client-to-database communication:
- Presentation Layer (Client): A lightweight Java Swing desktop application. Features asynchronous network handling (
SwingWorker) for non-blocking UI and loading states. - Application Layer (API): A Spring Boot RESTful API. Acts as the secure middleman, handling all business logic, validation, transaction rollbacks, and database routing.
- Data Layer (Database): A TiDB / MySQL relational database structured in 3NF, enforcing data integrity via strict Foreign Key constraints.
- Role-Based Access Control (RBAC): Dedicated portals and permissions for Students, Organizers, and Administrators.
- Event Lifecycle Management: Organizers propose events, Admins approve/reject them, and Students browse and register for active events.
- Smart Capacity Tracking: Real-time venue capacity validation prevents overbooking during student registration.
- Dynamic Timeline Math: The API dynamically calculates whether an event is "Upcoming", "Ongoing", or "Completed" based on real-time server dates.
- Zero-Trust Client: The desktop application contains zero SQL queries and zero database credentials, relying entirely on HTTP requests to the REST API.
Because CEMS is a distributed application, you will need to run both the API and the Client.
- Clone the repository and open the
cems-apifolder in your IDE. - Update the
application.propertiesfile with your TiDB/MySQL database credentials. - Run
ApiApplication.javato start the embedded Tomcat server onlocalhost:8080.
- Open the
cems-clientfolder in your IDE. - Navigate to
src/utils/HttpUtils.java. - Ensure the
BASE_URLis pointing to your API (e.g.,http://localhost:8080/apifor local testing, or your Render URL for production). - Compile and run the application.
By default, this API is configured for a public portfolio/demo environment. To prevent database clutter from test users, a Spring Boot @Scheduled cron job runs at exactly 00:00:00 every night.
This job performs a "Scorched Earth" total wipe of all events, venues, departments, and user accounts (except permanent Administrators) while safely respecting Foreign Key constraints.
- Open
src/main/java/com/cems/api/ApiApplication.java. - Remove the
@EnableSchedulingannotation from the top of the class. - (Optional) Delete the
DatabaseCleanupService.javafile entirely from theservicespackage.
- Security Upgrade: Deprecated legacy DAO architecture. Removed
mysql-connector-javafrom the client. - Network Handling: Implemented
HttpUtilsfor standard REST communication (GET, POST, PUT, DELETE). - UI/UX Enhancement: Wrapped all HTTP calls in
SwingWorkerthreads to prevent UI freezing during network latency. - Bug Fix (Ghost Sessions): Synchronized client session IDs with database auto-generated IDs by chaining asynchronous login requests immediately after successful account creation.