99
Matheus Saleh
Back to inventory
Case study · Software Engineering#06

Funeral Management

  • Angular
  • TypeScript
  • Java
  • Spring Boot
  • PostgreSQL

My first project in the Software Engineering course and my first contact with the field. Paired with Gabriel Eduardo de Souza, we gathered the requirements of a funeral home and built the complete software: an Angular front-end, a Spring Boot REST API and a PostgreSQL database.

Timeline
February → June 2024
Context
Software Engineering course · B.Sc. in Computer Science
Authors
Matheus Saleh and Gabriel Eduardo de Souza
Scope
12 tables · 6 PDF reports · 2 HTML emails
Dashboard with cards for available caskets, plans sold, overdue plans and today's date, plus a monthly sales chart

The project

This is where I first saw the whole path of building software: understanding the business, turning conversations into requirements, modeling the data and only then writing code. The course asked us to pick a real domain and deliver a working system, and we chose the daily operations of a funeral home.

We mapped what the funeral home needed to manage: policyholders and their beneficiaries, funeral plans and overdue payments, casket stock and sales, wake rooms, death records, salespeople and partner health plans. Each need became a requirement, then a table, an endpoint and a screen.

We split the work by layer: I mainly handled the Angular front-end, and Gabriel the Spring Boot API. Agreeing on the contracts between both sides was our first real experience of teamwork on a single product.

Screenshots

From login to the dashboard, client and beneficiary records, overdue plan collection with a report and an email, and casket sales.

Access and dashboard(2)

  • Login with the funeral home's motto
  • Dashboard with indicators and a sales chart

Clients and beneficiaries(2)

  • Instant search by name, CPF or RG
  • A policyholder's beneficiaries

Overdue plan collection(2)

  • Overdue plans with calculated interest
  • PDF report (JasperReports)

Automatic emails(2)

  • Payment reminder email built with Thymeleaf
  • Deceased beneficiary email notice

Records and sales(2)

  • Client registration
  • Casket sales and monthly report

The screenshots were taken in 2026 by running the original code with the repository's sample data (data.sql). Names, CPFs and amounts are fictional. The interface is in Portuguese.

Features

Each module came from a requirement we gathered at the start of the course.

  • Clients and beneficiaries

    Policyholder records with formatted CPF and RG, instant search, sorting and pagination. Each policyholder has dependents with an additional plan fee.

  • Overdue plans with interest

    The API counts the days overdue and applies 5% compound interest per month. A R$ 2,300.75 plan overdue for 955 days shows up as R$ 10,440.89.

  • PDF reports

    Six JasperReports reports: overdue plans, beneficiaries, inactive clients, casket sales, sales per salesperson and monthly wake room usage.

  • Automatic emails

    Thymeleaf HTML templates for overdue plan reminders, with the adjusted amount, and for notifying a policyholder of a deceased beneficiary.

  • Dashboard

    Cards with available caskets and plans sold and overdue this month, plus a Chart.js sales chart.

  • Caskets and sales

    Casket stock with material, color, model and price, and each sale linking a salesperson, a casket and a client.

  • Wakes and deaths

    Wake room records, usage history and death records with room, casket, chemical preservation and cause.

  • JWT login

    Sign-up and login with ADMIN and USER roles, BCrypt passwords, a 2-hour token, a route guard and an interceptor that sends the token.

Architecture

An Angular front-end consumes the Spring Boot REST API, which stores data in PostgreSQL. The API is organized in layers inspired by Clean Architecture.

frontendAngular 17 · TypeScript · PrimeNG
  • Standalone components for each module, with one service per API resource
  • PrimeNG tables, dialogs and toasts, Bootstrap layout and a Chart.js chart
  • An AuthGuard blocks internal routes and an HttpInterceptor sends the Bearer token
  • Reports are downloaded as a Blob straight from the browser
APIJava · Spring Boot 3.3 · PostgreSQL
  • Controller → Gateway (interface) → business rule → repository, with record DTOs
  • About 60 REST endpoints secured by stateless Spring Security
  • JasperReports compiles the .jrxml templates and returns the PDF as an attachment
  • Business and validation errors become standard JSON responses via @ControllerAdvice

Technical decisions

DecisionReasonConsideration
Requirements before codeEach funeral home need became a requirement, then a table, an endpoint and a screen.More analysis time up front, in exchange for less rework at the end of the semester.
Separate front-end and back-end repositoriesEach of us could build our own layer in parallel, agreeing only on the API contract.Any contract change had to be coordinated between the two of us.
Layers behind interfaces (gateways)Business rules, like the interest calculation, stay isolated from controllers and the database.More files per resource than a plain CRUD.
Interest calculated on the back-endThe list, the PDF report and the reminder email all use the same adjusted amount.The front-end shows the final value and cannot simulate other rates.
Stateless JWT authenticationThe API keeps no session, and sensitive routes require the ADMIN role.The token lives in localStorage and expires after 2 hours, requiring a new login.
Explore the code on GitHub

What I learned

database tables
12
REST endpoints
~60
PDF reports
6

It was the first time I gathered requirements for a piece of software and watched a system go from paper to complete. I learned to break a domain into entities, agree on an API contract with someone else, and integrate a front-end, a back-end and a database. In 2026 I came back to the project to document both repositories and take these screenshots.

Project scope

  • An academic project, with no automated tests beyond Spring Boot's default test and no public deployment.
  • The interface is in Portuguese.
  • Monthly reports filter by the current month, so they only show data when there are records this month.
  • CORS only accepts http://localhost:4200, as the system was built to run locally.

See the code

Both repositories explain how to run the system locally with Docker and the sample data.

Achievement Unlocked!