Files
mira/docs/architecture.md
Cauê Faleiros 8c7e5fbbe4
All checks were successful
CI / backend (push) Successful in 13m19s
CI / frontend (push) Successful in 11m3s
CI / docker (push) Successful in 1m58s
first commit
2026-06-03 16:31:42 -03:00

1.2 KiB

Architecture Notes

Initial Decisions

  • PostgreSQL is the system of record.
  • BrasilAPI is the initial provider for Brazilian national holidays.
  • Calendar data from external providers must be cached or persisted before production use.
  • Regional holidays and custom commemorative dates are first-party data managed inside the app.
  • Client users are read-only in the MVP.
  • Agency users can only access assigned clients unless they are super admins.

Backend Boundaries

  • auth: login, session/token handling, password hashing, invitation acceptance.
  • users: user management and invitations.
  • clients: client records and user-client access.
  • calendar: provider integrations, holiday sync, weekly dashboard, calendar views.
  • security: headers, CORS, rate limiting, auth middleware.
  • database: migrations, connection handling, transactions.

Frontend Boundaries

  • Authenticated app shell.
  • Weekly dashboard.
  • Client list.
  • Client calendar.
  • Day detail.
  • User and invitation management.
  • Custom dates.

Data Rules

  • Calendar-only dates should be stored as date.
  • Instants with time should be stored in UTC.
  • The operational timezone is America/Sao_Paulo.
  • Audit logs should record administrative and content changes.