How iordjn/club-website works
CS Club Website is a monorepo for public club engagement and officer administration. Visitors browse events, announcements, and officer profiles and can RSVP; officers sign in to manage those records and track registrations. Both Next.js apps use a Django REST API backed by domain models. The graph distinguishes public presentation, authenticated management, API/business logic, and persisted data. Some connections are documented capabilities or inferred HTTP boundaries rather than sampled call sites, and are marked dashed where evidence is unavailable.
Main entry points: api.ts Authenticated API setup · hooks Management hooks · views Management views · EventPreviewWrapper.tsx Event preview
Components 23
Public website
- Public pages
apps/public-website/app - Public data hooks
apps/public-website/hooks - Public API adapter
apps/public-website/lib/api.ts
Officers hub
- Dashboard entry
apps/officers-hub/app/page.tsx - Management views
apps/officers-hub/components/views - Content editors
apps/officers-hub/components/editors - Event preview
apps/officers-hub/components/events/EventPreviewWrapper.tsx - Management hooks
apps/officers-hub/hooks - UI adapters
apps/officers-hub/lib/adapters.ts - Authenticated API setup
apps/officers-hub/lib/api.ts
API and domain
- API routes
apps/api/api/urls - API views
apps/api/api/views - Clerk verification
apps/api/api/middleware/clerk_auth.py - Business services
apps/api/api/services - Domain models
apps/api/api/models
Shared client and UI
- API client
packages/api-client/src - Shared UI components
packages/ui/src/components - API contracts
packages/api-contracts/src - Domain types
packages/domain-types/src
Other components
- Site visitor
- Club officer
- Clerk authentication
- PostgreSQL database
Connections 23
- Site visitor → Public pages: browses
- Public pages → Public data hooks: loads content
- Public data hooks → Public API adapter: requests data
- Public API adapter → API routes: calls REST API
- Club officer → Dashboard entry: manages club
- Dashboard entry → Management views: selects views
apps/officers-hub/app/page.tsx - Management views → Content editors: opens editors
- Management views → Event preview: opens preview
- Content editors → Management hooks: edits records
- Management hooks → Authenticated API setup: calls client
apps/officers-hub/hooks/useEvents.ts - Management hooks → UI adapters: converts requests
apps/officers-hub/hooks/useEvents.ts - Event preview → Management hooks: loads event
apps/officers-hub/components/events/EventPreviewWrapper.tsx - Event preview → Shared UI components: renders preview
apps/officers-hub/components/events/EventPreviewWrapper.tsx - Authenticated API setup → Clerk authentication: gets token
apps/officers-hub/lib/api.ts - Authenticated API setup → API client: creates client
apps/officers-hub/lib/api.ts - API client → API routes: calls REST API
- API routes → API views: routes requests
- API views → Clerk verification: verifies officers
- API views → Business services: delegates logic
- Business services → Domain models: reads and writes
apps/api/api/services/event_service.py - Domain models → PostgreSQL database: persists records
- UI adapters → Domain types: maps types
apps/officers-hub/lib/adapters.ts - Authenticated API setup → API contracts: exports request types
apps/officers-hub/lib/api.ts