# aristostheo/eleven11 architecture

> Architecture diagram of the GitHub repository aristostheo/eleven11, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aristostheo/eleven11
- Repository: https://github.com/aristostheo/eleven11

## Overview

11:11 is a time-gated anonymous wish-journaling app. Users check the server-synchronized clock, compose a private or anonymously shared wish with an optional photo, and submit during a 90-second 11:11 window; the backend validates the request and enforces the daily limit. Users can then browse shared daily wishes or their own paginated journal. The graph separates client flows, backend operations, and Firebase services. Backend responsibilities share one implementation file; unsampled details are limited to documented capabilities.

Main entry points: [`apps/mobile/src/lib/firebase.ts`](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/lib/firebase.ts) (Firebase client), [`apps/mobile/app/compose.tsx`](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/compose.tsx) (Wish composer), [`functions/src/index.ts`](https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts) (Wish submission), [`apps/mobile/src/lib/feed.ts`](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/lib/feed.ts) (Feed client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile experience"]
  node_gate["Clock gate<br/>[index.tsx]"]
  node_compose["Wish composer<br/>[compose.tsx]"]
  node_daily["Daily feed<br/>[feed.tsx]"]
  node_journal["My wishes<br/>[my-wishes.tsx]"]
end

subgraph group_client["Client services"]
  node_drafts["Draft persistence<br/>[drafts.ts]"]
  node_clientfb["Firebase client<br/>[firebase.ts]"]
  node_clock["Server clock<br/>[useServerClock.ts]"]
  node_time["Time rules<br/>[time.ts]"]
  node_feedlib["Feed client<br/>[feed.ts]"]
end

subgraph group_backend["Wish backend"]
  node_validation["Request validation<br/>[validation.ts]"]
  node_eligibility["Posting eligibility<br/>[index.ts]"]
  node_submission["Wish submission<br/>[index.ts]"]
  node_feedquery["Daily feed query<br/>[index.ts]"]
  node_history["Personal journal query<br/>[index.ts]"]
  node_privateimage["Private image delivery<br/>[index.ts]"]
end

subgraph group_firebase["Firebase services"]
  node_firestore[("Firestore")]
  node_storage[("Cloud Storage")]
  node_authservice["Firebase Auth"]
end

node_user(("App user"))

node_user -->|"checks time"| node_gate
node_user -->|"composes wish"| node_compose
node_user -->|"browses feed"| node_daily
node_user -->|"views journal"| node_journal
node_gate -->|"reads time"| node_clock
node_gate -->|"checks window"| node_time
node_compose -->|"reads time"| node_clock
node_compose -->|"saves draft"| node_drafts
node_compose -->|"checks and submits"| node_clientfb
node_daily -->|"loads pages"| node_feedlib
node_journal -->|"loads history"| node_feedlib
node_clock -->|"gets server time"| node_clientfb
node_feedlib -->|"derives day"| node_time
node_feedlib -->|"requests feed"| node_clientfb
node_clientfb -->|"authenticates"| node_authservice
node_clientfb -->|"uploads photos"| node_storage
node_clientfb -->|"calls eligibility"| node_eligibility
node_clientfb -->|"calls submission"| node_submission
node_clientfb -->|"calls feed"| node_feedquery
node_clientfb -->|"calls journal"| node_history
node_clientfb -->|"requests image"| node_privateimage
node_eligibility -->|"validates inputs"| node_validation
node_submission -->|"validates inputs"| node_validation
node_feedquery -.->|"validates inputs"| node_validation
node_history -.->|"validates inputs"| node_validation
node_eligibility -->|"checks claims"| node_firestore
node_submission -->|"writes claim and wish"| node_firestore
node_feedquery -->|"reads wishes"| node_firestore
node_history -->|"reads owned wishes"| node_firestore
node_submission -->|"verifies photo"| node_storage
node_privateimage -->|"serves private image"| node_storage

click node_gate "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/index.tsx"
click node_compose "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/compose.tsx"
click node_daily "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/feed.tsx"
click node_journal "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/my-wishes.tsx"
click node_drafts "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/lib/drafts.ts"
click node_clientfb "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/lib/firebase.ts"
click node_clock "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/utils/useServerClock.ts"
click node_time "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/utils/time.ts"
click node_feedlib "https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/lib/feed.ts"
click node_validation "https://github.com/aristostheo/eleven11/blob/master/functions/src/validation.ts"
click node_eligibility "https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts"
click node_submission "https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts"
click node_feedquery "https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts"
click node_history "https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts"
click node_privateimage "https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gate,node_compose,node_daily,node_journal,node_user toneBlue
class node_drafts,node_clientfb,node_clock,node_time,node_feedlib toneAmber
class node_validation,node_eligibility,node_submission,node_feedquery,node_history,node_privateimage toneMint
class node_firestore,node_storage,node_authservice toneRose
```

## Components

### Mobile experience

- [Clock gate](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/index.tsx): `apps/mobile/app/index.tsx`
- [Wish composer](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/compose.tsx): `apps/mobile/app/compose.tsx`
- [Daily feed](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/feed.tsx): `apps/mobile/app/feed.tsx`
- [My wishes](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/app/my-wishes.tsx): `apps/mobile/app/my-wishes.tsx`

### Client services

- [Draft persistence](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/lib/drafts.ts): `apps/mobile/src/lib/drafts.ts`
- [Firebase client](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/lib/firebase.ts): `apps/mobile/src/lib/firebase.ts`
- [Server clock](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/utils/useServerClock.ts): `apps/mobile/src/utils/useServerClock.ts`
- [Time rules](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/utils/time.ts): `apps/mobile/src/utils/time.ts`
- [Feed client](https://github.com/aristostheo/eleven11/blob/master/apps/mobile/src/lib/feed.ts): `apps/mobile/src/lib/feed.ts`

### Wish backend

- [Request validation](https://github.com/aristostheo/eleven11/blob/master/functions/src/validation.ts): `functions/src/validation.ts`
- [Posting eligibility](https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts): `functions/src/index.ts`
- [Wish submission](https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts): `functions/src/index.ts`
- [Daily feed query](https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts): `functions/src/index.ts`
- [Personal journal query](https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts): `functions/src/index.ts`
- [Private image delivery](https://github.com/aristostheo/eleven11/blob/master/functions/src/index.ts): `functions/src/index.ts`

### Firebase services

- **Firestore**
- **Cloud Storage**
- **Firebase Auth**

### Other components

- **App user**

## Connections

- App user → Clock gate: checks time (evidence: `apps/mobile/app/index.tsx`)
- App user → Wish composer: composes wish (evidence: `README.md`)
- App user → Daily feed: browses feed (evidence: `README.md`)
- App user → My wishes: views journal (evidence: `README.md`)
- Clock gate → Server clock: reads time (evidence: `apps/mobile/app/index.tsx`)
- Clock gate → Time rules: checks window (evidence: `apps/mobile/app/index.tsx`)
- Wish composer → Server clock: reads time (evidence: `apps/mobile/app/compose.tsx`)
- Wish composer → Draft persistence: saves draft (evidence: `apps/mobile/app/compose.tsx`)
- Wish composer → Firebase client: checks and submits (evidence: `apps/mobile/app/compose.tsx`)
- Daily feed → Feed client: loads pages (evidence: `apps/mobile/app/feed.tsx`)
- My wishes → Feed client: loads history (evidence: `README.md`)
- Server clock → Firebase client: gets server time (evidence: `apps/mobile/src/utils/useServerClock.ts`)
- Feed client → Time rules: derives day (evidence: `apps/mobile/src/lib/feed.ts`)
- Feed client → Firebase client: requests feed (evidence: `apps/mobile/src/lib/feed.ts`)
- Firebase client → Firebase Auth: authenticates (evidence: `apps/mobile/src/lib/firebase.ts`)
- Firebase client → Cloud Storage: uploads photos (evidence: `apps/mobile/src/lib/firebase.ts`)
- Firebase client → Posting eligibility: calls eligibility (evidence: `apps/mobile/src/lib/firebase.ts`)
- Firebase client → Wish submission: calls submission (evidence: `apps/mobile/src/lib/firebase.ts`)
- Firebase client → Daily feed query: calls feed (evidence: `apps/mobile/src/lib/firebase.ts`)
- Firebase client → Personal journal query: calls journal (evidence: `apps/mobile/src/lib/firebase.ts`)
- Firebase client → Private image delivery: requests image (evidence: `apps/mobile/src/lib/firebase.ts`)
- Posting eligibility → Request validation: validates inputs (evidence: `functions/src/index.ts`)
- Wish submission → Request validation: validates inputs (evidence: `functions/src/index.ts`)
- Daily feed query → Request validation: validates inputs (evidence: `functions/src/index.ts`)
- Personal journal query → Request validation: validates inputs (evidence: `functions/src/index.ts`)
- Posting eligibility → Firestore: checks claims (evidence: `functions/src/index.ts`)
- Wish submission → Firestore: writes claim and wish (evidence: `functions/src/index.ts`)
- Daily feed query → Firestore: reads wishes (evidence: `functions/src/index.ts`)
- Personal journal query → Firestore: reads owned wishes (evidence: `functions/src/index.ts`)
- Wish submission → Cloud Storage: verifies photo (evidence: `functions/src/index.ts`)
- Private image delivery → Cloud Storage: serves private image (evidence: `README.md`)
