How shivanshidhyani/cloud-drive works
CloudNest is a cloud-drive application: users sign up or log in, then manage files in a protected dashboard, upload bytes directly to S3, and retrieve or share downloads. The backend authenticates requests and coordinates file metadata, signed URLs, and storage operations; shared links provide a public download path. The graph preserves the major UI and API modules named in the source index. The README is empty, and unsampled share-route behavior is represented only where its indexed references support it.
Main entry points: server.js API server · files.js File API client · App.jsx Route application · Dashboard.jsx Dashboard
Components 24
Frontend experience
- Route application
frontend/src/App.jsx - Login and signup
frontend/src/pages - Auth layout
frontend/src/components/AuthLayout.jsx - Auth state
frontend/src/context/AuthContext.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - File card
frontend/src/components/FileCard.jsx - Upload zone
frontend/src/components/UploadZone.jsx - Sidebar
frontend/src/components/Sidebar.jsx - Storage ring
frontend/src/components/StorageRing.jsx - Shared file page
frontend/src/pages/SharedFile.jsx - File API client
frontend/src/api/files.js - HTTP client
frontend/src/api/client.js
Backend API
- API server
backend/server.js - Auth routes
backend/routes/auth.js - File routes
backend/routes/files.js - Share routes
backend/routes/share.js - JWT middleware
backend/middleware/auth.js
Data and storage
- User records
backend/models/User.js - File metadata
backend/models/File.js - Database connection
backend/config/db.js - S3 operations
backend/utils/s3.js
Other components
- User
- MongoDB
- AWS S3
Connections 31
- User → Route application: uses
frontend/src/App.jsx - Route application → Login and signup: routes to
frontend/src/App.jsx - Route application → Dashboard: routes to
frontend/src/App.jsx - Route application → Shared file page: routes to
frontend/src/App.jsx - Login and signup → Auth layout: renders
frontend/src/pages/Login.jsx - Login and signup → Auth state: uses
frontend/src/pages/Login.jsx - Auth state → API server: auth requests
- API server → Auth routes: mounts
backend/server.js - API server → File routes: mounts
backend/server.js - API server → Share routes: mounts
backend/server.js - API server → Database connection: connects
backend/server.js - Auth routes → User records: reads and writes
backend/routes/auth.js - File routes → JWT middleware: requires
backend/routes/files.js - File routes → File metadata: reads and writes
backend/routes/files.js - File routes → S3 operations: requests storage operations
backend/routes/files.js - Share routes → File metadata: references
backend/routes/share.js - Share routes → S3 operations: references
backend/routes/share.js - Database connection → MongoDB: connects
- User records → MongoDB: persists in
- File metadata → MongoDB: persists in
- S3 operations → AWS S3: operates on
backend/utils/s3.js - Dashboard → Sidebar: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Upload zone: renders
frontend/src/pages/Dashboard.jsx - Dashboard → File card: renders
frontend/src/pages/Dashboard.jsx - Sidebar → Storage ring: renders
frontend/src/components/Sidebar.jsx - Upload zone → File API client: requests uploads
frontend/src/components/UploadZone.jsx - File card → File API client: requests file actions
frontend/src/components/FileCard.jsx - Shared file page → File API client: requests shared download
frontend/src/pages/SharedFile.jsx - File API client → HTTP client: sends API requests
frontend/src/api/files.js - File API client → AWS S3: uploads bytes directly
frontend/src/api/files.js - HTTP client → API server: calls API