···11+# OpnShelf
22+33+A personal media tracker built on the AT Protocol. Track movies you've watched and discover what others are watching - all while owning your data.
44+55+## Tech Stack
66+77+- **Backend**: NestJS + OpenAPI + PostgreSQL
88+- **Web**: TanStack Start
99+- **Mobile**: Expo / React Native
1010+- **Protocol**: AT Protocol (decentralized data storage)
1111+- **Monorepo**: pnpm workspaces + Turbo
1212+1313+## Project Structure
1414+1515+```
1616+opnshelf/
1717+├── apps/
1818+│ ├── web/ # TanStack Start web app
1919+│ └── mobile/ # Expo mobile app
2020+├── packages/
2121+│ ├── api/ # Shared API client (OpenAPI generated types)
2222+│ └── types/ # Shared TypeScript types
2323+└── backend/ # NestJS API + Firehose indexer
2424+```
2525+2626+## Getting Started
2727+2828+### Prerequisites
2929+3030+- Node.js 18+
3131+- pnpm
3232+- PostgreSQL (Railway recommended)
3333+3434+### Setup
3535+3636+1. Clone and install dependencies:
3737+```bash
3838+pnpm install
3939+```
4040+4141+2. Configure environment variables:
4242+```bash
4343+# backend/.env
4444+DATABASE_URL="postgresql://..."
4545+TMDB_API_KEY="..."
4646+```
4747+4848+3. Run database migrations:
4949+```bash
5050+pnpm prisma:migrate
5151+```
5252+5353+4. Start development servers:
5454+```bash
5555+# All services
5656+pnpm dev
5757+5858+# Or individually
5959+pnpm dev:backend
6060+pnpm dev:web
6161+pnpm dev:mobile
6262+```
6363+6464+### Generate API Types
6565+6666+After backend changes:
6767+```bash
6868+pnpm generate:api
6969+```
7070+7171+## MVP Features
7272+7373+- Movie search (TMDB)
7474+- Track watched movies (stored in AT Protocol)
7575+- Browse trending/popular movies (no login required)
7676+- AT Protocol OAuth authentication
7777+- Dark mode with Material You inspired design
7878+7979+## Architecture
8080+8181+Users track movies which are stored as AT Protocol records in their personal data repository. The backend subscribes to the AT Protocol firehose to index public records, enabling discovery and social features while users maintain ownership of their data.
8282+8383+## License
8484+8585+MIT