How libqwerty/auth-server works
Component Relationships
• External requests → Controllers
• Controllers → Use Cases
• Use Cases → Repositories
• Repositories → Database
• All layers → Domain (dependencies point inward)
Key Technical Elements
Infrastructure:
• PostgreSQL Database
• Prisma ORM
• FastAPI/Flask (based on app.py structure)
• Docker container
Security Components:
• Token Management
• Session Handling
• Password Encryption (utils/crypto.py)
• Access Logging
Additional Elements
Include:
• Configuration components (config/policy.py)
• Error handling paths
• External service integrations (if any)
Specific Implementation Details
Highlight:
• Database migrations (prisma/migrations)
• Policy configurations
• Docker deployment
• GitHub Actions workflow
• Component types
• Important symbols or patterns used
Level of Detail:
• Keep high-level architectural patterns visible
• Enough detail to understand the authentication flows
• Clear boundaries between layers
• Security-critical paths
1. This is a security-critical service, so emphasize the isolation and protection of sensitive components