···1-# ATProto Personal Website
23-A personal website powered by ATProto, featuring real-time streaming, repository browsing, and type generation.
45## Features
67-### 🚀 Real-time Streaming
8-- **Jetstream Test** (`/jetstream-test`): Real-time ATProto streaming with DID filtering
9-- Uses the same jetstream endpoint as atptools for low-latency updates
10-- Filters by your configured DID for personalized streaming
0001112-### 🌐 Repository Browsing
13-- **ATProto Browser Test** (`/atproto-browser-test`): Browse any ATProto account's collections and records
14-- Discover all collections in a repository
15-- View records from specific collections
16-- Similar functionality to atptools
0000000000001718-### 📝 Type Generation
19-- **Lexicon Generator Test** (`/lexicon-generator-test`): Generate TypeScript types for all lexicons in your repository
20-- Automatically discovers all lexicon types from your configured account
21-- Generates proper TypeScript interfaces and helper functions
22-- Copy to clipboard or download as `.ts` file
2324-### 🖼️ Image Galleries
25-- **Image Galleries** (`/galleries`): View grain.social image galleries and photo collections
002627-## Configuration
2829-The site is configured to use your ATProto account:
3031-- **Handle**: `tynanpurdy.com`
32-- **DID**: `did:plc:6ayddqghxhciedbaofoxkcbs`
33-- **PDS**: `https://bsky.social`
03435-## Development
3637-```bash
38-npm install
39-npm run dev
40-```
4142-Visit `http://localhost:4324` to see the site.
00004344## Project Structure
4546```
47src/
48-├── lib/atproto/
49-│ ├── atproto-browser.ts # Repository browsing functionality
50-│ ├── jetstream-client.ts # Real-time streaming client
51-│ └── client.ts # Basic ATProto client
52-├── pages/
53-│ ├── index.astro # Homepage with navigation
54-│ ├── jetstream-test.astro # Real-time streaming test
55-│ ├── atproto-browser-test.astro # Repository browsing test
56-│ ├── lexicon-generator-test.astro # Type generation test
57-│ └── galleries.astro # Image galleries
58-└── components/
59- └── content/ # Content display components
60```
6162-## Technologies
6364-- **Astro**: Web framework
65-- **ATProto API**: For repository access and streaming
66-- **TypeScript**: For type safety
67-- **Tailwind CSS**: For styling
00000000000006869-## Inspired By
7071-This project takes inspiration from [atptools](https://github.com/espeon/atptools) for repository browsing and jetstream streaming approaches.
00000000
···1+# ATproto Personal Website
23+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.
45## Features
67+- **Type-Safe Content**: Automatic TypeScript type generation from ATproto lexicon schemas
8+- **Real-Time Updates**: Live content streaming via ATproto Jetstream
9+- **Component Registry**: Type-safe mapping of lexicon types to Astro components
10+- **Dynamic Routing**: Automatic component selection based on record types
11+- **Blog Support**: Full blog post rendering with markdown support
12+- **Gallery Display**: Image galleries with EXIF data and hover effects
13+- **Pagination**: Fetch more than 100 records with cursor-based pagination
1415+## Quick Start
16+17+1. **Configure Environment**:
18+ ```bash
19+ cp env.example .env
20+ # Edit .env with your ATproto handle and DID
21+ ```
22+23+2. **Install Dependencies**:
24+ ```bash
25+ npm install
26+ ```
27+28+3. **Add Lexicon Schemas**:
29+ - Place JSON lexicon schemas in `src/lexicons/`
30+ - Update `src/lib/config/site.ts` with your lexicon sources
31+ - Run `npm run gen:types` to generate TypeScript types
3233+4. **Create Components**:
34+ - Create Astro components in `src/components/content/`
35+ - Register them in `src/lib/components/registry.ts`
36+ - Use `ContentDisplay.astro` for automatic routing
03738+5. **Start Development**:
39+ ```bash
40+ npm run dev
41+ ```
4243+## Lexicon Integration
4445+The system provides full type safety for ATproto lexicons:
4647+1. **Schema Files**: JSON lexicon definitions in `src/lexicons/`
48+2. **Type Generation**: Automatic TypeScript type generation
49+3. **Component Registry**: Type-safe mapping of lexicon types to components
50+4. **Content Display**: Dynamic component routing
5152+See [LEXICON_INTEGRATION.md](./LEXICON_INTEGRATION.md) for detailed instructions.
5354+## Available Scripts
0005556+- `npm run dev` - Start development server
57+- `npm run build` - Build for production
58+- `npm run preview` - Preview production build
59+- `npm run discover` - Discover collections from your repo
60+- `npm run gen:types` - Generate TypeScript types from lexicon schemas
6162## Project Structure
6364```
65src/
66+├── components/content/ # Content display components
67+├── lib/
68+│ ├── atproto/ # ATproto client and utilities
69+│ ├── components/ # Component registry
70+│ ├── config/ # Site configuration
71+│ ├── generated/ # Generated TypeScript types
72+│ ├── services/ # Content services
73+│ └── types/ # Type definitions
74+├── lexicons/ # Lexicon schema files
75+└── pages/ # Astro pages
0076```
7778+## Configuration
7980+The system is configured via environment variables and `src/lib/config/site.ts`:
81+82+- `ATPROTO_HANDLE` - Your Bluesky handle
83+- `ATPROTO_DID` - Your DID (optional, auto-resolved)
84+- `SITE_TITLE` - Site title
85+- `SITE_DESCRIPTION` - Site description
86+- `SITE_AUTHOR` - Site author
87+88+## Adding New Content Types
89+90+1. Create a lexicon schema in `src/lexicons/`
91+2. Add it to `lexiconSources` in site config
92+3. Run `npm run gen:types`
93+4. Create a component in `src/components/content/`
94+5. Register it in `src/lib/components/registry.ts`
95+96+The system will automatically route records to your components with full type safety.
9798+## Development
99100+- Debug mode shows component routing information
101+- Generic fallback for unknown record types
102+- Real-time updates via Jetstream
103+- Type-safe component registry
104+- Automatic type generation from schemas
105+106+## License
107+108+MIT