Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
2aae1cd
Import iFarted project from Google Drive folder 18r18wIm0ftoZ1Pq-l2g2…
lin2mm Sep 11, 2026
4172779
Continue iFarted: scaffold v2 + server live + mobile MVP complete
lin2mm Sep 11, 2026
f1c6275
Continue iFarted: scaffold v3 — audio, icons, AdMob/IAP real wiring, …
lin2mm Sep 11, 2026
9565e98
Remove workflow for push (GitHub App lacks workflows permission)
lin2mm Sep 11, 2026
78e9667
Continue iFarted v4: metrics + enhanced web demo with real API flow
lin2mm Sep 11, 2026
e922839
Continue iFarted v5: admin dashboard + metrics + E2E sim + App Review…
lin2mm Sep 11, 2026
271dbfe
Continue iFarted v6: web client + security + persistent rate limit + …
lin2mm Sep 11, 2026
d4128c8
Continue iFarted v7: unit tests + error boundary + deep linking + PWA…
lin2mm Sep 11, 2026
39e2c74
Continue iFarted v8: admin HTML dashboard + API docs + contributing +…
lin2mm Sep 11, 2026
568ce05
Continue iFarted v9: security headers + graceful shutdown + release n…
lin2mm Sep 11, 2026
779b96f
Cleanup App.dark.jsx placeholder
lin2mm Sep 11, 2026
26a2fd8
Continue iFarted v11: sound variants + haptics + FartButton v2 + Admi…
lin2mm Sep 11, 2026
b6c3029
Continue iFarted v12: sound picker UI + deployment checklist v1.0 + f…
lin2mm Sep 11, 2026
96b95c7
Continue iFarted v13: privacy + terms + final v1.0 Alpha release notes
lin2mm Sep 11, 2026
3f11445
Continue iFarted v14: final README v4 + architecture + v1.0 Alpha sum…
lin2mm Sep 11, 2026
456ccc2
Add SHARE.md — how to share iFarted v0.14.0-alpha results
lin2mm Sep 11, 2026
f28de02
Add SHARE_CLEAN.md — clean share guide without arena
lin2mm Sep 11, 2026
78699b7
Remove all arena references — replace with ifarted clean branches
lin2mm Sep 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .clinerules/memory-bank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Cline's Memory Bank

I am Cline, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

## Memory Bank Structure

The Memory Bank consists of core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

### Core Files (Required)
1. `projectbrief.md`
- Foundation document that shapes all other files
- Created at project start if it doesn't exist
- Defines core requirements and goals
- Source of truth for project scope

2. `productContext.md`
- Why this project exists
- Problems it solves
- How it should work
- User experience goals

3. `activeContext.md`
- Current work focus
- Recent changes
- Next steps
- Active decisions and considerations
- Important patterns and preferences
- Learnings and project insights

4. `systemPatterns.md`
- System architecture
- Key technical decisions
- Design patterns in use
- Component relationships
- Critical implementation paths

5. `techContext.md`
- Technologies used
- Development setup
- Technical constraints
- Dependencies
- Tool usage patterns

6. `progress.md`
- What works
- What's left to build
- Current status
- Known issues
- Evolution of project decisions

### Additional Context
Create additional files/folders within memory-bank/ when they help organize:
- Complex feature documentation
- Integration specifications
- API documentation
- Testing strategies
- Deployment procedures

## Documentation Updates

Memory Bank updates occur when:
1. Discovering new project patterns
2. After implementing significant changes
3. When user requests with **update memory bank** (MUST review ALL files)
4. When context needs clarification

REMEMBER: After every memory reset, I begin completely fresh. The Memory Bank is my only link to previous work. It must be maintained with precision and clarity, as my effectiveness depends entirely on its accuracy.
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,36 @@ yarn-error.log*

# macOS
.DS_Store

# iFarted
apps/mobile/.expo
apps/mobile/node_modules
apps/mobile/dist
apps/mobile/*.jks
apps/mobile/*.p8
apps/mobile/*.p12
apps/mobile/*.key
apps/mobile/*.mobileprovision
apps/mobile/google-services.json
apps/mobile/GoogleService-Info.plist
apps/server/node_modules
apps/server/dist
apps/server/ifarted.db
apps/server/ifarted.db-wal
apps/server/ifarted.db-shm
apps/server/.env
apps/server/bun.lock
packages/*/node_modules
packages/*/dist
bun.lockb
.expo
.expo-shared
*.db
*.db-shm
*.db-wal
.env
.env.local
ifarted.db
ifarted.db-shm
ifarted.db-wal

152 changes: 152 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Contributing — iFarted + UDL Book

## For UDL Book Website (original)

See `src/README.md`.

```bash
npm install
npm run dev
npm run build
npm run lint
npm run format
```

## For iFarted (new)

### Prereqs

- Node 20+, Bun 1.4.2+, Expo CLI, EAS CLI
- iOS: Mac or EAS cloud build, Apple Developer $99/yr
- Android: Android Studio or EAS cloud build, Google Play $25 one-time, Firebase project for FCM

### Monorepo Structure

```
apps/mobile/ — Expo + TS + expo-router, 7 screens, Zustand, notifications, location, maps, AdMob, IAP
apps/server/ — Bun + Hono + SQLite, 13 endpoints, rate limiting, Expo Push relay, metrics, admin, E2E sim
apps/web/ — Vite React web demo, standalone, PWA, full flow register/search/add friend/fart/invite
packages/contracts/ — shared API types
memory-bank/ — 6 core files + research/yo-app.md (Cline memory bank)
.clinerules/ — Cline rules
src/components/IFarted/ — UDL website integration with web demo
```

### Quick Start

**Server:**

```bash
cd apps/server
npm install -g bun # workaround for bun.sh TLS block in some envs
bun install
bun src/db/migrate.ts
bun src/index.ts # :3000
# test
bun src/test.ts
bun src/e2e-sim.ts
bun test # unit tests
```

**Mobile:**

```bash
cd apps/mobile
npm install
npx expo start # Expo Go (limited push)
# For push testing, needs dev build:
eas build --profile development --platform all
npx expo start --dev-client
```

**Web Demo (standalone):**

```bash
cd apps/web
npm install
npm run dev # :5174
```

**UDL Website (with iFarted section):**

```bash
npm install
npm run dev # :5173/udlbook -> scroll to iFarted
npm run build
```

### Development Conventions

- **Tiny, single-purpose product** — resist feature creep, Yo research `research/yo-app.md` is reference for "does this serve the fart notification?"
- **Ads first, Remove Ads IAP second** — single gated `<AdBanner />` via `isAdFree` flag
- **Expo managed workflow + config plugins** — `app.json` source of truth, no eject
- **Server code stays Bun and Node-runnable** — keep bun-specific APIs optional (`bun:sqlite` try/catch), fallback to `better-sqlite3` or in-memory mock, so `node --loader tsx src/index.ts` works
- **One TS codebase for both stores** — platform differences only where push/permissions/sound demand it
- **TypeScript strict** — small feature folders
- **No PII leaks** — username search only public fields, contacts hashed, invite codes unguessable, no API keys in client source
- **Ephemeral by design** — no inbox/history/feed, notification IS message, messages table only for rate limiting/abuse

### Testing

- Server: `bun src/test.ts` (integration), `bun src/e2e-sim.ts` (E2E 2 users), `bun test` (unit crypto + rate-limit)
- Mobile: `npx tsc --noEmit` typecheck, real device testing early (push, sound, maps, location device-dependent)
- Web: `npm run build` for both UDL site and standalone web client
- UDL site: `npm run build` 133 modules

### Security

See `apps/server/SECURITY.md` for Yo hack lessons and mitigations.

- Every endpoint (except register/health/metrics) requires Bearer apiKey
- Rate limits + block list
- No P2P push
- Secrets via EAS env vars / .env git-ignored

### Monetization

- Free: AdMob banner on home, non-personalized first, no ATT
- Paid: one-time non-consumable Remove Ads IAP $1.99, restorable, store-billed
- Single gated `<AdBanner />` via `isAdFree` flag, entitlement source of truth = store state (RevenueCat favored)

### Branding / Audio

- Audio: placeholder `fart.wav` 1.2s (brown noise + sine sweep down 200→40Hz, envelope) copied to .caf/.mp3 + android raw, <30s for iOS, TODO pro sound final
- Icons: placeholder `icon.png`/`adaptive-icon.png`/`splash.png` (minimalist black bubble 💨), TODO pro final
- Ad placement: banner on home default, no interstitial before sending (blocks joke, review risk)
- Final store name: working iFarted, check trademark

### Deployment

See `DEPLOYMENT.md` for Docker/Fly.io/Railway/EAS + secrets + domain.

### App Review

See `apps/mobile/APP_REVIEW.md` for context-based messaging framing (Apple rejected Yo for "too simple").

### Store Checklist

See `apps/mobile/STORE_CHECKLIST.md` for branding, audio, App Store Connect, Play Console, Expo/EAS, deployment, privacy, monetization, testing, legal.

### Roadmap

See `ROADMAP.md` for v6 → v1.0 timeline.

### Memory Bank

Cline's memory bank is in `memory-bank/` (6 core files + research). After every memory reset, read ALL files. Update when discovering new patterns, after significant changes, when user requests "update memory bank" (must review ALL files), when context needs clarification.

### Import Note

This repo originally is [lin2mm/udlbook](https://github.com/lin2mm/udlbook) — UDL book website (Vite + React). iFarted planning docs imported from Google Drive folder `18r18wIm0ftoZ1Pq-l2g2MddqCf17sxsX` via embeddedfolderview workaround due to TLS blocks on drive.google.com.

Structure now: `src/` UDL site + `apps/mobile`, `apps/server`, `packages/contracts`, `apps/web` iFarted + `.clinerules/`, `memory-bank/` + `README.md` iFarted + `DEPLOYMENT.md`, `SECURITY.md`, `ROADMAP.md`, etc.

### License

- UDL book: see LICENSE (MIT)
- iFarted: TODO add license

### Contact

- For UDL book: Simon Prince
- For iFarted: see memory-bank
Loading