How aswin-haridas/bigshelf works
BigShelf is a photo library with a React frontend and FastAPI backend. Users can register or sign in, upload and browse photos, preview and delete them, and organize them into albums; the documented backend also provides session rotation, S3-backed media, and cleanup of queued deletions. The graph follows sampled frontend requests and authentication/session code, plus capabilities stated in the backend API description. Album and photo endpoint internals were not sampled, so their detailed wiring is not inferred.
Main entry points: App.tsx Route application · api.ts HTTP client · database.py Database sessions and engine · auth.py Authentication endpoints
Components 26
Web client
- Route application
frontend/src/App.tsx - Login and registration
frontend/src/modules/auth - Authentication state
frontend/src/stores/authStore.ts - Photo library view
frontend/src/modules/home/home.tsx - Batch upload
frontend/src/modules/home/useUpload.ts - Photo preview
frontend/src/modules/home/preview.tsx - Album view
frontend/src/modules/albums/albums.tsx - HTTP client
frontend/src/lib/api.ts
API and identity
- FastAPI application
backend/app/main.py - Versioned API router
backend/app/api/v1/api.py - Authentication endpoints
backend/app/api/v1/endpoints/auth.py - Token and password security
backend/app/core/security.py - User persistence
backend/app/crud/crud_user.py - Session persistence
backend/app/crud/crud_session.py
Photo organization
- Photo endpoints
backend/app/api/v1/endpoints/photos.py - Album endpoints
backend/app/api/v1/endpoints/albums.py - Photo persistence
backend/app/crud/crud_photo.py - Album persistence
backend/app/crud/crud_album.py - Image validation and thumbnails
backend/app/core/imaging.py
Persistence and cleanup
- Database sessions and engine
backend/app/core/database.py - Relational database
- S3 storage client
backend/app/core/s3.py - S3-compatible object storage
- Queued object cleanup
backend/app/services/deletion_worker.py - Deletion queue records
backend/app/models/deletion_queue.py
Other components
- Library user
Connections 25
- Library user → Route application: uses
- Route application → Login and registration: routes to
- Route application → Photo library view: routes to
- Route application → Photo preview: routes to
- Route application → Album view: routes to
- Login and registration → Authentication state: submits credentials
- Authentication state → HTTP client: sends requests
- Batch upload → HTTP client: uploads batches
- Photo preview → HTTP client: deletes photo
- HTTP client → FastAPI application: sends API requests
- FastAPI application → Versioned API router: includes router
- Authentication endpoints → User persistence: looks up users
- Authentication endpoints → Session persistence: manages sessions
- Authentication endpoints → Token and password security: verifies and issues tokens
- Session persistence → Database sessions and engine: queries sessions
- User persistence → Database sessions and engine: queries users
- Photo endpoints → Photo persistence: manages photo records
- Photo endpoints → Image validation and thumbnails: validates and transforms
- Photo endpoints → S3 storage client: stores and retrieves media
- Album endpoints → Album persistence: manages albums
- Database sessions and engine → Relational database: reads and writes
- S3 storage client → S3-compatible object storage: reads and writes objects
- Queued object cleanup → Deletion queue records: loads queued keys
- Queued object cleanup → S3 storage client: deletes objects
- Queued object cleanup → Database sessions and engine: commits queue changes