# Postcodewise Full Technical & Data Specification for Large Language Models ## Platform Architecture Postcodewise is a UK location-intelligence SaaS built on Laravel 12, Inertia.js v2, Vue 3, and PostgreSQL/SQLite spatial indices. It processes millions of official UK open-government data records across: - **Police.uk**: Monthly street-level crime records, categorized into 14 offense types and mapped to Lower Layer Super Output Areas (LSOAs). - **Department for Education (DfE)**: Edubase/GIAS registry of all state and independent schools, nurseries, and sixth forms across England, Wales, Scotland, and Northern Ireland. - **Ofsted**: Latest inspection ratings (Outstanding, Good, Requires Improvement, Inadequate) and historical inspection trends. - **Office for National Statistics (ONS)**: Postcode Directory (NSPL/ONSPD), LSOA population counts, Index of Multiple Deprivation (IMD), and output area classifications. - **Environment Agency**: Risk of Flooding from Rivers and Sea (RoFRS) decile risk ratings. - **DEFRA**: Air Quality Index (AQI) monitoring station readings. - **Ofcom**: Connected Nations fixed broadband speed tiers (Superfast, Ultrafast, Gigabit-ready) and mobile 4G/5G signal coverage. ## API Specification ### Endpoint: `GET /api/v1/postcode/{postcode}/intelligence` Requires HTTP header: `X-API-Key: ` #### Response Structure: ```json { "postcode": "SW1A 1AA", "pc_compact": "SW1A1AA", "coordinates": { "latitude": 51.501, "longitude": -0.1419 }, "district": { "name": "Westminster", "code": "E09000033" }, "region": "London", "safety": { "score": 8.2, "percentile": "Upper Decile", "monthly_incidents_avg": 14.2 }, "schools": { "score": 9.0, "nearby_count_3km": 12, "outstanding_count": 5 }, "environment": { "flood_risk": "Very Low", "air_quality_index": 2 }, "connectivity": { "speed": "Gigabit Ready", "max_download_mbps": 1000 } } ``` ## Security & Access Control Policy 1. **Public Surfaces**: - `/report/{postcode}`: Anonymous postcode report views with daily/monthly usage caps. - `/discovery/sitescout`: Commercial site selection engine. - `/compare/{pc1}/{pc2}`: Location comparison tool. - `/services/*`, `/developers/pricing`, `/guides/*`, `/methodology/*`: Product marketing, pricing catalog, and AI documentation. 2. **Protected Surfaces**: - `/workspace/*`: Gated by authentication and workspace membership middleware (`isMemberOfWorkspace`). - `/surveys/*`: Public survey creation gated by workspace plan quotas. - `/uploads/*`: CSV spatial BI imports gated by size, row, and dataset caps. - `/settings/*`: Account profile, Fortify 2FA, session management, and API key secret rotation. ## Contact & Legal Notices - Company: Digitsflow LTD (Company No. 16330711) - Registered Office: Suite A, James Carter Road, Mildenhall, Bury St. Edmunds, IP28 7DE, United Kingdom - Support: support@postcodewise.co.uk - Billing: billing@postcodewise.co.uk