Java backend / Interview exercise
Employee Management API
A focused Spring API with clear boundaries between HTTP, logic, and data.
- 01Controller
- 02Service
- 03Data access
- 04PostgreSQL
The problem
Store, update, retrieve, and paginate employee records through an authenticated API.
Requirements
CRUD over employee records, authenticated access, paginated reads, and documented endpoints — scoped deliberately small.
System & architecture
Controllers route requests to services and data-access objects. DTOs, validation, JPA entities, security configuration, and exception handling have separate responsibilities.
Engineering decisions
Use a layered Spring application for a bounded CRUD problem. A single relational database keeps persistence straightforward; pagination avoids returning the entire collection in one response.
Boundaries & trade-offs
This repository is an interview exercise. Its documented Basic Authentication and example credentials are development choices, not a production identity design. No deployment scale or employer ownership is implied.
Evidence to inspect
Public documentation explains the package boundaries, PostgreSQL setup, secured access, and OpenAPI dependencies.
Lessons learned
A bounded problem is the right place to be strict about layering. Keeping controllers free of persistence concerns cost nothing here and is the habit that pays off on larger domains.
Constraints
Built as an interview exercise against a fixed brief and a short timebox, which set the scope deliberately narrow: one entity, one database, no infrastructure beyond what the task required.
Security
Endpoints are authenticated, but the Basic Authentication and example credentials in the repository are development conveniences and not a production identity design. A real deployment needs token-based authentication, hashed credentials in a datastore, and secrets supplied by the environment.
What I would improve
Replace Basic Auth with token-based authentication, add integration tests that exercise the data layer rather than mocking it, and support filtering and sorting alongside pagination.
Source: public repository README, reviewed September 2026. Repository tests and deployment claims have not been independently audited here.