How vayu-401/invoiceai-final works
InvoiceAI provides account access, invoice uploads and processing, invoice browsing/export, and a human-review workflow. The visible frontend routes lead users through these capabilities; frontend stores call the backend over HTTP, while backend routes dispatch to controllers and models. The worker and chat capabilities appear in the source inventory, but their runtime links are not shown in the excerpts; those connections are therefore omitted. The README is empty, so capability coverage is based on the source tree and sampled files.
Main entry points: App.jsx Page router · index.js Express API · useInvoiceStore.js Invoice state · Dashboard.jsx Dashboard
Components 29
Web application
- Page router
Frontend/vite-project/src/App.jsx - Account pages
Frontend/vite-project/src/pages/Login.jsx - Dashboard
Frontend/vite-project/src/pages/Dashboard.jsx - Invoice pages
Frontend/vite-project/src/pages/Invoices.jsx - Invoice detail
Frontend/vite-project/src/pages/InvoiceDetails.jsx - Human review
Frontend/vite-project/src/pages/HumanReview.jsx - Upload pages
Frontend/vite-project/src/pages/Upload.jsx - Upload history
Frontend/vite-project/src/pages/YourUploads.jsx - Auth state
Frontend/vite-project/src/stores/useAuthStore.js - Invoice state
Frontend/vite-project/src/stores/useInvoiceStore.js - Upload state
Frontend/vite-project/src/stores/useUploadStore.js - HTTP client
Frontend/vite-project/src/lib/axios.js
API and processing
- Express API
Backend/src/index.js - Account routes
Backend/src/routes/user.routes.js - Invoice routes
Backend/src/routes/invoice.route.js - Upload routes
Backend/src/routes/upload.routes.js - Chat routes
Backend/src/routes/chat.routes.js - Account logic
Backend/src/controllers/user.controller.js - Invoice logic
Backend/src/controllers/invoice.controller.js - Upload and export
Backend/src/controllers/upload.controller.js - Chat logic
Backend/src/controllers/chat.controller.js - Token authentication
Backend/src/middlewares/auth.middlewares.js - Invoice worker
Backend/src/workers/worker.js - Invoice queue
Persistence
- User records
Backend/src/models/user.model.js - Invoice records
Backend/src/models/invoice.model.js - Upload records
Backend/src/models/upload.model.js - Chat records
Backend/src/models/chat.model.js
Other components
- User
Connections 42
- User → Page router: uses
Frontend/vite-project/src/App.jsx - Page router → Account pages: routes to
Frontend/vite-project/src/App.jsx - Page router → Dashboard: routes to
Frontend/vite-project/src/App.jsx - Page router → Invoice pages: routes to
Frontend/vite-project/src/App.jsx - Page router → Invoice detail: routes to
Frontend/vite-project/src/App.jsx - Page router → Human review: routes to
Frontend/vite-project/src/App.jsx - Page router → Upload pages: routes to
Frontend/vite-project/src/App.jsx - Page router → Upload history: routes to
Frontend/vite-project/src/App.jsx - Account pages → Auth state: uses
Frontend/vite-project/src/pages/Login.jsx - Dashboard → Auth state: uses
Frontend/vite-project/src/pages/Dashboard.jsx - Dashboard → Invoice state: uses
Frontend/vite-project/src/pages/Dashboard.jsx - Dashboard → Upload state: uses
Frontend/vite-project/src/pages/Dashboard.jsx - Invoice pages → Invoice state: uses
Frontend/vite-project/src/pages/Invoices.jsx - Invoice detail → Invoice state: uses
Frontend/vite-project/src/pages/InvoiceDetails.jsx - Human review → Invoice state: uses
Frontend/vite-project/src/pages/HumanReview.jsx - Upload pages → Upload state: uses
Frontend/vite-project/src/pages/Upload.jsx - Auth state → HTTP client: sends requests
Frontend/vite-project/src/stores/useAuthStore.js - Invoice state → HTTP client: sends requests
Frontend/vite-project/src/stores/useInvoiceStore.js - Upload state → HTTP client: sends requests
Frontend/vite-project/src/stores/useUploadStore.js - HTTP client → Express API: calls API
- Express API → Account routes: mounts
Backend/src/index.js - Express API → Invoice routes: mounts
Backend/src/index.js - Express API → Upload routes: mounts
Backend/src/index.js - Express API → Chat routes: mounts
Backend/src/index.js - Account routes → Token authentication: authenticates
Backend/src/routes/user.routes.js - Invoice routes → Token authentication: authenticates
Backend/src/routes/invoice.route.js - Upload routes → Token authentication: authenticates uploads
Backend/src/routes/upload.routes.js - Account routes → Account logic: dispatches to
Backend/src/routes/user.routes.js - Invoice routes → Invoice logic: dispatches to
Backend/src/routes/invoice.route.js - Upload routes → Upload and export: dispatches to
Backend/src/routes/upload.routes.js - Chat routes → Chat logic: dispatches to
Backend/src/routes/chat.routes.js - Token authentication → User records: loads user
Backend/src/middlewares/auth.middlewares.js - Account logic → User records: uses records
Backend/src/controllers/user.controller.js - Invoice logic → Invoice records: uses records
Backend/src/controllers/invoice.controller.js - Upload and export → Upload records: creates and reads
Backend/src/controllers/upload.controller.js - Upload and export → Invoice records: reads records
Backend/src/controllers/upload.controller.js - Chat logic → Chat records: uses records
Backend/src/controllers/chat.controller.js - Chat logic → User records: uses records
Backend/src/controllers/chat.controller.js - Chat logic → Upload records: uses records
Backend/src/controllers/chat.controller.js - Upload and export → Invoice queue: enqueues invoices
Backend/src/controllers/upload.controller.js - Invoice queue → Invoice worker: dispatches jobs
- Invoice worker → Invoice records: uses records
Backend/src/workers/worker.js