···6677**This project is in active development and is NOT ready for production use.** Identity linking and authentication are now fully implemented with enterprise-grade security features. Stat syncing and other data collection features are planned but not yet implemented.
8899+## Affiliation & Hosting
1010+1111+This mod started out as a personal project by **Ewan Croft** — I built the early versions on my own while experimenting with Minecraft and the AT Protocol.
1212+1313+Later on, I joined the **Jolly Whoppers** coding group and the project became part of the group in that sense — shared context, shared people, same general ecosystem — but the repo itself is still under my own AT Protocol DID.
1414+1515+The code lives at **[https://tangled.org/ewancroft.uk/atproto-connect](https://tangled.org/ewancroft.uk/atproto-connect)**, which corresponds to my AT Protocol DID (**`did:plc:ofrbh253gwicbkc5nktqepol`**). The project is associated with Jolly Whoppers (group DID **[`did:plc:lwckcyzhyrufq4ytg2abji7d`](https://tangled.org/did:plc:lwckcyzhyrufq4ytg2abji7d)**), but it’s not moved under the group’s DID.
1616+1717+The project is hosted on **[Tangled](https://tangled.org/)**. I don’t run the infrastructure — I just started the project and maintain it.
1818+919## Overview
10201121atproto-connect aims to integrate Minecraft gameplay with the AT Protocol (the protocol powering Bluesky), allowing game data to be synced to AT Protocol lexicons. This enables decentralized storage and sharing of Minecraft data across the federated network.
···18281929**Basic Commands:**
20302121-- **`/atproto link <handle or DID>`** - Link your Minecraft UUID to your AT Protocol identity (no login required)
2222-- **`/atproto login <handle> <app-password>`** - Authenticate to enable data syncing
2323-- **`/atproto logout`** - Remove authentication (keeps identity link)
2424-- **`/atproto unlink`** - Remove identity link and authentication
2525-- **`/atproto whoami`** - View your linked identity and auth status
2626-- **`/atproto status`** - Quick status check
2727-- **`/atproto whois <player or handle>`** - Look up another player's identity
3131+* **`/atproto link <handle or DID>`** - Link your Minecraft UUID to your AT Protocol identity (no login required)
3232+* **`/atproto login <handle> <app-password>`** - Authenticate to enable data syncing
3333+* **`/atproto logout`** - Remove authentication (keeps identity link)
3434+* **`/atproto unlink`** - Remove identity link and authentication
3535+* **`/atproto whoami`** - View your linked identity and auth status
3636+* **`/atproto status`** - Quick status check
3737+* **`/atproto whois <player or handle>`** - Look up another player's identity
28382939**Example Workflow:**
3040···57675868The mod implements enterprise-grade security measures to protect player data and prevent abuse:
59696060-- **AES-256-GCM Encryption**: Session data encrypted at rest with server-specific keys
6161-- **Rate Limiting**: 3 authentication attempts per 15 minutes, 30-minute lockout on abuse
6262-- **Security Audit Logging**: All sensitive operations logged for monitoring
6363-- **Sanitized Error Messages**: No sensitive data exposed in error messages or logs
6464-- **Restricted File Permissions**: Owner-only access to configuration files
6565-- **Atomic File Writes**: Prevents corruption during saves
6666-- **Thread-Safe Operations**: Concurrent access protection for all shared data
6767-- **Automatic Token Refresh**: Access tokens refreshed before expiration
6868-- **Path Validation**: Protection against directory traversal attacks
7070+* **AES-256-GCM Encryption**: Session data encrypted at rest with server-specific keys
7171+* **Rate Limiting**: 3 authentication attempts per 15 minutes, 30-minute lockout on abuse
7272+* **Security Audit Logging**: All sensitive operations logged for monitoring
7373+* **Sanitized Error Messages**: No sensitive data exposed in error messages or logs
7474+* **Restricted File Permissions**: Owner-only access to configuration files
7575+* **Atomic File Writes**: Prevents corruption during saves
7676+* **Thread-Safe Operations**: Concurrent access protection for all shared data
7777+* **Automatic Token Refresh**: Access tokens refreshed before expiration
7878+* **Path Validation**: Protection against directory traversal attacks
69797080All passwords are handled securely - app passwords are never logged or stored (only the resulting JWT tokens are kept).
71817282### Key Features
73837474-- **Slingshot Integration**: Uses [Slingshot by Microcosm](https://slingshot.microcosm.blue) for fast, cached PDS resolution
7575-- **App Password Support**: Secure authentication using AT Protocol app passwords (never use your main password!)
7676-- **Automatic Token Refresh**: Access tokens are automatically refreshed before expiration
7777-- **Multi-PDS Support**: Works with any AT Protocol PDS, not just Bluesky
7878-- **Persistent Sessions**: Authentication survives server restarts
7979-- **Encrypted Storage**: Session data protected with AES-256-GCM encryption
8484+* **Slingshot Integration**: Uses [Slingshot by Microcosm](https://slingshot.microcosm.blue) for fast, cached PDS resolution
8585+* **App Password Support**: Secure authentication using AT Protocol app passwords (never use your main password!)
8686+* **Automatic Token Refresh**: Access tokens are automatically refreshed before expiration
8787+* **Multi-PDS Support**: Works with any AT Protocol PDS, not just Bluesky
8888+* **Persistent Sessions**: Authentication survives server restarts
8989+* **Encrypted Storage**: Session data protected with AES-256-GCM encryption
80908191### Getting an App Password
8292···88988999### Future Possibilities
901009191-- Automatic stat syncing at configurable intervals
9292-- Achievement announcements via AT Protocol feeds
9393-- Cross-server player reputation systems
9494-- Privacy controls for what data gets synced
9595-- In-game social features tied to AT Protocol identities
101101+* Automatic stat syncing at configurable intervals
102102+* Achievement announcements via AT Protocol feeds
103103+* Cross-server player reputation systems
104104+* Privacy controls for what data gets synced
105105+* In-game social features tied to AT Protocol identities
9610697107## Technical Stack
981089999-- **Minecraft Version**: 1.21.10
100100-- **Mod Loader**: Fabric API
101101-- **Protocol**: AT Protocol (atproto)
102102-- **Language**: Kotlin (with Java interop)
103103-- **Build System**: Gradle 8.x
104104-- **Dependencies**:
105105- - Fabric Loader 0.18.3
106106- - Fabric API 0.138.4+1.21.10
107107- - Fabric Language Kotlin 1.13.8+kotlin.2.3.0
108108- - kotlinx-serialization for JSON handling
109109- - kotlinx-coroutines for async operations
110110-- **Identity Resolution**: [Slingshot](https://slingshot.microcosm.blue) by Microcosm
111111-- **Authentication**: AT Protocol OAuth/App Passwords
109109+* **Minecraft Version**: 1.21.10
110110+* **Mod Loader**: Fabric API
111111+* **Protocol**: AT Protocol (atproto)
112112+* **Language**: Kotlin (with Java interop)
113113+* **Build System**: Gradle 8.x
114114+* **Dependencies**:
115115+116116+ * Fabric Loader 0.18.3
117117+ * Fabric API 0.138.4+1.21.10
118118+ * Fabric Language Kotlin 1.13.8+kotlin.2.3.0
119119+ * kotlinx-serialization for JSON handling
120120+ * kotlinx-coroutines for async operations
121121+* **Identity Resolution**: [Slingshot](https://slingshot.microcosm.blue) by Microcosm
122122+* **Authentication**: AT Protocol OAuth/App Passwords
112123113124## Installation
114125···177188178189The mod defines several AT Protocol lexicon schemas under the `com.jollywhoppers.minecraft.*` namespace:
179190180180-- **Player Profile** (`literal:self`) - Links Minecraft UUIDs to AT Protocol DIDs with privacy controls
181181-- **Player Stats** (`tid`) - Snapshots of player statistics for leaderboards
182182-- **Player Sessions** (`tid`) - Play session tracking (join/leave times)
183183-- **Achievements** (`tid`) - Records of earned achievements/advancements
184184-- **Leaderboards** (`tid`) - Pre-computed leaderboard entries
185185-- **Server Status** (`literal:self`) - Server information and status
191191+* **Player Profile** (`literal:self`) - Links Minecraft UUIDs to AT Protocol DIDs with privacy controls
192192+* **Player Stats** (`tid`) - Snapshots of player statistics for leaderboards
193193+* **Player Sessions** (`tid`) - Play session tracking (join/leave times)
194194+* **Achievements** (`tid`) - Records of earned achievements/advancements
195195+* **Leaderboards** (`tid`) - Pre-computed leaderboard entries
196196+* **Server Status** (`literal:self`) - Server information and status
186197187198See `src/main/resources/lexicons/README.md` for detailed schema documentation.
188199···243254244255**For Players:**
245256246246-- **Always use App Passwords**, never main account passwords
247247-- Create a unique app password for each Minecraft server
248248-- Revoke unused app passwords regularly
249249-- If you suspect compromise, revoke the app password immediately
257257+* **Always use App Passwords**, never main account passwords
258258+* Create a unique app password for each Minecraft server
259259+* Revoke unused app passwords regularly
260260+* If you suspect compromise, revoke the app password immediately
250261251262**For Server Operators:**
252263253253-- Secure the `config/atproto-connect/` directory with appropriate file permissions
254254-- Monitor `security-audit.log` for suspicious activity
255255-- Keep the `.encryption.key` file secure (never share or commit to version control)
256256-- Regular backups of configuration files
257257-- Update the mod regularly for security patches
264264+* Secure the `config/atproto-connect/` directory with appropriate file permissions
265265+* Monitor `security-audit.log` for suspicious activity
266266+* Keep the `.encryption.key` file secure (never share or commit to version control)
267267+* Regular backups of configuration files
268268+* Update the mod regularly for security patches
258269259270### Token Storage
260271261261-- **Location**: `config/atproto-connect/player-sessions.json`
262262-- **Encryption**: AES-256-GCM with server-specific key
263263-- **Contents**: Access and refresh JWTs for authenticated players
264264-- **Security**: Encrypted at rest, owner-only file permissions
265265-- **Lifetime**: Access tokens expire after ~2 hours, refresh tokens last longer
272272+* **Location**: `config/atproto-connect/player-sessions.json`
273273+* **Encryption**: AES-256-GCM with server-specific key
274274+* **Contents**: Access and refresh JWTs for authenticated players
275275+* **Security**: Encrypted at rest, owner-only file permissions
276276+* **Lifetime**: Access tokens expire after ~2 hours, refresh tokens last longer
266277267278### Rate Limiting
268279269280To prevent brute-force attacks:
270281271271-- **Maximum Attempts**: 3 failed login attempts
272272-- **Time Window**: 15 minutes
273273-- **Lockout Duration**: 30 minutes after exceeding limit
274274-- **Tracking**: Per-player UUID and per-identifier
282282+* **Maximum Attempts**: 3 failed login attempts
283283+* **Time Window**: 15 minutes
284284+* **Lockout Duration**: 30 minutes after exceeding limit
285285+* **Tracking**: Per-player UUID and per-identifier
275286276287### Security Audit Log
277288278289All security-sensitive operations are logged to `config/atproto-connect/security-audit.log`:
279290280280-- Authentication attempts (success/failure)
281281-- Rate limit violations
282282-- Session creation/deletion
283283-- Token refresh operations
284284-- Security errors
291291+* Authentication attempts (success/failure)
292292+* Rate limit violations
293293+* Session creation/deletion
294294+* Token refresh operations
295295+* Security errors
285296286297## Configuration Files
287298288299All configuration files are stored in `config/atproto-connect/`:
289300290290-- **`player-identities.json`** - UUID to DID/handle mappings (plaintext as these are both publicly accessible anyway)
291291-- **`player-sessions.json`** - Encrypted authentication sessions
292292-- **`.encryption.key`** - AES-256 encryption key (auto-generated, keep secure!)
293293-- **`security-audit.log`** - Security event log
301301+* **`player-identities.json`** - UUID to DID/handle mappings (plaintext as these are both publicly accessible anyway)
302302+* **`player-sessions.json`** - Encrypted authentication sessions
303303+* **`.encryption.key`** - AES-256 encryption key (auto-generated, keep secure!)
304304+* **`security-audit.log`** - Security event log
294305295306**Important**: Never commit `.encryption.key` or `player-sessions.json` to version control!
296307297308## Development Roadmap
298309299299-- [x] Design lexicon schemas for Minecraft data types
300300-- [x] Implement AT Protocol client with Slingshot integration
301301-- [x] Create identity linking system
302302-- [x] Implement authentication with app passwords
303303-- [x] Build session management with automatic token refresh
304304-- [x] Add encryption for session storage
305305-- [x] Implement rate limiting and security auditing
306306-- [ ] Build data collection hooks for player statistics
307307-- [ ] Implement authenticated record creation (writing stats)
308308-- [ ] Add automatic stat syncing at configurable intervals
309309-- [ ] Add privacy controls and data filtering options
310310-- [ ] Create example AppView for displaying Minecraft data
311311-- [ ] Implement OAuth device flow for better UX
312312-- [ ] Add DPoP support
313313-- [ ] Write comprehensive documentation
314314-- [ ] Add automated tests
315315-- [ ] Publish to Modrinth/CurseForge
310310+* [x] Design lexicon schemas for Minecraft data types
311311+* [x] Implement AT Protocol client with Slingshot integration
312312+* [x] Create identity linking system
313313+* [x] Implement authentication with app passwords
314314+* [x] Build session management with automatic token refresh
315315+* [x] Add encryption for session storage
316316+* [x] Implement rate limiting and security auditing
317317+* [ ] Build data collection hooks for player statistics
318318+* [ ] Implement authenticated record creation (writing stats)
319319+* [ ] Add automatic stat syncing at configurable intervals
320320+* [ ] Add privacy controls and data filtering options
321321+* [ ] Create example AppView for displaying Minecraft data
322322+* [ ] Implement OAuth device flow for better UX
323323+* [ ] Add DPoP support
324324+* [ ] Write comprehensive documentation
325325+* [ ] Add automated tests
326326+* [ ] Publish to Modrinth/CurseForge
316327317328## Contributing
318329···329340330341### AT Protocol
331342332332-- [AT Protocol Documentation](https://atproto.com/)
333333-- [Lexicon Specifications](https://atproto.com/specs/lexicon)
334334-- [XRPC API Reference](https://atproto.com/specs/xrpc)
335335-- [OAuth Specification](https://atproto.com/specs/oauth)
336336-- [Bluesky API Docs](https://docs.bsky.app/)
343343+* [AT Protocol Documentation](https://atproto.com/)
344344+* [Lexicon Specifications](https://atproto.com/specs/lexicon)
345345+* [XRPC API Reference](https://atproto.com/specs/xrpc)
346346+* [OAuth Specification](https://atproto.com/specs/oauth)
347347+* [Bluesky API Docs](https://docs.bsky.app/)
337348338349### Microcosm
339350340340-- [Slingshot Documentation](https://slingshot.microcosm.blue/)
341341-- [Microcosm Project](https://microcosm.blue/)
351351+* [Slingshot Documentation](https://slingshot.microcosm.blue/)
352352+* [Microcosm Project](https://microcosm.blue/)
342353343354### Minecraft Modding
344355345345-- [Fabric Documentation](https://fabricmc.net/wiki/)
346346-- [Fabric Language Kotlin](https://github.com/FabricMC/fabric-language-kotlin)
356356+* [Fabric Documentation](https://fabricmc.net/wiki/)
357357+* [Fabric Language Kotlin](https://github.com/FabricMC/fabric-language-kotlin)
347358348359## License
349360···360371361372## Acknowledgments
362373363363-- [Microcosm](https://microcosm.blue) for Slingshot, which makes PDS resolution fast and reliable
364364-- The AT Protocol team for building an open, decentralized social network protocol
365365-- The Fabric community for excellent mod development tools
366366-- The Kotlin community for a great language and ecosystem
374374+* [Microcosm](https://microcosm.blue) for Slingshot, which makes PDS resolution fast and reliable
375375+* The AT Protocol team for building an open, decentralized social network protocol
376376+* The Fabric community for excellent mod development tools
377377+* The Kotlin community for a great language and ecosystem
367378368379---
369380370370-**Version**: 0.4.0
371371-**Repository**: `git@tangled.sh:ewancroft.uk/atproto-connect`
381381+**Version**: 0.4.0
382382+**Repository**: `git@tangled.sh:ewancroft.uk/atproto-connect`
372383**Status**: Alpha - Not Production Ready