Skip to main content

CLWA: Co-living Management Web App

·385 words·2 mins
Hakan Ates
Author
Hakan Ates
I build full-stack applications and LLM-powered tools.
A server-side Java web application for running a co-living business, where tenants book rooms and file complaints and managers organize events. Group homework for the Web Applications course, University of Padua, A.Y. 2022-2023.

Highlights
#

  • Designed the data layer of a co-living management web app on a 7-person course team: an 8-entity ER schema implemented on a relational database.
  • Shaped the REST API design: example resources plus a table of ~27 application error codes mapped to HTTP statuses.
  • Rotated through the rest of the Java stack with the team: JSP views, servlets, and DAOs built on shared abstract base classes.

How it works
#

flowchart TD
    B[Browser] --> J[JSP pages]
    B --> R[REST resources]
    J --> S[Servlets
AbstractDatabaseServlet] S --> D[DAOs
AbstractDAO] R --> D D --> DB[("Relational DB
8 entities")]

Case Study
#

Problem. A co-living business serves two kinds of users with different needs. Tenants register with their documents and IBAN, book rooms for specific date ranges, check contract details, review their co-living, and complain to the manager. Managers create events in common spaces and keep track of tenants and complaints across the co-livings they run. The homework asked for a complete server-side design and implementation covering both roles.

Approach. We built a classic three-layer app: JSP presentation, servlet business logic, DAO data access over a relational database designed from an 8-entity ER schema. The core design decision was standardizing infrastructure in abstract base classes. Every DAO extends AbstractDAO (an abstract doAccess method, PreparedStatement access, results returned through getOutputParam) and every servlet extends AbstractDatabaseServlet, which supplies the JNDI datasource connection, so individual features never handle connection plumbing themselves. Multi-step flows got explicit staging: room booking splits into dates-plus-co-living then room choice, with warnings for overlapping reservations, and event creation splits into event details then common-space selection.

Outcome. A working server-side application with the full tenant and manager feature set, documented in a report containing the ER schema, class diagrams, and a sequence diagram for event insertion. The REST layer shipped example resources plus an error-code table of roughly 27 application codes mapped to HTTP statuses. It was a group effort where we traded parts around; my own emphasis landed on the database and the REST API design.

Links. Project report (PDF, Google Drive)

Stack
#

Java, Servlets, JSP, JDBC (PreparedStatement), JNDI datasource, relational SQL database, REST.