How nurkenspashev92/bookit works
Bookit is a property-rental API: clients authenticate, discover and manage listings, and use booking, engagement, content, subscription, and analytics features. The API server initializes dependencies and registers versioned routes; those routes dispatch to domain handlers. The graph preserves documented route groups and the sampled server wiring, plus the required property, analytics, identity, and seed modules. Most service-to-repository behavior was not sampled, so those internal links are omitted. Seed relationships are limited to calls visible in its entry point.
Main entry points: router.go Route registration · seed/main.go Seed orchestration · apiserver/main.go API server · house.go House persistence
Components 20
API runtime
- API server
app/cmd/apiserver/main.go - Route registration
app/cmd/router/router.go
Property discovery
- Property routes
app/internal/property/handler/routes.go - House persistence
app/internal/property/repository/house.go - House model
app/internal/property/schema/house.go - Location routes
app/internal/location/handler/routes.go
Accounts and engagement
- Authentication routes
app/internal/identity/handler/routes.go - Token guard
app/pkg/middleware/auth.go - Likes routes
app/internal/interaction/handler/routes.go
Platform services
- Booking routes
app/internal/booking/handler/routes.go - Content routes
app/internal/content/handler/routes.go - Subscription routes
app/internal/subscription/handler/routes.go - Analytics routes
app/internal/analytics/handler/routes.go - Analytics storage
app/internal/analytics/repository/stats.go
Data seeding
- Seed orchestration
app/cmd/seed/main.go - FAQ seed data
app/cmd/seed/faq.go - House seed data
app/cmd/seed/houses.go
Other components
- API clients
- PostgreSQL
- S3 storage
Connections 19
- API clients → API server: sends requests
- API server → Route registration: registers routes
app/cmd/apiserver/main.go - Route registration → Authentication routes: registers routes
app/cmd/router/router.go - Route registration → Property routes: registers routes
app/cmd/router/router.go - Route registration → Location routes: registers routes
app/cmd/router/router.go - Route registration → Booking routes: registers routes
app/cmd/router/router.go - Route registration → Likes routes: registers routes
app/cmd/router/router.go - Route registration → Content routes: registers routes
app/cmd/router/router.go - Route registration → Subscription routes: registers routes
app/cmd/router/router.go - Route registration → Analytics routes: registers routes
app/cmd/router/router.go - Route registration → Token guard: configures guards
app/cmd/router/router.go - Token guard → Authentication routes: validates tokens
- House persistence → PostgreSQL: persists houses
- Analytics storage → PostgreSQL: queries statistics
- Seed orchestration → FAQ seed data: seeds FAQs
app/cmd/seed/main.go - Seed orchestration → House seed data: builds house rows
app/cmd/seed/main.go - Seed orchestration → PostgreSQL: writes seed data
app/cmd/seed/main.go - Seed orchestration → S3 storage: uploads images
app/cmd/seed/main.go - House model → House persistence: models persisted houses