How thakkalisuresh/dddp-portal works
DD Diamond Park is a resident and committee gas-billing portal. Residents sign in to view bills, pay by UPI, submit payment proofs, and use notices and polls; committee members manage readings, billing, residents, and reconciliation. The backend also runs scheduled late-fee and backup work. The excerpts show the request router, session handling, rate changes, statement parsing, and storage integrations; other feature connections are based on the README and module names, so uncertain call-level wiring is omitted.
Main entry points: index.js Request router · api.js API client · backup.js Backup and export · cron.js Scheduled tasks
Components 25
Resident experience
- Portal interface
public/js/home.js - API client
public/js/api.js - Resident features
public/js/dashboard.js - Notices and polls
public/js/notices.js
Committee operations
- Admin console
public/js/admin-console.js - Billing screens
public/js/admin-billing.js
Backend services
- Request router
functions/index.js - Sessions and identity
functions/lib/session.js - Billing and readings
functions/lib/billing.js - UPI and proofs
functions/lib/proof.js - Proof recognition
functions/lib/vision.js - Notices and polls
functions/lib/notices.js - Poll voting
functions/lib/polls.js - Roster and tenancy
functions/lib/roster.js - Statement reconciliation
functions/lib/statement.js - Scheduled tasks
functions/lib/cron.js - Backup and export
functions/lib/backup.js
Data and integrations
- D1 database
- R2 file storage
- Email service
- Google Drive
- OCR providers
- Telegram alerts
Other components
- Residents
- Committee
Connections 27
- Residents → Portal interface: use portal
- Committee → Portal interface: use portal
- Portal interface → API client: request data
- API client → Request router: send API request
- Request router → Sessions and identity: resolve identity
- Sessions and identity → D1 database: read and write sessions
- Request router → D1 database: read and write records
- Resident features → API client: request resident data
- Notices and polls → API client: request notices and votes
- Admin console → API client: request admin actions
- Billing screens → API client: request billing actions
- Request router → Billing and readings: dispatch billing
- Request router → UPI and proofs: dispatch payment actions
- Request router → Notices and polls: dispatch notice actions
- Request router → Poll voting: dispatch poll actions
- Request router → Roster and tenancy: dispatch roster actions
- Request router → Statement reconciliation: parse statement
- Request router → Proof recognition: parse proof image
- UPI and proofs → R2 file storage: store proof files
- Proof recognition → OCR providers: request image parsing
- Request router → Email service: send account email
- Scheduled tasks → D1 database: read and update scheduled records
- Scheduled tasks → Backup and export: run nightly backup
- Backup and export → D1 database: export records
- Backup and export → R2 file storage: read stored files
- Backup and export → Google Drive: copy backup files
- Scheduled tasks → Telegram alerts: send alerts