How sparshkashyap/photo-app works
This is a photo-management web application: users sign in, browse and organize photos, then use features such as favorites, trash, and share links. The frontend provides the interface and API client; the Express backend routes requests to domain controllers, which access AWS storage. The README is empty, and source excerpts are partial, so the graph preserves documented route and capability boundaries while omitting uncertain controller-to-service wiring.
Main entry points: app.js Express API · api.ts API client · authService.js Auth service · shareController.js Share controller
Components 34
Web application
- Sign-in UI
frontend/src/routes/login.tsx - Auth state
frontend/src/hooks/useAuth.tsx - API client
frontend/src/services/api.ts - Photo gallery
frontend/src/routes/dashboard.tsx - Photo views
frontend/src/components/PhotoGallery.tsx - Photo upload
frontend/src/components/UploadPhoto.tsx - Folder views
frontend/src/components/FolderTree.tsx - Search and filters
frontend/src/components/SearchBar.tsx - Favorites view
frontend/src/routes/favorites.tsx - Trash view
frontend/src/routes/trash.tsx - Shared photo views
frontend/src/routes/shared.tsx
API and authentication
- Express API
backend/app.js - Auth routes
backend/src/routes/authRoutes.js - Auth controller
backend/src/controllers/authController.js - Auth service
backend/src/services/authService.js - Google OAuth
backend/src/services/googleAuthService.js - User routes
backend/src/routes/userRoutes.js
Photo library
- Photo routes
backend/src/routes/photoRoutes.js - Photo controller
backend/src/controllers/photoController.js - Folder routes
backend/src/routes/folderRoutes.js - Folder controller
backend/src/controllers/folderController.js - Favorite routes
backend/src/routes/favoriteRoutes.js - Favorite controller
backend/src/controllers/favoriteController.js - Search service
backend/src/services/searchService.js
Photo lifecycle
- Trash routes
backend/src/routes/trashRoutes.js - Trash controller
backend/src/controllers/trashController.js - Share routes
backend/src/routes/shareRoutes.js - Photo share routes
backend/src/routes/photoShareRoutes.js - Share controller
backend/src/controllers/shareController.js - Share service
backend/src/services/shareService.js - Trash cleanup
backend/src/jobs/cleanupTrash.js
Other components
- Photo user
- DynamoDB
- Amazon S3
Connections 42
- Photo user → Sign-in UI: signs in
- Photo user → Photo gallery: manages photos
- Sign-in UI → Auth state: submits credentials
- Auth state → API client: calls auth API
- Photo gallery → Photo views: shows library
- Photo gallery → API client: requests data
- Photo upload → API client: uploads photos
- Folder views → API client: manages folders
- Search and filters → API client: searches photos
- Favorites view → API client: loads favorites
- Trash view → API client: manages trash
- Shared photo views → API client: opens shared photos
- API client → Express API: sends requests
- Express API → Auth routes: mounts routes
- Express API → User routes: mounts routes
- Express API → Photo routes: mounts routes
- Express API → Folder routes: mounts routes
- Express API → Favorite routes: mounts routes
- Express API → Trash routes: mounts routes
- Express API → Share routes: mounts routes
- Express API → Photo share routes: mounts routes
- Auth routes → Auth controller: dispatches
- Auth controller → Auth service: calls
- Auth service → DynamoDB: reads and writes users
- Auth service → Google OAuth: OAuth support
- Auth service → Photo user: verifies Google identity
- Photo routes → Photo controller: dispatches
- Photo controller → DynamoDB: reads and writes metadata
- Photo controller → Amazon S3: uploads and signs URLs
- Folder routes → Folder controller: dispatches
- Folder controller → DynamoDB: reads and writes folders
- Favorite routes → Favorite controller: dispatches
- Favorite controller → DynamoDB: updates favorites
- Trash routes → Trash controller: dispatches
- Trash controller → DynamoDB: reads and updates photos
- Trash controller → Amazon S3: deletes objects
- Share routes → Share controller: dispatches
- Photo share routes → Share controller: dispatches
- Share controller → DynamoDB: reads and writes shares
- Share controller → Amazon S3: signs photo URLs
- Trash cleanup → DynamoDB: cleans expired trash
- Search service → DynamoDB: searches photo records