How bdien/ludotheque works
Main Components
a. Frontend Layer (React Application)
• React application container
• Feature modules:
• User Management
• Inventory Management
• Loan Management
• Document Management
• Statistics/Reports
b. Backend Layer (FastAPI)
• API Server container
• Core service modules:
• Authentication/Users
• Bookings
• Items/Inventory
• Loans
• Ledger
• System Configuration
c. Data Layer
• Database (appears to use Peewee ORM)
• Storage system for game images
• Google Sheets integration (indicated by gsheets.py)
Component Relationships
• Frontend → Backend: REST API calls (shown by src/webui/src/api/calls.ts)
• Backend → Database: Peewee ORM interactions
• Backend → Storage: File system interactions for images
• Backend → External Services: Google Sheets API integration
Architectural Patterns to Highlight
• Clear separation of concerns (frontend/backend/data)
• RESTful API architecture
• Component-based frontend architecture (React)
• Service-based backend organization
Specific Implementation Details
Frontend (React):
• Component hierarchy
• State management (hooks/global_store.ts)
• UI component library (Material UI 5+)
Backend (FastAPI):
• Route handlers
• Service layers
• Authentication flow
• Email template system
Deployment Architecture
Deployment-specific components:
• Docker container (Dockerfile present)
• Nginx reverse proxy (setup/nginx.conf)
• Fly.io deployment (fly.toml)
External Services Layer
• Component types
• Important configuration files
• Testing coverage (src/tests_api)