A Spring Boot REST service that manages employee accounts, payroll, and role-based access control for the ACME corporation. The service is built incrementally through multiple Hyperskill stages, starting with user registration and evolving to include authentication, authorization, and audit logging.
| Layer | Technology |
|---|---|
| Language | Java 17+ |
| Framework | Spring Boot 3.5.9 |
| Validation | Jakarta Bean Validation (Hibernate 8.x) |
| Database | H2 (in-memory/file) |
| Build | Gradle (Hyperskill wrapper) |
| Testing | Hyperskill hs-test framework |
./gradlew :Account_Service__Java_-task:bootRunThe server starts on port 28852. H2 console (when configured) is available at http://localhost:28852/h2-console.
| Method | URL | Auth Required | Description |
|---|---|---|---|
| POST | /api/auth/signup |
No | Register a new user |
| POST | /api/auth/changepass |
Basic Auth | Change the authenticated user's password |
| GET | /api/empl/payment |
Basic Auth | Get the authenticated user's profile |
More endpoints will be added in subsequent stages.
Request:
{
"name": "John",
"lastname": "Doe",
"email": "johndoe@acme.com",
"password": "secret"
}Response 200 OK:
{
"id": 1,
"name": "John",
"lastname": "Doe",
"email": "johndoe@acme.com"
}Response 400 — any field blank/null, wrong email domain, or duplicate email ("User exist!").
Request:
{ "new_password": "bZPGqH7fTJWW" }Response 200 OK:
{
"email": "johndoe@acme.com",
"status": "The password has been updated successfully"
}Response 400 — password < 12 chars, in the breached list, or same as current.
Response 200 OK:
{
"id": 1,
"name": "John",
"lastname": "Doe",
"email": "johndoe@acme.com"
}| Field | Rule |
|---|---|
name |
Must not be blank |
lastname |
Must not be blank |
email |
Must not be blank; must match *@acme.com (any case) |
password |
Must not be blank |
email |
Must be unique (case-insensitive); returns "User exist!" |
| Field | Rule |
|---|---|
new_password |
≥ 12 characters |
new_password |
Must not be in the 12 breached PasswordFor* passwords |
new_password |
Must differ from the current password |
./gradlew :Account_Service__Java_-task:test