How jeanzo1719/adulto-funcional-server works
1. What this repository is
- This is a Spring Boot 3 backend for a personal management system combining financial tracking, agenda/scheduling, and secure password storage.
- The README explicitly describes a Clean Architecture approach, so the codebase is intended to be organized by dependency direction: domain at the center, infrastructure at the edges.
2. Likely architectural shape
- The main boundary is between business logic and technical concerns.
- In a clean-architecture setup like this, you should expect:
- Domain layer: core entities and rules for finances, agenda items, and password vault entries.
- Application/use-case layer: orchestration of operations like create transaction, schedule event, store password.
- Infrastructure layer: database access, authentication, migrations, and any crypto implementation details.
3. Primary functional subsystems
- The README names three product areas:
- Personal finance management
- Agenda / scheduling
- Secure password storage
- For an architecture diagram, these should be shown as separate business modules that share platform services such as authentication and persistence.
4. Authentication and identity boundary
- Authentication is explicitly JWT-based, which means the backend likely issues tokens after login and validates them on protected requests.
- This makes authentication a cross-cutting subsystem sitting between the API layer and the use cases.
- The system likely uses user identity as the tenant boundary for all three modules, with access to each user’s financial, agenda, and password data scoped by the authenticated principal.
5. Password security subsystem
- The README calls out Argon2, indicating password hashing is a dedicated security concern.
- This is important for the diagram because there are two different “password” concepts:
- Login credentials hashed with Argon2
- Stored passwords managed as user data, likely with additional protection beyond plain storage
- Even without implementation details, it is safe to treat cryptographic handling as part of the security/infrastructure boundary, not the domain layer.
6. Persistence and database layer
- The backend uses MariaDB as the relational datastore.
- Flyway is included, so schema evolution is managed through versioned database migrations rather than ad hoc schema changes.
- In the architecture diagram, MariaDB should sit behind repository/DAO adapters, with Flyway as a separate database provisioning/migration path at startup or deployment time.
7. Identifier strategy
- The README mentions UUID v7, which suggests entities are identified with time-ordered UUIDs rather than auto-increment integers.
- This affects persistence and API design because IDs are globally unique and suitable for distributed systems or safer public exposure.
- In a diagram, this is a data-model characteristic rather than a separate subsystem.
8. Request/data flow at a high level
- A typical flow is:
1. Client sends request to the Spring Boot API.
2. Authentication layer validates JWT or performs login.
3. Application/use-case layer executes business logic for finances, agenda, or passwords.
4. Domain objects enforce rules.
5. Repository adapters persist or read data from MariaDB.
- This is the main end-to-end path to depict.
9. Security boundary
- The architecture clearly treats security as a first-class concern:
- JWT for sessionless API authentication
- Argon2 for credential hashing
- Secure storage requirements for password vault data
- For diagram purposes, security should be drawn as a boundary that protects all business modules, not as a feature of only one module.
10. Infrastructure and runtime
- The runtime is Java/Spring Boot 3, which implies a standard server-side application packaged and deployed as a backend service.
- There is no evidence in the README of additional external services such as message brokers, caches, or search engines, so the core architecture appears centered on a single application process plus MariaDB.
11. What should be emphasized in an architecture diagram
- Show the backend as a layered system with:
- API/controllers
- Application/use cases
- Domain
- Infrastructure adapters
- Show three business areas under the application/domain boundary:
- finance
- agenda
- password vault
- Show shared platform services:
- JWT auth
- Argon2 hashing
- MariaDB persistence
- Flyway migrations
12. Confidence note
- This explanation is based only on the README and file listing, so it reflects the intended architecture, not verified implementation details.
- If you want a deeper diagram, the next useful inputs would be the source tree under src/, especially packages for controllers, services, domain models, repositories, and security configuration.
Components 16
API layer
HTTP entrypoints and request handling
- REST API · HTTP boundary for client requests and responses
- Client · External user or frontend consuming the backend
Application
Use-case orchestration
- Login · Authenticates users and issues JWTs
- Finance use cases · Coordinates personal finance operations
- Agenda use cases · Coordinates scheduling and agenda operations
- Vault use cases · Coordinates secure password storage operations
Domain
Core business rules and models
- Finance model · Rules and entities for transactions and tracking
- Agenda model · Rules and entities for events and scheduling
- Vault model · Rules and entities for stored credentials
- User model · Authenticated principal and ownership boundary
Infrastructure
Persistence and technical adapters
- Repositories · Domain-facing storage interfaces
- DB adapters · Repository implementations for relational persistence
Platform
Shared security and runtime services
- Auth filter · Validates tokens and guards protected routes
- Argon2 · Hashes login credentials and supports security handling
- Flyway · Applies schema versioning during startup or deployment
- MariaDB · Primary persistent store for the application
Connections 21
- Client → REST API: requests · Sends API calls to the backend
- REST API → Auth filter: protects · Requests pass through JWT validation
- Auth filter → Login: allows · Authenticated access reaches application logic
- REST API → Login: login · Handles credential submission and token issuance
- REST API → Finance use cases: finance · Routes finance operations to use cases
- REST API → Agenda use cases: agenda · Routes scheduling operations to use cases
- REST API → Vault use cases: vault · Routes password vault operations to use cases
- Login → Argon2: hashes · Uses Argon2 for credential verification and storage
- Login → User model: authenticates · Works with user identity as the access boundary
- Finance use cases → Finance model: applies · Executes finance rules and entity behavior
- Agenda use cases → Agenda model: applies · Executes agenda rules and entity behavior
- Vault use cases → Vault model: applies · Executes vault rules and entity behavior
- Finance use cases → Repositories: reads/writes · Persists finance data through ports
- Agenda use cases → Repositories: reads/writes · Persists agenda data through ports
- Vault use cases → Repositories: reads/writes · Persists vault data through ports
- Repositories → DB adapters: implemented by · Repository contracts are backed by infrastructure adapters
- DB adapters → MariaDB: stores · Reads and writes relational data
- Flyway → MariaDB: migrates · Manages schema evolution in the database
- User model → Finance model: owns · User identity scopes finance data
- User model → Agenda model: owns · User identity scopes agenda data
- User model → Vault model: owns · User identity scopes vault data