24 lines
841 B
Markdown
24 lines
841 B
Markdown
# Visione Backend Architecture
|
|
|
|
## Layout
|
|
- `controllers/`: Drogon `HttpController` classes.
|
|
- `services/`: application/business logic.
|
|
- `repositories/`: database helpers and migrations.
|
|
- `common/`: reusable HTTP, auth, crypto, email and validation utilities.
|
|
- `migrations/`: versioned SQL files.
|
|
- `docs/`: product, API, schema and milestone documentation.
|
|
|
|
## Drogon Usage
|
|
Controllers use Drogon route macros and return JSON with
|
|
`HttpResponse::newHttpJsonResponse`. Database access uses Drogon's MySQL client
|
|
with parameterized SQL placeholders.
|
|
|
|
The codebase starts with raw SQL repositories because the schema is still
|
|
evolving. Drogon ORM/codegen can be introduced later after the database model
|
|
stabilizes.
|
|
|
|
## Local Email
|
|
OTP emails are sent to MailHog over SMTP. MailHog keeps messages local and
|
|
inspectable through its web UI.
|
|
|