···11-# ATProto Personal Website
11+# ATproto Personal Website
2233-A personal website powered by ATProto, featuring real-time streaming, repository browsing, and type generation.
33+A personal website built with Astro that uses your ATproto repository as a CMS. Features full type safety, real-time updates, and automatic component routing.
4455## Features
6677-### 🚀 Real-time Streaming
88-- **Jetstream Test** (`/jetstream-test`): Real-time ATProto streaming with DID filtering
99-- Uses the same jetstream endpoint as atptools for low-latency updates
1010-- Filters by your configured DID for personalized streaming
77+- **Type-Safe Content**: Automatic TypeScript type generation from ATproto lexicon schemas
88+- **Real-Time Updates**: Live content streaming via ATproto Jetstream
99+- **Component Registry**: Type-safe mapping of lexicon types to Astro components
1010+- **Dynamic Routing**: Automatic component selection based on record types
1111+- **Blog Support**: Full blog post rendering with markdown support
1212+- **Gallery Display**: Image galleries with EXIF data and hover effects
1313+- **Pagination**: Fetch more than 100 records with cursor-based pagination
11141212-### 🌐 Repository Browsing
1313-- **ATProto Browser Test** (`/atproto-browser-test`): Browse any ATProto account's collections and records
1414-- Discover all collections in a repository
1515-- View records from specific collections
1616-- Similar functionality to atptools
1515+## Quick Start
1616+1717+1. **Configure Environment**:
1818+ ```bash
1919+ cp env.example .env
2020+ # Edit .env with your ATproto handle and DID
2121+ ```
2222+2323+2. **Install Dependencies**:
2424+ ```bash
2525+ npm install
2626+ ```
2727+2828+3. **Add Lexicon Schemas**:
2929+ - Place JSON lexicon schemas in `src/lexicons/`
3030+ - Update `src/lib/config/site.ts` with your lexicon sources
3131+ - Run `npm run gen:types` to generate TypeScript types
17321818-### 📝 Type Generation
1919-- **Lexicon Generator Test** (`/lexicon-generator-test`): Generate TypeScript types for all lexicons in your repository
2020-- Automatically discovers all lexicon types from your configured account
2121-- Generates proper TypeScript interfaces and helper functions
2222-- Copy to clipboard or download as `.ts` file
3333+4. **Create Components**:
3434+ - Create Astro components in `src/components/content/`
3535+ - Register them in `src/lib/components/registry.ts`
3636+ - Use `ContentDisplay.astro` for automatic routing
23372424-### 🖼️ Image Galleries
2525-- **Image Galleries** (`/galleries`): View grain.social image galleries and photo collections
3838+5. **Start Development**:
3939+ ```bash
4040+ npm run dev
4141+ ```
26422727-## Configuration
4343+## Lexicon Integration
28442929-The site is configured to use your ATProto account:
4545+The system provides full type safety for ATproto lexicons:
30463131-- **Handle**: `tynanpurdy.com`
3232-- **DID**: `did:plc:6ayddqghxhciedbaofoxkcbs`
3333-- **PDS**: `https://bsky.social`
4747+1. **Schema Files**: JSON lexicon definitions in `src/lexicons/`
4848+2. **Type Generation**: Automatic TypeScript type generation
4949+3. **Component Registry**: Type-safe mapping of lexicon types to components
5050+4. **Content Display**: Dynamic component routing
34513535-## Development
5252+See [LEXICON_INTEGRATION.md](./LEXICON_INTEGRATION.md) for detailed instructions.
36533737-```bash
3838-npm install
3939-npm run dev
4040-```
5454+## Available Scripts
41554242-Visit `http://localhost:4324` to see the site.
5656+- `npm run dev` - Start development server
5757+- `npm run build` - Build for production
5858+- `npm run preview` - Preview production build
5959+- `npm run discover` - Discover collections from your repo
6060+- `npm run gen:types` - Generate TypeScript types from lexicon schemas
43614462## Project Structure
45634664```
4765src/
4848-├── lib/atproto/
4949-│ ├── atproto-browser.ts # Repository browsing functionality
5050-│ ├── jetstream-client.ts # Real-time streaming client
5151-│ └── client.ts # Basic ATProto client
5252-├── pages/
5353-│ ├── index.astro # Homepage with navigation
5454-│ ├── jetstream-test.astro # Real-time streaming test
5555-│ ├── atproto-browser-test.astro # Repository browsing test
5656-│ ├── lexicon-generator-test.astro # Type generation test
5757-│ └── galleries.astro # Image galleries
5858-└── components/
5959- └── content/ # Content display components
6666+├── components/content/ # Content display components
6767+├── lib/
6868+│ ├── atproto/ # ATproto client and utilities
6969+│ ├── components/ # Component registry
7070+│ ├── config/ # Site configuration
7171+│ ├── generated/ # Generated TypeScript types
7272+│ ├── services/ # Content services
7373+│ └── types/ # Type definitions
7474+├── lexicons/ # Lexicon schema files
7575+└── pages/ # Astro pages
6076```
61776262-## Technologies
7878+## Configuration
63796464-- **Astro**: Web framework
6565-- **ATProto API**: For repository access and streaming
6666-- **TypeScript**: For type safety
6767-- **Tailwind CSS**: For styling
8080+The system is configured via environment variables and `src/lib/config/site.ts`:
8181+8282+- `ATPROTO_HANDLE` - Your Bluesky handle
8383+- `ATPROTO_DID` - Your DID (optional, auto-resolved)
8484+- `SITE_TITLE` - Site title
8585+- `SITE_DESCRIPTION` - Site description
8686+- `SITE_AUTHOR` - Site author
8787+8888+## Adding New Content Types
8989+9090+1. Create a lexicon schema in `src/lexicons/`
9191+2. Add it to `lexiconSources` in site config
9292+3. Run `npm run gen:types`
9393+4. Create a component in `src/components/content/`
9494+5. Register it in `src/lib/components/registry.ts`
9595+9696+The system will automatically route records to your components with full type safety.
68976969-## Inspired By
9898+## Development
70997171-This project takes inspiration from [atptools](https://github.com/espeon/atptools) for repository browsing and jetstream streaming approaches.
100100+- Debug mode shows component routing information
101101+- Generic fallback for unknown record types
102102+- Real-time updates via Jetstream
103103+- Type-safe component registry
104104+- Automatic type generation from schemas
105105+106106+## License
107107+108108+MIT