How tpximpact/digital-planning-register works
Digital Planning Register is a multi-council web application for finding and viewing planning records, decisions, documents and comments, and for submitting public comments. The main journey is council-scoped application search, followed by an application record and its related material; users can also search comments and documents or submit a comment through a multi-step flow. Council configuration selects segregated data sources. Source excerpts and the index show some search, configuration and handler wiring; other feature links are documented by the README or left unasserted where implementation was not sampled.
Main entry points: handlers/index.ts Handler router · config/index.ts Council config · page.tsx Council routes · route.ts Search redirect
Components 25
Council and app
- Council config
src/config/index.ts - Council routes
src/app/[council]/page.tsx - Help pages
src/app/[council]/help/page.tsx
Applications
- Search forms
src/components/FormSearchFull/FormSearchFull.tsx - Search redirect
src/app/[council]/search-form/route.ts - Application search
src/lib/planningApplication/search.tsx - Search results
src/components/PageSearch/PageSearch.tsx - Application card
src/components/ApplicationCard/ApplicationCard.tsx - Application record
src/app/[council]/[reference]/page.tsx - Planning data
src/lib/planningApplication/decision.tsx
Record material
- Documents
src/lib/documents.ts - Document search
src/app/[council]/[reference]/documents/search/route.ts - Public comments
src/lib/comments.ts - Comment search
src/app/[council]/[reference]/comments/search/route.ts - Specialist comments
src/lib/specialistComments.ts - Specialist search
src/app/[council]/[reference]/specialist-comments/[specialistId]/search/route.ts
Comment submission
- Comment journey
src/app/[council]/[reference]/submit-comment/page.tsx - Comment actions
src/actions/api/v1.actions.ts
Data access
- API actions
src/actions/api/index.ts - Handler router
src/handlers/index.ts - External handler
src/handlers/external/bops.ts - Local handlers
src/handlers/local/index.ts
Other components
- Visitor
- BOPS service
- Council API
Connections 21
- Visitor → Council routes: opens council
README.md - Council routes → Council config: loads config
src/app/[council]/page.tsx - Council routes → Application search: uses search
src/app/[council]/page.tsx - Search forms → Search redirect: submits filters
- Search redirect → Council config: gets config
src/app/[council]/search-form/route.ts - Search redirect → Application search: validates filters
src/app/[council]/search-form/route.ts - Search results → Application search: uses search
src/components/PageSearch/PageSearch.tsx - Search results → Application card: renders results
src/components/PageSearch/PageSearch.tsx - Application record → Planning data: uses planning data
- Document search → Documents: validates filters
src/app/[council]/[reference]/documents/search/route.ts - Document search → Council config: gets config
src/app/[council]/[reference]/documents/search/route.ts - Comment search → Public comments: validates filters
src/app/[council]/[reference]/comments/search/route.ts - Specialist search → Specialist comments: validates filters
src/app/[council]/[reference]/specialist-comments/[specialistId]/search/route.ts - Comment journey → API actions: loads application
src/app/[council]/[reference]/submit-comment/page.tsx - Comment journey → Comment actions: submits comment
- API actions → Handler router: dispatches requests
- Handler router → Council config: reads config
src/handlers/index.ts - Handler router → External handler: routes externally
src/handlers/index.ts - Handler router → Local handlers: routes locally
src/handlers/index.ts - External handler → BOPS service: fetches council data
- External handler → Council API: fetches council data
README.md