···1+# DID Monitor - AT Protocol DID Document Monitoring Service
2+3+A monitoring service for AT Protocol DID documents, transformed from the PDSls AT Protocol Explorer. This service helps users monitor their `did:plc` documents for unauthorized changes and receive alerts within the 72-hour window when PLC operations can still be nullified.
4+5+## Features
6+7+- **DID Registration**: Register your `did:plc` identifier for monitoring
8+- **Handle Autocomplete**: Reuses PDSls autocomplete functionality with user avatars
9+- **Daily Monitoring**: Automatically checks registered DIDs once daily for changes
10+- **Email Alerts**: Sends notifications when changes are detected within 72 hours
11+- **Dashboard**: View registered DIDs, monitoring status, and alert history
12+- **Local Storage**: Data stored in browser localStorage (no server required)
13+14+## How It Works
15+16+1. **Register Your DID**: Enter your AT Protocol handle or `did:plc` identifier
17+2. **Daily Checks**: The service fetches the PLC audit log from `https://plc.directory/{did}/log/audit`
18+3. **Change Detection**: Compares the latest operation with the last known state
19+4. **Alert System**: Sends browser notifications and email alerts for recent changes
20+5. **72-Hour Window**: Gives you time to nullify unauthorized PLC operations
21+22+## Usage
23+24+### Registration
25+26+1. Go to the "Register DID" tab
27+2. Enter your handle (e.g., `alice.bsky.social`) or DID
28+3. Use the autocomplete to select your identity
29+4. Enter your email address for notifications
30+5. Click "Register for Monitoring"
31+32+### Dashboard
33+34+- View all registered DIDs and their monitoring status
35+- Check when each DID was last monitored
36+- Manually trigger checks for specific DIDs
37+- Start/stop the monitoring service
38+- View alert history
39+40+## Development
41+42+### Start the Development Server
43+44+```bash
45+pnpm start
46+```
47+48+### Build for Production
49+50+```bash
51+pnpm build
52+```
53+54+## Technical Details
55+56+### Architecture
57+58+- **Frontend**: SolidJS with TypeScript
59+- **Storage**: Browser localStorage (no backend required)
60+- **PLC API**: Fetches from `https://plc.directory/{did}/log/audit`
61+- **Monitoring**: Client-side scheduler with 24-hour intervals
62+63+### Key Components
64+65+- `MonitoringView`: Main tabbed interface
66+- `RegistrationForm`: DID registration with autocomplete
67+- `MonitoringDashboard`: Status and management interface
68+- `DidInput`: Reused autocomplete component from PDSls
69+- `MonitoringScheduler`: Daily check scheduling
70+- `PlcMonitoringService`: PLC directory API integration
71+- `EmailNotificationService`: Alert system
72+73+### Data Flow
74+75+1. User registers DID with email
76+2. Scheduler runs daily checks
77+3. Fetches latest PLC operation
78+4. Compares with stored state
79+5. Sends alerts for changes within 72 hours
80+6. Updates stored state
81+82+## Limitations
83+84+- Only supports `did:plc` identifiers
85+- Uses browser notifications (email integration would require backend)
86+- Data stored locally (no sync across devices)
87+- Requires browser to be open for monitoring (in production, would need background service)
88+89+## Production Considerations
90+91+For a production deployment, consider:
92+93+- Backend database for persistent storage
94+- Real email service integration (SendGrid, AWS SES)
95+- Background worker service for monitoring
96+- User authentication and account management
97+- Push notification service for mobile
98+- Proper error handling and retry logic
99+100+## Original PDSls Features
101+102+The original AT Protocol Explorer features are still available at `/explorer`:
103+104+- PDS exploration and browsing
105+- Record viewing and editing
106+- Jetstream/Firehose monitoring
107+- AT Protocol debugging tools
108+109+## License
110+111+Licensed under 0BSD (same as original PDSls project).