# Graph Report - /home/tdvorak/Desktop/PROG+HTML/Bookra  (2026-04-30)

## Corpus Check
- 166 files · ~380,279 words
- Verdict: corpus is large enough that graph structure adds value.

## Summary
- 794 nodes · 1114 edges · 29 communities detected
- Extraction: 87% EXTRACTED · 13% INFERRED · 0% AMBIGUOUS · INFERRED: 150 edges (avg confidence: 0.8)
- Token cost: 0 input · 0 output

## Community Hubs (Navigation)
- [[_COMMUNITY_Neon Database Core|Neon Database Core]]
- [[_COMMUNITY_Paddle Billing & Dashboard|Paddle Billing & Dashboard]]
- [[_COMMUNITY_Memory Repository|Memory Repository]]
- [[_COMMUNITY_PostgreSQL Repository|PostgreSQL Repository]]
- [[_COMMUNITY_Domain Models|Domain Models]]
- [[_COMMUNITY_Server & Main Entry|Server & Main Entry]]
- [[_COMMUNITY_Admin Dashboard|Admin Dashboard]]
- [[_COMMUNITY_Test Suite|Test Suite]]
- [[_COMMUNITY_Database Records|Database Records]]
- [[_COMMUNITY_Widget Builder & Icons|Widget Builder & Icons]]
- [[_COMMUNITY_Email Templates Service|Email Templates Service]]
- [[_COMMUNITY_Notification Service|Notification Service]]
- [[_COMMUNITY_Database Connection|Database Connection]]
- [[_COMMUNITY_Email Provider|Email Provider]]
- [[_COMMUNITY_Auth & Magic Links|Auth & Magic Links]]
- [[_COMMUNITY_Business Service|Business Service]]
- [[_COMMUNITY_Shell & Auth UI|Shell & Auth UI]]
- [[_COMMUNITY_Email Localization|Email Localization]]
- [[_COMMUNITY_Customer Notifications|Customer Notifications]]
- [[_COMMUNITY_Maps & Geocoding|Maps & Geocoding]]
- [[_COMMUNITY_Brand Profile Service|Brand Profile Service]]
- [[_COMMUNITY_Google OAuth|Google OAuth]]
- [[_COMMUNITY_Map URL Parsing|Map URL Parsing]]
- [[_COMMUNITY_Location Map|Location Map]]
- [[_COMMUNITY_Tabs Component|Tabs Component]]
- [[_COMMUNITY_Legal Pages|Legal Pages]]
- [[_COMMUNITY_Auth Provider|Auth Provider]]
- [[_COMMUNITY_User Repository|User Repository]]
- [[_COMMUNITY_Public Booking|Public Booking]]

## God Nodes (most connected - your core abstractions)
1. `trimSpace()` - 47 edges
2. `PGRepository` - 46 edges
3. `MemoryRepository` - 46 edges
4. `NewService()` - 28 edges
5. `NewMemoryRepository()` - 22 edges
6. `Handler` - 20 edges
7. `Service` - 20 edges
8. `DB` - 18 edges
9. `New()` - 17 edges
10. `NewServer()` - 17 edges

## Surprising Connections (you probably didn't know these)
- `New()` --calls--> `NewGoogleProvider()`  [INFERRED]
  apps/auth-service/internal/handlers/handlers.go → apps/auth-service/internal/oauth/google.go
- `NewServer()` --calls--> `NewCustomerService()`  [INFERRED]
  apps/backend/internal/api/server.go → apps/backend/internal/bookings/customer_service.go
- `main()` --calls--> `Load()`  [INFERRED]
  apps/backend/cmd/api/main.go → apps/backend/internal/config/config.go
- `main()` --calls--> `getEnv()`  [INFERRED]
  apps/backend/cmd/api/main.go → apps/auth-service/internal/config/config.go
- `main()` --calls--> `New()`  [INFERRED]
  apps/backend/cmd/api/main.go → apps/auth-service/internal/handlers/handlers.go

## Communities

### Community 0 - "Neon Database Core"
Cohesion: 0.06
Nodes (42): NewNeonVerifier(), NeonVerifier, CheckoutSession, PaymentMethod, Service, checkoutAvailable(), customDataString(), customerSnapshotKey() (+34 more)

### Community 1 - "Paddle Billing & Dashboard"
Cohesion: 0.04
Nodes (38): getPaddle(), paddleConfigured(), handleCancel(), handleReschedule(), reference(), token(), changeMonth(), demoData() (+30 more)

### Community 2 - "Memory Repository"
Cohesion: 0.04
Nodes (3): MemoryRepository, defaultAvailabilityBlocks(), maxInt()

### Community 3 - "PostgreSQL Repository"
Cohesion: 0.04
Nodes (2): PGRepository, firstNonEmpty()

### Community 4 - "Domain Models"
Cohesion: 0.05
Nodes (40): AvailabilityBlockRequest, BlockedDay, BookingDefaultsRequest, BrandProfile, CancelBookingRequest, CheckoutLaunchResponse, CheckoutSessionRequest, CreateBlockedDayRequest (+32 more)

### Community 5 - "Server & Main Entry"
Cohesion: 0.06
Nodes (22): main(), runMigrations(), Server, allowedOrigins(), authorizeJobRunner(), NewServer(), TestDispatchReminderJobsAcceptsConfiguredJobRunnerKey(), TestDispatchReminderJobsRequiresJobRunnerKey() (+14 more)

### Community 6 - "Admin Dashboard"
Cohesion: 0.06
Nodes (12): NewAdminDashboard(), AdminDashboard, CheckoutRequest, Handler, detectLocale(), generateState(), oauthCookieSecure(), LoginRequest (+4 more)

### Community 7 - "Test Suite"
Cohesion: 0.13
Nodes (28): TestGenerateTokensProducesVerifiableAccessAndRefreshTokens(), TestRefreshTokensRejectsInvalidToken(), TestRefreshTokensReturnsRotatedPair(), TestCheckoutAvailableForPlanRequiresConfiguredPlan(), TestCheckoutAvailableForPlanRequiresSecret(), testConfig(), TestCreateCheckoutRequiresPaddleConfig(), TestCreateCheckoutReturnsLaunchPayload() (+20 more)

### Community 8 - "Database Records"
Cohesion: 0.06
Nodes (31): AvailabilityBlockRecord, AvailabilityRuleRecord, BillingSnapshotRecord, BlockedDayRecord, BookingRecord, BrandProfileRecord, ClassSessionRecord, CreateBlockedDayParams (+23 more)

### Community 9 - "Widget Builder & Icons"
Cohesion: 0.08
Nodes (5): generateCode(), generatedMapElementId(), generateMapCode(), json(), safeHexColor()

### Community 10 - "Email Templates Service"
Cohesion: 0.14
Nodes (15): Config, EmailTemplate, Service, bookingConfirmationCS(), BookingConfirmationEmail(), bookingConfirmationEN(), MagicLinkEmail(), magicLinkEmailCS() (+7 more)

### Community 11 - "Notification Service"
Cohesion: 0.15
Nodes (13): noopNotifier, Notifier, Service, collides(), countClassBookings(), generateAppointmentSlots(), generateClassSlots(), normalizePlanCode() (+5 more)

### Community 12 - "Database Connection"
Cohesion: 0.1
Nodes (2): DB, Stats

### Community 14 - "Email Provider"
Cohesion: 0.18
Nodes (11): DeliveryReceipt, EmailMessage, EmailProvider, noopEmailProvider, Service, localizedStartsAt(), NewService(), reminderRecipient() (+3 more)

### Community 15 - "Auth & Magic Links"
Cohesion: 0.19
Nodes (4): Claims, Service, generateRandomToken(), TokenPair

### Community 16 - "Business Service"
Cohesion: 0.12
Nodes (1): Service

### Community 17 - "Shell & Auth UI"
Cohesion: 0.14
Nodes (2): submitSignIn(), translateAuthError()

### Community 19 - "Email Localization"
Cohesion: 0.3
Nodes (11): BookingEmailData, formatLocalizedDateTime(), formatLocalizedTime(), RenderEmailMessage(), renderHTMLBody(), RenderReminderEmail(), renderSubject(), renderTextBody() (+3 more)

### Community 20 - "Customer Notifications"
Cohesion: 0.26
Nodes (4): NewCustomerService(), customerNoopNotifier, CustomerNotifier, CustomerService

### Community 21 - "Maps & Geocoding"
Cohesion: 0.36
Nodes (11): resolveMapLocation(), geocodeLocation(), mapStyleById(), parseCoordinateText(), parseGoogleMapsUrl(), parseMapUrl(), parseMapyCzUrl(), resolveLocationInput() (+3 more)

### Community 22 - "Brand Profile Service"
Cohesion: 0.33
Nodes (7): Service, firstNonEmpty(), normalizeClock(), normalizePlanCode(), toAvailabilityBlocks(), toTeamInvites(), validateAvailabilityBlocks()

### Community 24 - "Google OAuth"
Cohesion: 0.25
Nodes (3): NewGoogleProvider(), GoogleProvider, GoogleUser

### Community 26 - "Map URL Parsing"
Cohesion: 0.47
Nodes (3): parseGoogleMapsUrl(), parseMapUrl(), parseMapyCzUrl()

### Community 27 - "Location Map"
Cohesion: 0.4
Nodes (2): createMarkerIcon(), safeMarkerColor()

### Community 28 - "Tabs Component"
Cohesion: 0.47
Nodes (3): TabsContent(), TabsTrigger(), useTabs()

### Community 29 - "Legal Pages"
Cohesion: 0.7
Nodes (4): helperPose(), heroPose(), kind(), sections()

### Community 30 - "Auth Provider"
Cohesion: 0.5
Nodes (2): parseJwtPayload(), sessionFromLocalToken()

### Community 33 - "User Repository"
Cohesion: 0.67
Nodes (2): MagicLink, User

### Community 36 - "Public Booking"
Cohesion: 1.0
Nodes (2): bookSlot(), tenantSlug()

## Knowledge Gaps
- **97 isolated node(s):** `EmailTemplate`, `Config`, `Stats`, `User`, `MagicLink` (+92 more)
  These have ≤1 connection - possible missing edges or undocumented components.
- **Thin community `PostgreSQL Repository`** (47 nodes): `.RecordBillingEvent()`, `PGRepository`, `.AppendWaitlistEntry()`, `.CreateBlockedDay()`, `.CreateBooking()`, `.CreateCustomer()`, `.CreateLocation()`, `.CreateNotificationDeliveryLog()`, `.CreateReminderJob()`, `.DeleteBlockedDay()`, `.DeleteCustomer()`, `.DeleteLocation()`, `.EnsureUserIdentity()`, `.GetBookingByReference()`, `.GetBrandProfile()`, `.GetCustomerBookingsCount()`, `.GetCustomerByEmail()`, `.GetCustomerByID()`, `.GetCustomerLastBooking()`, `.GetDashboardMetrics()`, `.GetLocationByID()`, `.GetSubscriptionSnapshot()`, `.GetTenantByBillingCustomerID()`, `.GetTenantByID()`, `.GetTenantBySlug()`, `.GetTenantMembershipByUserID()`, `.ListAvailabilityRulesByTenant()`, `.ListBlockedDaysByTenant()`, `.ListBookingsByTenantBetween()`, `.ListClassSessionsByTenant()`, `.ListCustomersByTenant()`, `.ListDueReminderJobs()`, `.ListLocationsByTenant()`, `.ListServicesByTenant()`, `.ListWorkingHoursByTenant()`, `.MarkReminderJobDispatched()`, `.RecordBillingEvent()`, `.RescheduleBooking()`, `.UpdateBlockedDay()`, `.UpdateBookingStatus()`, `.UpdateCustomer()`, `.UpdateLocation()`, `.UpdateTenantBillingCustomerID()`, `.UpdateTenantBillingState()`, `.UpdateWorkingHours()`, `.UpsertSubscriptionSnapshot()`, `firstNonEmpty()`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Database Connection`** (21 nodes): `db.go`, `DB`, `.Close()`, `.CreateMagicLink()`, `.CreateUser()`, `.Exec()`, `.GetKV()`, `.GetMagicLink()`, `.GetStats()`, `.GetUserByEmail()`, `.GetUserByID()`, `.GetUserByProviderID()`, `.MarkMagicLinkUsed()`, `New()`, `.Pool()`, `.PutKV()`, `.Query()`, `.QueryRow()`, `.UpdateLastLogin()`, `.UpdateUser()`, `Stats`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Business Service`** (17 nodes): `service.go`, `Service`, `.CreateBlockedDay()`, `.CreateCustomer()`, `.CreateLocation()`, `.DeleteBlockedDay()`, `.DeleteCustomer()`, `.DeleteLocation()`, `.ListBlockedDays()`, `.ListCustomers()`, `.ListLocations()`, `.ListWorkingHours()`, `NewService()`, `.UpdateBlockedDay()`, `.UpdateCustomer()`, `.UpdateLocation()`, `.UpdateWorkingHours()`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Shell & Auth UI`** (15 nodes): `shell.tsx`, `GlobeIcon()`, `GoogleIcon()`, `handleOpenAuth()`, `hideHeader()`, `isDemoMode()`, `MenuIcon()`, `MoonIcon()`, `sendMagicLink()`, `showGoogleSignIn()`, `signInWithGoogle()`, `submitSignIn()`, `SunIcon()`, `translateAuthError()`, `XIcon()`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Location Map`** (6 nodes): `location-map.tsx`, `createMarkerIcon()`, `escapeHtml()`, `loadLeaflet()`, `LocationMap()`, `safeMarkerColor()`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Auth Provider`** (5 nodes): `auth-provider.tsx`, `AuthProvider()`, `parseJwtPayload()`, `sessionFromLocalToken()`, `useAuth()`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `User Repository`** (3 nodes): `repository.go`, `MagicLink`, `User`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Public Booking`** (3 nodes): `public-booking-route.tsx`, `bookSlot()`, `tenantSlug()`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.

## Suggested Questions
_Questions this graph is uniquely positioned to answer:_

- **Why does `trimSpace()` connect `Neon Database Core` to `Memory Repository`, `PostgreSQL Repository`, `Server & Main Entry`, `Admin Dashboard`, `Notification Service`, `Email Provider`, `Email Localization`, `Brand Profile Service`?**
  _High betweenness centrality (0.246) - this node is a cross-community bridge._
- **Why does `NewServer()` connect `Server & Main Entry` to `Neon Database Core`, `Customer Notifications`, `Test Suite`?**
  _High betweenness centrality (0.116) - this node is a cross-community bridge._
- **Why does `reference()` connect `Paddle Billing & Dashboard` to `Notification Service`?**
  _High betweenness centrality (0.101) - this node is a cross-community bridge._
- **Are the 45 inferred relationships involving `trimSpace()` (e.g. with `.StripeSecretConfigured()` and `.StripeWebhookConfigured()`) actually correct?**
  _`trimSpace()` has 45 INFERRED edges - model-reasoned connections that need verification._
- **Are the 27 inferred relationships involving `NewService()` (e.g. with `New()` and `TestPriceForPlanUsesConfiguredPlanCodesOnly()`) actually correct?**
  _`NewService()` has 27 INFERRED edges - model-reasoned connections that need verification._
- **Are the 19 inferred relationships involving `NewMemoryRepository()` (e.g. with `TestDispatchDueProcessesPendingEmailReminders()` and `TestDispatchDueFailsUnknownChannel()`) actually correct?**
  _`NewMemoryRepository()` has 19 INFERRED edges - model-reasoned connections that need verification._
- **What connects `EmailTemplate`, `Config`, `Stats` to the rest of the system?**
  _97 weakly-connected nodes found - possible documentation gaps or missing edges._