This is a React + TypeScript frontend application that allows users to validate one or more addresses using the DI Adresshelper API. Users can type in addresses to receive validation feedback, suggestions, and coordinates.
- Validate one or multiple addresses
- Show suggestions and metadata for each result
- Autocomplete/typeahead for improved UX
- Optionally show addresses on a map (if time permits)
- Responsive and accessible UI
- React
- TypeScript
- Vite (for bundling and local dev)
- Tailwind CSS
- React Query (for API state management)
- React Hook Form
- Node.js >= 20.x
npm installnpm run devAdd a .env file:
VITE_API_KEY=YOUR_API_KEY
VITE_API_BASE=YOUR_API_URLcurl 'https://staging-ws.di.no/ws/json/addressHelper/v-2/NO/streetSearch/akersgata?apiKey=YOUR_API_KEY' -H 'referer: http://localhost:3000'src/
├── components/ // Reusable UI components
├── pages/ // Page components
├── hooks/ // Custom React hooks
├── services/ // API logic
├── types/ // TypeScript types
├── utils/ // Helper functions
- Unit testing: Jest + React Testing Library
- E2E (optional): Cypress or Playwright
To run tests:
npm run test- CI/CD with GitHub Actions
- More advanced validation feedback (official/unofficial flag)
- CSV import for bulk validation
- Localization support
- Integration with a map (e.g. Leaflet)
- Address validation as a drop-in component
- Why did you choose X library?
- How would you add internationalization?
- How would you design this for production?
- How do you handle rate limiting or throttling?
This project is for demonstration purposes only.