How cache-jujan/brickxbrick_cap2 works
BrickXBrick is a construction-project coordination and expense-management application with web and mobile clients, a backend API, and blockchain-backed expense auditing. The principal workflow spans project and task management, field progress review, receipt capture and expense submission, then audit verification and tamper alerts. The tree and excerpts support these product areas, but do not expose most route internals or client API wiring, so those links are limited to documented mounts and sampled calls.
Main entry points: server.js Backend API · db.js Application database · receipts.js Receipt scanning · tasks.js Tasks and progress
Components 21
Web and Mobile Clients
- Web application
frontend/src/App.jsx - Mobile application
mobile/app/_layout.tsx - Audit screens
frontend/src/pages/Blockchain/VerifyExpensePage.jsx
Project Operations
- Projects
backend/src/routes/projects.js - Milestones
backend/src/routes/milestones.js - Tasks and progress
backend/src/routes/tasks.js - Tickets
backend/src/routes/tickets.js
Expense and Receipt
- Expense records
backend/src/routes/expenses.js - Receipt scanning
backend/src/routes/receipts.js - Receipt image storage
backend/src/lib/receiptStorage.js - Receipt OCR client
backend/src/lib/visionClient.js
Backend Platform
- Backend API
backend/src/server.js - Authentication
backend/src/routes/auth.js - User administration
backend/src/routes/adminUsers.js - Offline sync
backend/src/routes/sync.js - Notifications
backend/src/routes/notifications.js - Application database
backend/src/lib/db.js
Blockchain Audit
- Blockchain API
backend/src/routes/blockchain.js - Blockchain service
backend/src/lib/blockchainService.js - Blockchain writer
blockchain/lib/blockchainWrite.js
Other components
- Project users
Connections 28
- Project users → Web application: use web
- Project users → Mobile application: use mobile
- Web application → Backend API: request API
- Mobile application → Backend API: request API
- Backend API → Authentication: mounts routes
- Backend API → User administration: mounts routes
- Backend API → Projects: mounts routes
- Backend API → Milestones: mounts routes
- Backend API → Tasks and progress: mounts routes
- Backend API → Tickets: mounts routes
- Backend API → Expense records: mounts routes
- Backend API → Receipt scanning: mounts routes
- Backend API → Offline sync: mounts routes
- Backend API → Blockchain API: mounts routes
- Backend API → Application database: queries
- Tasks and progress → Application database: reads and writes
- Tasks and progress → Milestones: recalculates progress
- Mobile application → Tasks and progress: fetches assigned tasks
- Receipt scanning → Receipt image storage: stores receipt
- Receipt scanning → Receipt OCR client: extracts receipt data
- Receipt scanning → Application database: persists scan data
- Expense records → Receipt image storage: validates receipt URL
- Expense records → Application database: stores expenses
- Blockchain API → Blockchain service: verifies expenses
- Blockchain service → Blockchain writer: submits hashes
- Blockchain API → Application database: reads audit records
- Audit screens → Web application: renders within
- Backend API → Notifications: serves routes