···11+# DID Monitor - AT Protocol DID Document Monitoring Service
22+33+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.
44+55+## Features
66+77+- **DID Registration**: Register your `did:plc` identifier for monitoring
88+- **Handle Autocomplete**: Reuses PDSls autocomplete functionality with user avatars
99+- **Daily Monitoring**: Automatically checks registered DIDs once daily for changes
1010+- **Email Alerts**: Sends notifications when changes are detected within 72 hours
1111+- **Dashboard**: View registered DIDs, monitoring status, and alert history
1212+- **Local Storage**: Data stored in browser localStorage (no server required)
1313+1414+## How It Works
1515+1616+1. **Register Your DID**: Enter your AT Protocol handle or `did:plc` identifier
1717+2. **Daily Checks**: The service fetches the PLC audit log from `https://plc.directory/{did}/log/audit`
1818+3. **Change Detection**: Compares the latest operation with the last known state
1919+4. **Alert System**: Sends browser notifications and email alerts for recent changes
2020+5. **72-Hour Window**: Gives you time to nullify unauthorized PLC operations
2121+2222+## Usage
2323+2424+### Registration
2525+2626+1. Go to the "Register DID" tab
2727+2. Enter your handle (e.g., `alice.bsky.social`) or DID
2828+3. Use the autocomplete to select your identity
2929+4. Enter your email address for notifications
3030+5. Click "Register for Monitoring"
3131+3232+### Dashboard
3333+3434+- View all registered DIDs and their monitoring status
3535+- Check when each DID was last monitored
3636+- Manually trigger checks for specific DIDs
3737+- Start/stop the monitoring service
3838+- View alert history
3939+4040+## Development
4141+4242+### Start the Development Server
4343+4444+```bash
4545+pnpm start
4646+```
4747+4848+### Build for Production
4949+5050+```bash
5151+pnpm build
5252+```
5353+5454+## Technical Details
5555+5656+### Architecture
5757+5858+- **Frontend**: SolidJS with TypeScript
5959+- **Storage**: Browser localStorage (no backend required)
6060+- **PLC API**: Fetches from `https://plc.directory/{did}/log/audit`
6161+- **Monitoring**: Client-side scheduler with 24-hour intervals
6262+6363+### Key Components
6464+6565+- `MonitoringView`: Main tabbed interface
6666+- `RegistrationForm`: DID registration with autocomplete
6767+- `MonitoringDashboard`: Status and management interface
6868+- `DidInput`: Reused autocomplete component from PDSls
6969+- `MonitoringScheduler`: Daily check scheduling
7070+- `PlcMonitoringService`: PLC directory API integration
7171+- `EmailNotificationService`: Alert system
7272+7373+### Data Flow
7474+7575+1. User registers DID with email
7676+2. Scheduler runs daily checks
7777+3. Fetches latest PLC operation
7878+4. Compares with stored state
7979+5. Sends alerts for changes within 72 hours
8080+6. Updates stored state
8181+8282+## Limitations
8383+8484+- Only supports `did:plc` identifiers
8585+- Uses browser notifications (email integration would require backend)
8686+- Data stored locally (no sync across devices)
8787+- Requires browser to be open for monitoring (in production, would need background service)
8888+8989+## Production Considerations
9090+9191+For a production deployment, consider:
9292+9393+- Backend database for persistent storage
9494+- Real email service integration (SendGrid, AWS SES)
9595+- Background worker service for monitoring
9696+- User authentication and account management
9797+- Push notification service for mobile
9898+- Proper error handling and retry logic
9999+100100+## Original PDSls Features
101101+102102+The original AT Protocol Explorer features are still available at `/explorer`:
103103+104104+- PDS exploration and browsing
105105+- Record viewing and editing
106106+- Jetstream/Firehose monitoring
107107+- AT Protocol debugging tools
108108+109109+## License
110110+111111+Licensed under 0BSD (same as original PDSls project).