A lightweight full-stack microservice that validates Indian addresses using pincode intelligence and heuristic scoring.
Built to demonstrate real-world problem solving aligned with Swift's mission of improving checkout, shipping accuracy, and reducing RTO.
This microservice validates an address by:
- Verifying the pincode using India's Postal API
- Auto-detecting city & state from the pincode
- Checking if the user-entered city/state match the actual region
- Applying heuristic scoring based on:
- Region mismatch
- Missing house/flat number
- Short/incomplete address
- Returning a structured response with:
- β Validity result
- β Score (/100)
- β Issues found
- β Suggested correct region
- β Delivery confidence
This helps reduce bad addresses β fewer delivery failures β lower RTO.
One major reason for failed deliveries in India:
incorrect addresses + region mismatch.
This microservice acts as a plug-and-play API that brands can integrate into checkout to:
- Improve address accuracy
- Auto-correct incorrect locations
- Predict deliverability
- Reduce RTO losses
- React (JavaScript)
- Axios
- Modern CSS (no external libraries)
- Vite dev environment
- Node.js + Express
- Axios (for Postal API)
- Custom scoring algorithm
git clone https://github.com/rajeev2004/Address-Validator.git
cd Address-Validatorcd backend
npm install
node server.jscd frontend
npm install
npm run dev