Skip to content

docs: codebase audit, riverpod 3 plan, and firestore rules#82

Merged
nuilewis merged 3 commits into
mainfrom
code-audit
Jun 24, 2026
Merged

docs: codebase audit, riverpod 3 plan, and firestore rules#82
nuilewis merged 3 commits into
mainfrom
code-audit

Conversation

@nuilewis

Copy link
Copy Markdown
Collaborator

Summary

Adds a full codebase audit, a Riverpod 3.0 migration plan, and scaffolds the previously-missing Firestore security rules.

  • docs/codebase_audit.md — architecture and code-structure review with an unbiased 5.5/10 rating. Highlights strengths (layering, functional error handling, docs, CI/CD) and gaps (no test coverage, DI defeated by global singletons, a few real model bugs, health-data privacy concerns).
  • docs/riverpod_3_migration_plan.md — effort/risk assessment (~2–4 days, low surface but elevated risk from the lack of tests) plus a step-by-step migration sequence.
  • Firestore rules + deploy configfirestore.rules (deny-all baseline, per-user access where the {uid} path segment matches request.auth.uid, covering users/{uid}, meds/{uid}, and logs/{uid} trees), wired into firebase.json alongside firestore.indexes.json and .firebaserc.

Notes

  • The rules are not yet deployed — deploying changes live access control on production. Run firebase deploy --only firestore:rules when ready, and verify the app still reads/writes after the lockdown (current live rules are likely more permissive).
  • The audit and migration plan are documentation only; no application code changed.

🤖 Generated with Claude Code

nuilewis and others added 3 commits June 24, 2026 18:43
- full architecture and code-structure review of the app
- unbiased rating of 5.5/10 with per-dimension scoring
- documents strengths: layering, functional error handling, docs, ci/cd
- flags gaps: no tests, di defeated by global singletons, real model bugs
- notes privacy concerns for health data: verbose logging, no firestore rules
- prioritized recommendations and a riverpod 3 upgrade pointer

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- effort and risk assessment for the 2.x to 3.0 upgrade
- inventories the breaking changes that actually touch this codebase
- estimates ~2-4 days, low surface but elevated risk due to no tests
- recommends fixing the global-singleton di in the same pass
- step-by-step migration sequence with a pre-migration checklist

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- add firestore.rules with a locked-down per-user baseline
- deny all by default, allow access only where the {uid} path segment matches request.auth.uid
- covers users/{uid}, meds/{uid} and logs/{uid} trees plus nested subcollections
- wire firestore rules and indexes targets into firebase.json
- add empty firestore.indexes.json and .firebaserc pinning the default project

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nuilewis
nuilewis merged commit e1aa410 into main Jun 24, 2026
3 of 4 checks passed
@nuilewis
nuilewis deleted the code-audit branch June 24, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant