Animal Care Centre
Animal shelter platform: API and desktop app

An animal shelter platform: a Spring Boot API secured with Spring Security, and a JavaFX desktop app.
- Year
- 2025
- Kind
- Backend
- Role
- Team of four: co-led, project setup, security, the JavaFX app
- Stack
- Java Language
- Spring Boot Framework
- Hibernate ORM
- MySQL Database
- Spring Security Security
- JavaFX UI
The idea
Animal Care Centre puts animal shelters and the people who want to help them in one app. Shelters register their animals with photos and answer adoption and foster requests. Users search for animals, adopt or foster one, sponsor an animal with a monthly amount or donate to a shelter. There's also a Lost & Found, where anyone can report a lost animal or one they found. Admins approve new shelters before they can log in.
It was the Programming Lab project in the first semester of my second year, built by four of us from October to December 2025, in three parts. The module had a different theme in mind. I came up with this one, the group liked it, and when we pitched it the teacher loved it.
One teammate and I led the project together: she reviewed my pull requests and I reviewed everyone else's. I set up the project, wrote the security, built the JavaFX app and its components, and wrote a large part of the API.
Three parts, one backend
The three parts grow the same app. The first ran in the terminal and saved everything to MySQL through Hibernate. In the second we split it into a Spring Boot REST API and a client that calls it, our first time doing client and server work. The third swapped that client for a JavaFX app, so we could see the same backend keep working with a new client.
Half terminal, half JavaFX
We'd used JavaFX in first year as an extra and knew the last part needed it, so we started the first part straight in JavaFX (login, creating an account, changing the password) without asking. The teacher wanted the terminal. Since those screens were already done, she let us keep them so the work wasn't wasted, and asked for the rest in the terminal.
That meant one app with two interfaces at the same time, which meant two threads. JavaFX draws the window on its own thread, and reading from the terminal blocks until you type something, so the terminal menus had to run on a second thread or the window would freeze. While a menu was open in the terminal, the window showed only a logout button, and moving between menus started new terminal threads while old ones could still be waiting for input. Both sides fought over the console's input and output, and the app crashed over and over.
The fix was a small semaphore system. Every read from the console has to take a lock on the shared Scanner first, so only one thread can read at a time, and before reading, the thread checks whether it's been told to stop. Opening a new menu interrupts the thread of the one before, which then stops quietly, and anything that changes the window goes back to the JavaFX thread through Platform.runLater.
Nobody builds a mixed app like that on purpose, so it was difficult to find the solution to the problem, as there was nothing to follow. By the end, I knew enough to explain it to the teacher. When the last part moved fully to JavaFX, the old main file stayed in the repo as legacy, all commented out.
How it's built
The API is Spring Boot, split into controllers for the HTTP endpoints, services for the rules and repositories for the database. Hibernate maps the Java classes to MySQL tables. Shelters and animals take photo uploads of up to 10 MB.
Security wasn't in the brief; I added it on my own because it's what interests me most. Logging in goes through Spring Security and keeps a session, every route except sign-up, login and password recovery needs one, and each endpoint checks the role: user, shelter or admin. Passwords and security answers are hashed with BCrypt, and a password needs 8 to 16 characters with an uppercase letter, a number and a special character. Admins need a secret code to sign up, and shelters wait for an admin's approval. It's basic to me now, but it's where it started.
For the third part, plain white screens with text fields would have met the brief. I built a small component library: buttons, text fields, cards, a paged grid, a photo carousel, popovers and a navigation bar, all in the same style. Animals, shelters and lost animals share one Displayable interface, so the same grid shows any of them. A Navigator class moves between pages, and one ApiClient class talks to the API and keeps the session cookie.
- 01Java Language
The language of both the API and the desktop app.
- 02Spring Boot Framework
The REST API: controllers, services and repositories.
- 03Hibernate ORM
Maps the Java classes to MySQL tables (and back).
- 04MySQL Database
Where everything is stored.
- 05Spring Security Security
Login sessions, BCrypt hashing and what each role is allowed to do.
- 06JavaFX UI
The desktop app, built from its own set of components.
Looking back
Almost all of this was new to me: Spring, Hibernate, REST APIs, client and server, Spring Security and threads. JavaFX wasn't, and Maven only sort of. We'd used it once in first year because my Neovim config needed it to run the project, without really knowing what a build tool was. Here I learned to use it properly.
If I did it again, I wouldn't mix JavaFX with the terminal. The project isn't over, though: there are plans to turn it into a real platform.