How atom2048/connect works
Connect is a social networking application: users authenticate, browse a feed, publish and interact with posts, and use profiles, friends, search, and notifications. Its primary client is a TypeScript web app backed by Firebase; separate Worker and API code provides AI, media, search, and notification capabilities. The graph includes documented product branches even where their implementation was not sampled. Edges are limited to relationships visible in excerpts, the SOURCE INDEX, or README; some subsystem internals remain unverified.
Main entry points: db.ts Firestore data access · main.ts App startup · explore.ts Explore and search · handler.ts AI request handler
Components 26
Web application
- App startup
src/main.ts - Authentication pages
src/pageModules/auth.ts - Client state
src/state.ts - Shared UI
src/components.ts
Social features
- Home feed
src/pageModules/home.ts - Explore and search
src/pageModules/explore.ts - Friend management
src/pageModules/friends.ts - Profiles
src/pageModules/profile.ts - Moderation UI
src/pageModules/moderation.ts
Firebase services
- Authentication
src/auth.ts - Firestore data access
src/db.ts - Cloud Firestore
- Firebase Auth
Platform services
- Post search API
api/search/posts.js - News service
api/news.js - Notifications
api/notifications.js - Push delivery
api/push-dispatch.js - Firebase functions
functions/index.js - Worker routes
worker/index.ts - Media access
worker/mediaAccess.ts - D1 database
Ask AI
- AI request handler
worker/ai/handler.ts - AI context builder
worker/ai/context.ts - AI provider client
worker/ai/openrouter.ts
Other components
- User
- OpenRouter
Connections 27
- User → App startup: uses
- App startup → Authentication pages: routes to
src/main.ts - Authentication pages → Authentication: calls
src/pageModules/auth.ts - Authentication → Firebase Auth: authenticates with
src/auth.ts - App startup → Client state: initializes
src/main.ts - App startup → Home feed: routes to
src/main.ts - App startup → Explore and search: routes to
src/main.ts - Home feed → Firestore data access: reads and writes
src/pageModules/home.ts - Explore and search → Firestore data access: queries
src/pageModules/explore.ts - Friend management → Firestore data access: uses
- Profiles → Firestore data access: uses
- Moderation UI → Firestore data access: uses
- Home feed → Shared UI: renders
src/pageModules/home.ts - Authentication pages → Shared UI: renders
src/pageModules/auth.ts - Firestore data access → Cloud Firestore: reads and writes
src/db.ts - Explore and search → Post search API: searches posts
- Explore and search → News service: searches news
- User → Notifications: receives
- Notifications → Push delivery: dispatches
- Cloud Firestore → Firebase functions: triggers
- Worker routes → Media access: routes media to
worker/index.ts - Worker routes → AI request handler: routes AI to
worker/index.ts - AI request handler → AI context builder: builds context with
worker/ai/handler.ts - AI request handler → D1 database: reads and writes
worker/ai/handler.ts - AI context builder → D1 database: queries
worker/ai/context.ts - AI request handler → AI provider client: generates with
- AI provider client → OpenRouter: calls