How cfabiola25/sistema-solicitudes-academicas works
1. Overall shape
- This is a classic Java EE monolith packaged as a WAR and deployed to Apache Tomcat.
- The architecture is layered: JSP views in web/, Servlet controllers in src/java/controller, DAO/data access in src/java/dao, and domain models in src/java/model.
2. Primary business domain
- The system manages academic requests (“solicitudes académicas”) for two user groups: students and administrators.
- Core business entities include Solicitud (request), SolicitudMensaje (messages/comments on a request), Student, Admin, TipoSolicitud (request type), ProgramaAcademico, Sede, and Jornada.
3. Presentation layer
- The UI is implemented with JSP pages under web/.
- There are two main interface areas:
- web/student/* for student workflows.
- web/admin/* for administrative workflows.
- Shared UI fragments live in web/components/, such as sidebars for each role.
4. Controller layer
- Each major action is handled by a dedicated Servlet.
- Student-facing controllers include login, registration, password recovery, creating/editing/canceling requests, dashboards, profile, and request detail pages.
- Admin-facing controllers cover dashboards, request review/detail, user/student management, request types, academic programs, reports, and admin profile.
5. Request lifecycle
- The main data flow is: JSP form → Servlet validation/processing → DAO persistence/query → JSP rendering.
- Students create and manage requests through NewRequestServlet, EditRequestServlet, CancelRequestServlet, MyRequestsServlet, and RequestDetailServlet.
- Admins review and act on those requests through AdminRequestsServlet, AdminRequestDetailServlet, and the related management/reporting servlets.
6. Persistence layer
- Database access is centralized in DAO classes such as StudentDAO, AdminDAO, TipoSolicitudDAO, ProgramaAcademicoDAO, SolicitudMensajeDAO, and LookupDAO.
- DBConnection is the shared connection utility, so the app depends on a single relational database boundary rather than any ORM.
- The database schema is defined in sql/database.sql.
7. Authentication and account management
- Authentication is servlet-based, with separate login/logout flows and account recovery pages.
- RegisterServlet, ForgotPasswordServlet, and RecoverPasswordServlet suggest a self-service account lifecycle for users.
- PasswordHasher indicates passwords are stored securely via hashing rather than plain text.
8. Security and request handling infrastructure
- Utf8EncodingFilter applies a cross-cutting encoding concern to requests/responses, likely ensuring consistent UTF-8 handling across forms and JSPs.
- web/WEB-INF/web.xml is the deployment descriptor that defines servlet/filter mappings and application configuration boundaries.
9. Business logic utilities
- SLACalculator is a notable domain utility, likely used to compute request deadlines, response times, or service-level metrics for reports and dashboards.
- This implies reporting is not just CRUD; it includes derived operational data.
10. Admin vs student boundary
- The app is clearly split by role:
- Students submit and track their own requests.
- Admins manage users, request types, academic programs, and operational reports.
- Separate JSP component sidebars reinforce this role-based separation in the UI.
11. Configuration and deployment
- Database credentials are externalized via src/java/database.properties created from the example file.
- Tomcat deployment is supported through the generated WAR (dist/solicitudes-academicas.war) and web/META-INF/context.xml.
- The build is driven by Apache Ant with NetBeans project metadata present in nbproject/.
12. Where the main architecture diagram should draw boundaries
- Draw one boundary for the browser/UI layer (JSP pages and static assets).
- One for the Servlet controller layer handling role-specific workflows.
- One for the DAO/data layer talking to MySQL/MariaDB.
- Outside the app boundary, include Tomcat as the runtime container and MySQL as the persistent datastore.
Main entry points: AdminDashboardServlet.java Admin flow · solicitudes-academicas.war Tomcat · DBConnection.java DB connection · LoginServlet.java Auth flow
Components 22
Runtime & deploy
Container and external database boundary
Presentation
JSP pages and shared view fragments
- Login · Authentication and account entry pages
web/login.jsp - Student UI · Student workflows for requests and profile management
web/student - Admin UI · Administrative workflows and management screens
web/admin - Shared parts · Reusable UI fragments such as role sidebars
web/components
Controllers
Servlet entry points and workflow coordination
- Auth flow · Login, logout, registration, and password recovery
src/java/controller/LoginServlet.java - Student flow · Student dashboards and request lifecycle actions
src/java/controller/StudentDashboardServlet.java - Request flow · Create, edit, cancel, and inspect requests
src/java/controller/NewRequestServlet.java - Admin flow · Admin dashboards, reviews, and management screens
src/java/controller/AdminDashboardServlet.java - UTF-8 filter · Cross-cutting request and response encoding
src/java/filter/Utf8EncodingFilter.java
Data access
DAO layer and shared connection utilities
- Student DAO · Student and profile persistence access
src/java/dao/StudentDAO.java - Admin DAO · Admin account and management persistence access
src/java/dao/AdminDAO.java - Request DAO · Request messages and lookup persistence access
src/java/dao/SolicitudMensajeDAO.java - Lookup DAO · Reference data access for types and academic metadata
src/java/dao/LookupDAO.java - DB connection · Shared JDBC connection helper and database boundary
src/java/dao/DBConnection.java
Domain
Core entities and business utilities
- Solicitud · Core request record and lifecycle state
src/java/model/Solicitud.java - SolicitudMensaje · Comments and messages attached to requests
src/java/model/SolicitudMensaje.java - Users · Student and admin account models
src/java/model/Student.java - Catalogs · TipoSolicitud, ProgramaAcademico, Sede, and Jornada models
src/java/model/TipoSolicitud.java - SLA calculator · Derived metrics for deadlines and reports
src/java/util/SLACalculator.java
Connections 32
- Browser → Tomcat: HTTP · Users interact with the deployed WAR through the container
- Tomcat → Login: renders · Serves authentication and entry pages
- Tomcat → Student UI: renders · Serves student-facing JSPs
- Tomcat → Admin UI: renders · Serves admin-facing JSPs
- Tomcat → Shared parts: includes · JSP fragments are composed into role-specific pages
- Login → Auth flow: submit · Login and account recovery forms post to auth servlets
- Student UI → Student flow: submit · Student actions are processed by student servlets
- Student UI → Request flow: submit · Request forms and details route to request controllers
- Admin UI → Admin flow: submit · Admin screens are backed by admin servlets
- Auth flow → Student DAO: auth data · Authenticates and loads user accounts
- Auth flow → Admin DAO: auth data · Authenticates admin accounts
- Student flow → Student DAO: profile · Reads and updates student information
- Request flow → Request DAO: requests · Creates and updates requests and their messages
- Request flow → Lookup DAO: catalogs · Uses reference data for request forms
- Admin flow → Admin DAO: manage users · Admin account and user-management operations
- Admin flow → Request DAO: review · Admin request review and messaging flows
- Admin flow → Lookup DAO: manage catalogs · Maintains request types and academic catalogs
- Student DAO → DB connection: jdbc · DAO layer shares one JDBC connection utility
- Admin DAO → DB connection: jdbc · DAO layer shares one JDBC connection utility
- Request DAO → DB connection: jdbc · DAO layer shares one JDBC connection utility
- Lookup DAO → DB connection: jdbc · DAO layer shares one JDBC connection utility
- DB connection → MySQL: SQL · Persists and queries data in the relational database
- Request flow → Solicitud: maps · Request controllers operate on request entities
- Request DAO → SolicitudMensaje: maps · Persists request messages
- Student DAO → Users: maps · Student DAO works with account entities
- Admin DAO → Users: maps · Admin DAO works with account entities
- Lookup DAO → Catalogs: maps · Loads academic and request catalog entities
- Admin flow → SLA calculator: reports · Admin reporting uses SLA calculations
- Student flow → Student UI: forwards · Controllers return student JSP views
- Admin flow → Admin UI: forwards · Controllers return admin JSP views
- Auth flow → Login: forwards · Auth and recovery flows return to entry pages
- UTF-8 filter → Tomcat: applies to · Encoding filter runs cross-cutting across requests