Skip to main content
The Address API is a geocoding service that converts addresses into geographic coordinates (latitude and longitude) and standardizes address components. It uses Google’s Geocoding API as the underlying provider and includes caching to optimize performance and reduce costs.

What it does

The Address API provides two core capabilities:
  1. Geocoding: Convert address strings to geographic coordinates and standardized address components
  2. Content ingestion: Manage ISO 3166 subdivision data for address component standardization

Tech stack

ComponentTechnologyVersion
LanguageGo1.23.1
Web frameworkEchov4.12.0
DatabasePostgreSQL15
Database driverpgxv5.7.6
Migration toolAtlasLatest
Query buildersqlc1.30.0
Loggingzerologv1.33.0
Validationgo-playground/validatorv10.25.0
Testingtestcontainers-gov0.34.0
Git hooksLefthookLatest
Infrastructure as CodeTerraformLatest
CI/CDGitHub Actions-
Geocoding providerGoogle Geocoding API-

Deployed URLs

EnvironmentURLAWS Account
Staginghttps://address.in.staging.commenda.io/healthz127214192604
Productionhttps://address.in.commenda.io/healthz429032495558

Key features

  • Geocoding: Convert addresses to geographic coordinates using Google’s Geocoding API
  • Address standardization: Parse and normalize address components (city, state, country, postal code)
  • Caching: Automatic caching of geocoding results to reduce API costs and improve performance
  • Provider transparency: Access to both normalized results and raw provider responses
  • ISO 3166 content management: Ingest and manage subdivision data to standardize state codes when Google returns local variants or subdivision names
  • Role-based access control: API key authentication with granular permissions
  • Health monitoring: Built-in health check endpoint with database connection pooling metrics

Architecture

The service is deployed on AWS ECS Fargate in the ap-south-1 (Mumbai) region with the following components:
  • Application Load Balancer: HTTPS traffic routing with SSL termination
  • ECS Fargate: Containerized application running in private subnets
  • RDS PostgreSQL: Database for caching and content storage
  • ECR: Container image registry
  • CloudWatch: Centralized logging and monitoring
  • Better Stack: External monitoring and alerting