Update app-architecture.md to reflect actual codebase state #254
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/update-app-architecture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
db/schema.rb: add CrewMember, DailyNote, DayExclusion, FeatureFlag, ServiceRequestChanges
docs/app-architecture.md-- ERD rebuilt from actual schema, model descriptions rewritten, Rails structure updated with all controllers/Stimulus controllers, key design decisions updated for global auth enforcement and schedule digestionTest Plan
Review Checklist
Related Notes
landscaping-assistant-- project this affectsPR #254 Review
DOMAIN REVIEW
Docs-only PR updating
docs/app-architecture.md. Verified all documentation claims against the actual codebase (db/schema.rb, controllers, models, services, Stimulus controllers, views).ERD accuracy: All 11 tables in the ERD (CrewMember, Property, Service, PropertyService, WorkQueueItem, DailyNote, DayExclusion, ServiceRequest, Upload, FeatureFlag, PaperTrailVersion) match
db/schema.rbcolumn-for-column. The "Planned" section correctly identifies Business, UserBusiness, and PropertyComment as not-yet-implemented -- none of those models or tables exist.Model descriptions: Accurate. WorkQueueItem is correctly described as keyed by property + work_date (matching the unique index). ServiceRequest state machine description matches the model. FeatureFlag caching description aligns with prior PRs.
Key Design Decisions: Updated accurately -- Auth Code + PKCE, global auth enforcement, schedule digestion via Claude Vision, DayExclusion for suggestion hygiene all reflect the current codebase.
BLOCKERS
None. This is a docs-only change with no code impact.
NITS
nominatim_service.rblisted but does not exist. The services section documentsnominatim_service.rbas "HTTP client for geocoding" but this file does not exist inapp/services/. It may have been removed or never created. Should be removed from the docs or noted as planned.keycloak_admin_service.rbexists but is not documented.app/services/keycloak_admin_service.rbis a live service (Keycloak user lookup/update via admin API) but is not listed in the Rails Structure services section.join_crew_controller.rband its view exist but are not documented.app/controllers/join_crew_controller.rbandapp/views/join_crew/index.html.erbare present in the codebase but omitted from the Rails Structure. This may be intentional if the feature is dormant, but the architecture doc should note it or explicitly mark it as deprecated.platform/feature_flags_controller.rbnot in Rails Structure. The docs mention the super_admin UI at/platform/feature_flagsin the FeatureFlag model description, but the controller itself (app/controllers/platform/feature_flags_controller.rb) is not listed in the controllers section.Missing view directories. The views section omits
uploads/,pwa/,shared/, andplatform/directories, all of which exist underapp/views/.SOP COMPLIANCE
docs/app-architecture.mdchangedPROCESS OBSERVATIONS
Good documentation hygiene -- keeping architecture docs in sync with the codebase reduces onboarding friction and prevents stale docs from misleading future development. The ERD rebuild from
db/schema.rbis the right approach. The five nits above are minor completeness gaps that would make this a fully accurate snapshot of the codebase.VERDICT: APPROVED
The core documentation is accurate. ERD matches the schema, model descriptions match reality, design decisions reflect current state. The five nits are minor omissions that do not block merge but would improve completeness if addressed.
PR #254 Re-Review
PREVIOUS NITS -- VERIFICATION
All 5 nits from the prior review have been resolved:
keycloak_admin_service.rb, which exists in the codebase. The non-existentnominatim_service.rbis gone. RESOLVED.# Keycloak user management API. RESOLVED.# Join-a-crew form (client role). RESOLVED.# Feature flag admin (super_admin). RESOLVED.uploads/,profile/,join_crew/,platform/feature_flags/, andshared/all present in the views section. RESOLVED.DOMAIN REVIEW
Docs-only change (1 file:
docs/app-architecture.md). Tech stack: Ruby on Rails with Hotwire/Stimulus.ERD vs schema.rb cross-check: All 10 tables in the ERD (CrewMember, Property, Service, PropertyService, WorkQueueItem, DailyNote, DayExclusion, ServiceRequest, Upload, FeatureFlag) plus PaperTrail::Version match
db/schema.rbcolumn-for-column. Relationships match foreign key constraints. Theversions.objectcolumn (text) is omitted from the ERD, which is acceptable for a high-level diagram.File existence verification: All 49 referenced files and directories (12 controllers, 10 models, 2 services, 13 Stimulus controllers, 12 view directories) confirmed to exist in the codebase. The removed
week_move_controller.jsfrom the old docs correctly does not exist.BLOCKERS
None.
NITS
None remaining.
SOP COMPLIANCE
PROCESS OBSERVATIONS
Clean documentation hygiene pass. The architecture doc now reflects the real codebase rather than aspirational designs, which reduces onboarding friction and prevents stale docs from misleading future development decisions.
VERDICT: APPROVED
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.