QuickDID#
QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides blazing-fast handle-to-DID resolution with intelligent caching strategies, supporting both in-memory and Redis-backed persistent caching with binary serialization for optimal storage efficiency.
⚠️ Production Disclaimer#
This project is a release candidate and has not been fully vetted for production use. While it includes comprehensive error handling and has been designed with production features in mind, more thorough testing is necessary before deploying in critical environments. Use at your own risk and conduct appropriate testing for your use case.
Features#
- Fast Handle Resolution: Resolves AT Protocol handles to DIDs using DNS TXT records and HTTP well-known endpoints
- Multi-Layer Caching: In-memory caching with configurable TTL and Redis-backed persistent caching (90-day TTL)
- Binary Serialization: Compact storage format reduces cache size by ~40% compared to JSON
- Queue Processing: Asynchronous handle resolution with support for MPSC and Redis queue adapters
- AT Protocol Compatible: Implements XRPC endpoints for seamless integration with AT Protocol infrastructure
- Comprehensive Error Handling: Includes health checks and graceful shutdown support
Building#
Prerequisites#
- Rust 1.70 or later
- Redis (optional, for persistent caching and distributed queuing)
Build Commands#
# Clone the repository
git clone https://github.com/yourusername/quickdid.git
cd quickdid
# Build the project
cargo build --release
# Run tests
cargo test
# Run with debug logging
RUST_LOG=debug cargo run
Minimum Configuration#
QuickDID requires the following environment variables to run:
Required#
HTTP_EXTERNAL: External hostname for service endpoints (e.g.,localhost:3007)SERVICE_KEY: Private key for service identity in DID format (e.g.,did:key:z42tmZxD2mi1TfMKSFrsRfednwdaaPNZiiWHP4MPgcvXkDWK)
Example Minimal Setup#
HTTP_EXTERNAL=localhost:3007 \
SERVICE_KEY=did:key:z42tmZxD2mi1TfMKSFrsRfednwdaaPNZiiWHP4MPgcvXkDWK \
cargo run
This will start QuickDID with:
- HTTP server on port 8080 (default)
- In-memory caching only
- MPSC queue adapter for async processing
- Connection to plc.directory for DID resolution
Optional Configuration#
For production deployments, consider these additional environment variables:
HTTP_PORT: Server port (default: 8080)REDIS_URL: Redis connection URL for persistent caching (e.g.,redis://localhost:6379)QUEUE_ADAPTER: Queue type - 'mpsc' or 'redis' (default: mpsc)PLC_HOSTNAME: PLC directory hostname (default: plc.directory)RUST_LOG: Logging level (e.g., debug, info, warn, error)
Production Example#
HTTP_EXTERNAL=quickdid.example.com \
SERVICE_KEY=did:key:yourkeyhere \
HTTP_PORT=3000 \
REDIS_URL=redis://localhost:6379 \
QUEUE_ADAPTER=redis \
RUST_LOG=info \
./target/release/quickdid
API Endpoints#
GET /_health- Health check endpointGET /xrpc/com.atproto.identity.resolveHandle- Resolve handle to DIDGET /.well-known/atproto-did- Serve DID document for the service
License#
This project is open source and available under the MIT License.
Copyright (c) 2025 Nick Gerakines
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.