How deveshsarda5/billify works
Billify combines a customer mobile app, an Express/MongoDB API, and a web admin console. The customer flow is authentication, store selection, bill scanning and history, then payment and receipt tracking; support and profile tools are additional user-facing capabilities. The admin console manages users, sales, products, offers, payments, and support. Several screen and service implementations were not sampled, so their detailed call paths are left unspecified; dashed links mark documented but unverified runtime connections.
Main entry points: adminApi.ts Admin API client · AppNavigator.tsx Screen navigation · server.js HTTP server · models Domain records
Components 34
Customer mobile app
- App shell
App.tsx - Screen navigation
app/navigation/AppNavigator.tsx - Sign-in and signup
app/screens/LoginScreen.tsx - Dashboard
app/screens/DashboardScreen.tsx - Store selection
app/screens/StoreSelectionScreen.tsx - Receipt scanning
app/screens/ScanScreen.tsx - Bills and receipts
app/screens/PreviousBillsScreen.tsx - Payment checkout
app/screens/PaymentScreen.tsx - Payment methods
app/screens/PaymentMethodsScreen.tsx - Support tickets
app/screens/HelpSupportScreen.tsx - Profile settings
app/screens/ProfileScreen.tsx
Backend API
- HTTP server
billify-backend/server.js - Authentication routes
billify-backend/src/routes/auth.routes.js - Admin routes
billify-backend/src/routes/admin.routes.js - Authentication logic
billify-backend/src/controllers/auth.controller.js - Admin operations
billify-backend/src/controllers/admin.controller.js - Payment and verification
billify-backend/src/controllers/payment.controller.js - JWT authorization
billify-backend/src/middleware/auth.middleware.js
Persistence
- Domain records
billify-backend/src/models - MongoDB
Admin console
- Admin web console
billify-admin-main/app/page.tsx - Product management
billify-admin-main/app/products/page.tsx - Offer management
billify-admin-main/app/discounts/page.tsx - Support management
billify-admin-main/app/support/page.tsx - Payments and transactions
billify-admin-main/app/transactions/page.tsx - Admin API client
billify-admin-main/lib/adminApi.ts
Mobile state and services
- Authentication state
app/context/AuthContext.tsx - Cart state
app/context/CartContext.tsx - Location state
app/context/LocationContext.tsx - Store distance logic
app/utils/locationUtils.ts - Mobile API client
app/services/api.ts - Invoice processing
app/services/invoiceService.ts
Other components
- Customer
- Razorpay gateway
Connections 32
- Customer → Sign-in and signup: signs in
README.md - App shell → Screen navigation: renders
App.tsx - App shell → Authentication state: provides
App.tsx - App shell → Location state: provides
App.tsx - Screen navigation → Authentication state: checks session
app/navigation/AppNavigator.tsx - Screen navigation → Location state: checks selection
app/navigation/AppNavigator.tsx - Authentication state → Mobile API client: calls auth API
app/context/AuthContext.tsx - Location state → Store distance logic: resolves stores
app/context/LocationContext.tsx - Dashboard → Screen navigation: opens screens
app/screens/DashboardScreen.tsx - Receipt scanning → Bills and receipts: captures bills
README.md - Bills and receipts → Invoice processing: processes invoices
README.md - Payment checkout → Razorpay gateway: processes payment
README.md - Payment methods → Payment checkout: selects method
README.md - Support tickets → Mobile API client: calls API
app/screens/HelpSupportScreen.tsx - Mobile API client → HTTP server: sends API requests
README.md - HTTP server → Authentication routes: mounts routes
billify-backend/server.js - HTTP server → Admin routes: mounts routes
billify-backend/server.js - Authentication routes → Authentication logic: routes requests
billify-backend/src/routes/auth.routes.js - Authentication routes → JWT authorization: protects endpoints
billify-backend/src/routes/auth.routes.js - Admin routes → Admin operations: routes requests
billify-backend/src/routes/admin.routes.js - Admin routes → JWT authorization: checks admin access
billify-backend/src/routes/admin.routes.js - Authentication logic → Domain records: reads and writes
billify-backend/src/controllers/auth.controller.js - Admin operations → Domain records: queries and updates
billify-backend/src/controllers/admin.controller.js - Payment and verification → Domain records: updates bills
billify-backend/src/controllers/payment.controller.js - Payment and verification → Razorpay gateway: creates orders
billify-backend/src/controllers/payment.controller.js - Domain records → MongoDB: persists records
README.md - Admin web console → Admin API client: requests admin data
- Product management → Admin API client: manages products
billify-admin-main/app/products/page.tsx - Offer management → Admin API client: manages offers
billify-admin-main/app/discounts/page.tsx - Support management → Admin API client: manages tickets
billify-admin-main/app/support/page.tsx - Payments and transactions → Admin API client: views transactions
billify-admin-main/app/transactions/page.tsx - Admin API client → HTTP server: calls API