How eveny89/backend works
This is a Fastify backend for accounts, teams, availability, meeting links, and reservations. The principal public-booking path is a guest retrieving an invite, selecting a team member and available time, then creating or managing a reservation; the sampled public routes show repository-backed validation and writes. Authenticated users also manage their profiles, teams, links, availability, and reservations. The README provides no product detail, so unsampled feature behavior is represented only at the route-module level; edges are limited to relationships visible in excerpts or the source index.
Main entry points: app.ts Fastify app · repository.ts SQL repository · routes.ts Authentication routes · schemas Request schemas
Components 16
API runtime
- Fastify app
src/app.ts - Server plugins
src/plugins - Request schemas
src/schemas
Identity and profiles
- Authentication routes
src/features/auth/routes.ts - Password hashing
src/features/auth/service.ts - User profiles
src/features/user/routes.ts - Token utilities
src/utils/token.ts
Scheduling and booking
- Availability routes
src/features/availability/routes.ts - Public booking
src/features/public/routes.ts - Reservation management
src/features/reservations/routes.ts
Teams and links
- Team management
src/features/teams/routes.ts - Link management
src/features/links/routes.ts
Persistence
- SQL repository
src/utils/repository.ts - Database connection
src/config/database.ts - PostgreSQL
Other components
- API client
Connections 25
- API client → Fastify app: sends requests
src/app.ts - Fastify app → Server plugins: autoloads
src/app.ts - Fastify app → Authentication routes: autoloads features
src/app.ts - Fastify app → Availability routes: autoloads features
src/app.ts - Fastify app → Public booking: autoloads features
src/app.ts - Fastify app → Reservation management: autoloads features
src/app.ts - Fastify app → Team management: autoloads features
src/app.ts - Fastify app → Link management: autoloads features
src/app.ts - Fastify app → User profiles: autoloads features
src/app.ts - Authentication routes → Password hashing: hashes passwords
src/features/auth/routes.ts - User profiles → Password hashing: hashes passwords
src/features/user/routes.ts - Authentication routes → SQL repository: reads and writes
src/features/auth/routes.ts - Authentication routes → Token utilities: creates tokens
src/features/auth/routes.ts - User profiles → SQL repository: reads and writes
src/features/user/routes.ts - Team management → SQL repository: reads and writes
src/features/teams/routes.ts - Public booking → SQL repository: reads and writes
src/features/public/routes.ts - Reservation management → SQL repository: reads and writes
src/features/reservations/routes.ts - Server plugins → Database connection: uses connection config
src/plugins/database.ts - Server plugins → SQL repository: installs repository
src/plugins/database.ts - SQL repository → PostgreSQL: executes SQL
src/utils/repository.ts - Token utilities → SQL repository: stores refresh tokens
src/utils/token.ts - Authentication routes → Request schemas: validates input
src/features/auth/routes.ts - Team management → Request schemas: validates input
src/features/teams/routes.ts - Public booking → Request schemas: validates input
src/features/public/routes.ts - Availability routes → Request schemas: validates input
src/features/availability/routes.ts