How tendulkark/sln-residency works
SLN Residency is a staff-only, multi-tenant hotel operations console: staff manage rooms and reservations, record desk-collected payments, and handle invoices and reporting. The web app routes staff through protected business modules; the Fastify API exposes resource handlers backed by Prisma and shared validation schemas. The graph highlights reservation availability/billing, administration, and reporting alongside the wider documented modules. Some frontend-to-API wiring and unsampled handlers are not shown, so those relationships are omitted rather than inferred.
Main entry points: app Routes and shell · app.js Fastify API · bookings.routes.js Booking handlers · audit.js Audit recording
Components 23
Staff console
- Web application
apps/web/src/main.jsx - Routes and shell
apps/web/src/app - Sign-in and session
apps/web/src/modules/auth
Stay operations
- Reservations
apps/web/src/modules/reservations - Invoices
apps/web/src/modules/invoices
Hotel administration
- Rooms and housekeeping
apps/web/src/modules/rooms - Dashboard
apps/web/src/modules/dashboard - Reports
apps/web/src/modules/reports - Settings and staff
apps/web/src/modules/settings - Audit log
apps/web/src/modules/audit
API services
- Fastify API
apps/api/src/app.js - Booking handlers
apps/api/src/routes/bookings.routes.js - Invoice handlers
apps/api/src/routes/invoices.routes.js - Room handlers
apps/api/src/routes/rooms.routes.js - Role handlers
apps/api/src/routes/roles.routes.js - Tax rule handlers
apps/api/src/routes/tax-rules.routes.js - Availability checks
apps/api/src/lib/availability.js - Stay billing
apps/api/src/lib/billing.js - Audit recording
apps/api/src/lib/audit.js - Report services
apps/api/src/lib/reports.js
Shared contracts
- Zod schemas and permissions
packages/shared-schemas/src
Other components
- Hotel staff
- PostgreSQL
Connections 30
- Hotel staff → Web application: uses
README.md - Web application → Routes and shell: mounts router
apps/web/src/main.jsx - Routes and shell → Sign-in and session: routes to
README.md - Routes and shell → Reservations: routes to
README.md - Routes and shell → Invoices: routes to
README.md - Routes and shell → Rooms and housekeeping: routes to
README.md - Routes and shell → Dashboard: routes to
README.md - Routes and shell → Reports: routes to
README.md - Routes and shell → Settings and staff: routes to
README.md - Routes and shell → Audit log: routes to
README.md - Fastify API → Booking handlers: registers
apps/api/src/app.js - Fastify API → Invoice handlers: registers
apps/api/src/app.js - Fastify API → Room handlers: registers
apps/api/src/app.js - Fastify API → Role handlers: registers
apps/api/src/app.js - Fastify API → Tax rule handlers: registers
apps/api/src/app.js - Booking handlers → Availability checks: checks conflicts
apps/api/src/routes/bookings.routes.js - Booking handlers → Stay billing: computes stay
apps/api/src/routes/bookings.routes.js - Booking handlers → Audit recording: records actions
apps/api/src/routes/bookings.routes.js - Invoice handlers → Stay billing: computes invoice
apps/api/src/routes/invoices.routes.js - Invoice handlers → Audit recording: records actions
apps/api/src/routes/invoices.routes.js - Room handlers → Availability checks: checks conflicts
apps/api/src/routes/rooms.routes.js - Room handlers → Audit recording: records actions
apps/api/src/routes/rooms.routes.js - Role handlers → Audit recording: records actions
apps/api/src/routes/roles.routes.js - Tax rule handlers → Audit recording: records actions
apps/api/src/routes/tax-rules.routes.js - Booking handlers → Zod schemas and permissions: validates payloads
apps/api/src/routes/bookings.routes.js - Room handlers → Zod schemas and permissions: validates payloads
apps/api/src/routes/rooms.routes.js - Role handlers → Zod schemas and permissions: validates payloads
apps/api/src/routes/roles.routes.js - Tax rule handlers → Zod schemas and permissions: validates payloads
apps/api/src/routes/tax-rules.routes.js - Reports → Report services: requests reports
- Fastify API → PostgreSQL: serves persisted data