Backend & Data / Frontend prototype
Smog Prediction Interface
A Next.js air-quality interface exploring prediction API integration, pollutant inputs, and forecast presentation.
- Focus
- Application engineering
- Project type
- Frontend prototype
- Core technologies
- Next.js · TypeScript · React · Tailwind CSS

Context
The engineering problem
Prediction outputs need a usable interface that connects pollutant inputs, an external API, and clear presentation of air-quality information.
Architecture at a glance
A simplified implementation map based on the linked repository. Arrows show the principal relationships; deployment details live in the source.
- clientBrowserUser interactionserviceNext.js feature UI
- databaseSample sensor inputsPrototype inputsserviceNext.js feature UI
- serviceNext.js feature UIPollutant payloadgatewayAxios request
- gatewayAxios requestPrediction requestexternalExternal prediction API
- externalExternal prediction APIResponse displayclientForecast presentation
All system components (6)
- Browserclient
- Next.js feature UIservice
- Sample sensor inputsdatabase
- Axios requestgateway
- External prediction APIexternal
- Forecast presentationclient
Approach
Implementation decisions
Organize by feature
Separate prediction, AQI display, and live-smog areas group the interface around user tasks.
Isolate the API boundary
Axios sends pollutant inputs to a configurable external prediction endpoint.
Distinguish prototype data
Sample sensor fixtures and illustrative future values support interface development; they should not be treated as validated environmental predictions.
Explore the implementation
Start with the source.
These entry points connect the architecture to the implementation.
- Frontend dependencies ↗package.json
- Prediction integration ↗src/features/predictions/presentation/FuturePredictions.tsx
- Sample sensor data ↗src/features/predictions/utils/sensor-data.ts
- AQI display data ↗src/features/AQI-display/utils/predictions.ts
Implementation scope
Frontend prototype. Some displays use sample data and illustrative forecasts. Model training, forecast validation, and reliable live sensor ingestion are outside this repository.