How msant1972/propostas works
Propostas is a proposal-server repository with a web client, NestJS API, and background worker. The visible user journey is login and authentication, then browsing the product catalog through protected API routes; the API resolves users and authorization before serving catalog data. Separately, the worker relays outbox events into a queue and dispatches registered handlers. The README gives no further business-domain detail, and the worker handlers shown are only system examples, so richer proposal lifecycle stages cannot be established from the available evidence.
Main entry points: App.tsx Routes and shell · main.ts Worker runtime · RequireAuth.tsx Auth gate · authz.ts Authorization guard
Components 24
Web client
- Routes and shell
apps/web/src/App.tsx - Auth gate
apps/web/src/auth/RequireAuth.tsx - Login page
apps/web/src/pages/LoginPage.tsx - Web session
apps/web/src/auth/store.ts - Entra sign-in
apps/web/src/auth/msal.ts - Catalog page
apps/web/src/pages/CatalogPage.tsx - Product detail
apps/web/src/pages/ProductPage.tsx
API and access
- API application
apps/api/src/app.module.ts - Authentication guard
apps/api/src/auth/auth.guard.ts - Token verification
apps/api/src/auth/token-verifier.ts - Dev token endpoint
apps/api/src/auth/dev-auth.controller.ts - Authorization guard
apps/api/src/authz/authz.ts - User resolution
apps/api/src/users/users.service.ts - Permission rules
apps/api/src/authz/ability.ts - Catalog routes
apps/api/src/catalog/catalog.controller.ts - Catalog service
apps/api/src/catalog/catalog.service.ts - Outbox service
apps/api/src/outbox/outbox.service.ts
Background processing
- Worker runtime
apps/worker/src/main.ts - Outbox relay
apps/worker/src/relay/relay.service.ts - Event dispatch
apps/worker/src/queues/handlers.ts - Redis job queue
Persistence
- Prisma access
apps/api/src/prisma/prisma.module.ts - Database
Other components
- User
Connections 25
- User → Routes and shell: uses
apps/web/src/App.tsx - Routes and shell → Auth gate: protects routes
apps/web/src/App.tsx - Routes and shell → Login page: routes to
apps/web/src/App.tsx - Routes and shell → Catalog page: routes to
apps/web/src/App.tsx - Routes and shell → Product detail: routes to
apps/web/src/App.tsx - Auth gate → Web session: reads session
apps/web/src/auth/RequireAuth.tsx - Auth gate → Entra sign-in: acquires token
apps/web/src/auth/RequireAuth.tsx - Login page → Web session: sets session
apps/web/src/pages/LoginPage.tsx - Catalog page → Catalog routes: requests catalog
apps/web/src/pages/CatalogPage.tsx - API application → Authentication guard: registers guard
apps/api/src/app.module.ts - API application → Authorization guard: registers guard
apps/api/src/app.module.ts - Authentication guard → Token verification: verifies token
apps/api/src/auth/auth.guard.ts - Dev token endpoint → Token verification: issues token
apps/api/src/auth/dev-auth.controller.ts - Authorization guard → User resolution: resolves actor
apps/api/src/authz/authz.ts - Authorization guard → Permission rules: checks permission
apps/api/src/authz/authz.ts - Catalog routes → Catalog service: calls
apps/api/src/catalog/catalog.controller.ts - Catalog service → Prisma access: uses persistence
apps/api/src/catalog/catalog.service.ts - User resolution → Prisma access: upserts user
apps/api/src/users/users.service.ts - Prisma access → Database: accesses
- Worker runtime → Outbox relay: starts relay
apps/worker/src/main.ts - Worker runtime → Event dispatch: dispatches jobs
apps/worker/src/main.ts - Worker runtime → Redis job queue: creates worker and queue
apps/worker/src/main.ts - Outbox relay → Redis job queue: publishes jobs
apps/worker/src/relay/relay.service.ts - Outbox relay → Database: claims outbox events
apps/worker/src/relay/relay.service.ts - Outbox service → Database: writes events