Claude Project Tracker

refreshed 2026-09-11 20:10:10Z

What's pending across every project

10 open · sorted by priority then due-date
priority all urgent high low
Filtered by tag backend  clear
todo urgent
Rotate Razorpay webhook secret — 'hopewell' is guessable
The RAZORPAY_SECRET_WEBHOOK value in /opt/ocpp/.env on the production VM is literally 'hopewell' — a common English word, effectively no protection. HMAC verification against a guessable secret means anyone who learns the plaintext can forge webhook calls and credit any wallet. Fix: 1. Razorpay Dashboard → Settings → Webhooks → regenerate a long random secret (32+ char base64). 2. Update /opt/ocpp/.env on the VM (SMTP_PASSWORD-style edit). 3. sudo systemctl restart ocpp.service. 4. Send a test webhook from Razorpay dashboard and confirm it verifies. This is the single most impactful hardening we can do.
/opt/ocpp/.envinternal/handlers/wallet_handler.go:239-254↗ https://dashboard.razorpay.com/app/webhooks
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
from the conversationclaude: RAZORPAY_SECRET_WEBHOOK=hopewell in .env is weak - anyone who guesses the plaintext can forge webhooks (i.e., forge topups). Regenerate a long random secret in the Razorpay dashboard and update .env, then restart the service. This is the single most impactful hardening you can do. saravanan: put them in my project tracker - scrumclaw.ai
42d ago
07-31 02:51
todo high
Fix float equality in webhook amount check (can silently reject real topups)
ProcessTopupWebhook uses `if topup.Amount != amount` — direct float64 equality. A tiny rounding drift (e.g., 500.00 stored vs 499.99999998 derived from Razorpay's paise/100) will falsely reject the webhook as 'amount mismatch', leaving the user paying but not credited. Change to: if math.Abs(topup.Amount - amount) > 0.01 { ... } Or better: store amount as int64 paise everywhere and compare integers.
internal/repositories/wallet_repo.go:100
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
42d ago
07-31 02:51
todo high
Extend ledger reconciliation migration to handle negative balances
Migration 0027 only inserts positive ADJUSTMENT entries when `wallets.balance > 0 AND gap.amount >= 0.01`. Users whose legacy wallets.balance is 0 (never populated) but who accumulated CHARGE entries end up with negative ledger balances and no automatic reconciliation. Concrete case: saravanan.hp@gmail.com currently shows balance = -11152.52. Ledger has CHARGE entries but no matching TOPUP history was migrated in. Options: (a) Backfill missing legacy topups from external Razorpay reports before running the reconcile. (b) Add a companion migration that reconciles from a manually-curated CSV of legacy balances. (c) Add an admin credit tool + audit trail so support can fix these case-by-case. Track down the actual topup history for affected users (query Razorpay payments API filtered by our account) and decide the right long-term reconciliation approach.
migrations/0027_wallet_ledger_balance_reconcile.up.sqlinternal/repositories/wallet_repo.go:30-48
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
42d ago
07-31 02:51
todo high
Exam: within-module back/forward navigation + change answers + question navigator (Bluebook parity) — web AND mobile
Owner noticed the full exam has no back/forth between answered questions. Root cause: exam engine is forward-only by design. Backend get_next_exam_question serves the next UNSEEN question and immediately consumes it (status→ANSWERED); /answer records a single Attempt; no endpoint to re-fetch a prior question, change an answer, or list the module; ExamQuestionStatusEnum has only UNSEEN/ANSWERED/SKIPPED (no FLAGGED/REVIEW). Same limitation on WEB (frontend ExamSession.tsx) since it's the same backend — whole-product gap, not mobile-only. Real Digital SAT (Bluebook) allows free within-module navigation, changing answers, and a question navigator with mark-for-review until the module timer ends. SCOPE (multi-day, cross-cutting): backend — serve whole module, mutable per-question answers until module submit/timer, add flag/review state, add submit-module step (stop consume-on-serve); web+mobile — question navigator UI (grid + flags), Back/Next, module answer state, submit at module end. NOT an App Store blocker — sequence AFTER build 7 clears review. Refs: backend/app/services/exam_service.py (get_next_exam_question, submit_exam_answer), backend/app/models/exam_module_question.py, mobile/src/screens/ExamSessionScreen.tsx, frontend/src/app/pages/ExamSession.tsx.
backend/app/services/exam_service.pybackend/app/models/exam_module_question.pymobile/src/screens/ExamSessionScreen.tsxfrontend/src/app/pages/ExamSession.tsx
Adaptive SAT · adaptive-sat · by saravanan@scrumclaw.ai
from the conversationsaravanan: I need the option to go back and forth for the questions in the full test — why is it not enabled? claude: Exam engine is forward-only (serves next UNSEEN, consumes it, one Attempt each; no revisit/flag) on web+mobile. Real feature to add; not an App Store blocker — do after build 7.
💬 4 comments
32d ago
08-10 14:05
todo
Fix topup amount range mismatch (min=1 vs error message '100')
Backend constant minTopupAmount is 1 but the error message and frontend both say the minimum is 100. Change minTopupAmount to 100 so the backend actually enforces what the message claims — otherwise a bespoke client can top up ₹1 (bypasses the intended floor). - const minTopupAmount = 1 + const minTopupAmount = 100
internal/handlers/wallet_handler.go:29-30internal/handlers/wallet_handler.go:87
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
42d ago
07-31 02:51
todo
Rate-limit / IP-allowlist /webhooks/payment endpoint
The webhook endpoint currently accepts any POST from anywhere. HMAC signature check is the only defense — cryptographically sound, but each invalid request still triggers signature compute + JSON parse + DB lookup, so it's a cheap DoS vector. Two things worth adding (nginx-level is easiest): 1. Restrict source IPs to Razorpay's published webhook IPs (they publish a list): allow only those in the nginx server block for /webhooks/*. 2. Rate-limit /webhooks/* at nginx (limit_req_zone). Even a modest 20 rps burst limit stops volumetric noise. Doesn't change functionality, just hardens.
internal/routes/routes.go:161-163internal/handlers/wallet_handler.go:239-303/etc/nginx/sites-available/vajraev
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
42d ago
07-31 02:51
todo
SMS templates + Fast2SMS integration for walk-in (Phase 1.5)
Behind WALKIN_QR_SMS_ENABLED flag. 5 templates × 4 languages (see #53).\n\nBackend changes:\n- Templates stored in Go source (map[templateKey]map[lang]string) with DLT template IDs from #53\n- Language selection: prefer user.preferred_language if set; fallback to English\n- Dispatch service reuses existing Fast2SMS integration (already in codebase for OTP)\n- Fire-and-forget from webhook handler (async goroutine); log failures but don't block webhook response\n\nBlocked on DLT approval (#53).</body>
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
40d ago
08-02 11:52
todo
Admin console: "list payments for QR" endpoint (Razorpay debug aid)
Useful for ops debugging (missing webhook, dispute lookup, reconciliation). Wraps Razorpay: GET https://api.razorpay.com/v1/payments/qr_codes/:qr_id/payments Backend endpoint: GET /admin/chargers/:charger_id/connectors/:connector_id/payments Returns array of payments captured against that gun's QR (all-time), each with vpa, contact, email, amount, timestamp, status. Enables ops to answer "who paid at this gun today" without querying our DB. Small addition to the admin endpoints in #65. Roughly 1 hour of Go + admin console UI work.</body>
scrumclaw#61scrumclaw#65
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
40d ago
08-02 12:10
decision
Walk-in QR runs in-process in cmd/api, not as a separate walkin-service
Chose to mount walkin's routes on the main API router instead of deploying cmd/walkin-service on port 8082. Reason: Saravanan did not want two processes to supervise on a 2GB VM, and the "microservice" boundary was not real — same DB, same .env, same host, same webhook secret. Commit c17a33a, merged to app as 3f826d7. cmd/walkin-service deleted in b3b0fa7 with docs updated. Trade-off accepted: forwardWalkinQRCredit in wallet_handler.go still makes an HTTP round-trip to this same process (WALKIN_SERVICE_URL and API_BASE_URL both = http://127.0.0.1:8080). Both are deliberately loopback, NOT https://api.vajraev.com — routing back out through nginx during webhook handling can tie up nginx workers waiting on a process that is waiting on nginx. Cleanup owed: collapse the self-call into a direct service-method call and drop both env vars. Deferred because it touches the payment path. Whoever wrote cmd/walkin-service has NOT been told it was removed — worth asking whether there was a reason for the split that the docs never recorded.
internal/routes/routes.gointernal/handlers/wallet_handler.go::forwardWalkinQRCreditc17a33a3f826d7b3b0fa7
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
from the conversationsaravanan: No lets merge it together - i dont want two different things claude: Merging is ~6 lines — mount walkin's internal endpoint and health route on the main API router, and point WALKIN_SERVICE_URL at 127.0.0.1:8080. Honest tradeoff: it keeps a pointless HTTP round-trip to itself; the fully clean version deletes forwardWalkinQRCredit, which touches the payment path.
3d ago
09-07 22:19
todo low
Remove deprecated Razorpay 'payment_capture: 1' from order create
Razorpay deprecated the payment_capture parameter for the Orders API — capture behavior is now controlled at the account/merchant level. Not a functional bug today, but noise, and Razorpay may eventually reject unknown fields in future API versions. Drop the key from the payload in createRazorpayOrder.
internal/handlers/wallet_handler.go:340
Vajra Volt Mobile App · vajra-mobile-app · by saravanan@scrumclaw.ai
42d ago
07-31 02:51

Add an item