How whitechapel007/invoice-test works
This is a React invoice-management app: users authenticate, enter a protected dashboard, review invoice statistics, recent invoices and activities, and create invoices. The UI uses React Query queries/mutations over an Axios client to Netlify function endpoints; Firebase Auth supplies identity. README capabilities such as payment tracking, customer details, and invoice actions are represented where documented, but unsampled implementations are not inferred beyond their visible components. The sampled evidence does not establish the functions’ persistence mechanism or a Firestore data flow.
Main entry points: Invoice.tsx Invoice overview · axios.ts HTTP client · App.tsx Route application · queries.ts Query operations
Components 22
Authentication
- Route application
src/App.tsx - Login and signup
src/pages - Auth state
src/context/AuthContext.tsx - Firebase Auth
src/services/firebase.ts - Route guard
src/components/auth/ProtectedRoute.tsx
Invoice dashboard
- Dashboard frame
src/components/common/DashboardWrapper.tsx - Invoice overview
src/pages/Invoice.tsx - Invoice statistics
netlify/functions/invoicestats.js - Recent invoices
src/components/invoice/RecentInvoices.tsx - Recent activities
src/components/invoice/RecentActivities.tsx - Create invoice
src/components/modal/CreateInvoiceModal.tsx - Invoice detail
src/components/modal/InvoiceModal.tsx - Invoice actions
src/components/invoice/InvoiceActions.tsx - Invoice domain types
src/types/type.ts
Invoice data API
- Query operations
src/services/api/queries.ts - HTTP client
src/services/api/axios.ts
Serverless backend
- Invoice endpoints
netlify/functions/invoices.js - Create endpoint
netlify/functions/createInvoice.js - Activity endpoint
netlify/functions/activities.js - Stats endpoint
netlify/functions/invoicestats.js - Mock data file
netlify/functions/db.json
Other components
- Invoice user
Connections 26
- Invoice user → Route application: opens app
src/App.tsx - Route application → Login and signup: routes to
src/App.tsx - Login and signup → Auth state: requests authentication
src/pages/Login.tsx - Login and signup → Auth state: requests signup
src/pages/Signup.tsx - Auth state → Firebase Auth: calls auth
src/context/AuthContext.tsx - Route application → Route guard: guards dashboard routes
src/App.tsx - Route guard → Auth state: checks auth state
src/components/auth/ProtectedRoute.tsx - Route application → Dashboard frame: routes dashboard
src/App.tsx - Dashboard frame → Invoice overview: renders page
- Invoice overview → Invoice statistics: loads statistics
- Invoice overview → Recent invoices: renders list
src/pages/Invoice.tsx - Invoice overview → Recent activities: renders activity
src/pages/Invoice.tsx - Invoice overview → Create invoice: opens form
src/pages/Invoice.tsx - Invoice overview → Invoice actions: renders actions
src/pages/Invoice.tsx - Recent invoices → Query operations: fetches invoices
src/components/invoice/RecentInvoices.tsx - Recent activities → Query operations: fetches activities
src/components/invoice/RecentActivities.tsx - Recent invoices → Invoice detail: opens details
src/components/invoice/RecentInvoices.tsx - Create invoice → HTTP client: posts invoice
src/components/modal/CreateInvoiceModal.tsx - Query operations → HTTP client: sends requests
src/services/api/queries.ts - HTTP client → Invoice endpoints: requests invoices
- HTTP client → Create endpoint: posts invoices
- HTTP client → Activity endpoint: requests activities
- HTTP client → Stats endpoint: requests statistics
- Query operations → Invoice domain types: uses domain types
src/services/api/queries.ts - Invoice endpoints → Mock data file: data access
- Create endpoint → Mock data file: data access