Back to Projects
Bharat PIN
CompletedViteJavaScriptReact+6 more

Bharat PIN

A geo-coded addressing system that assigns unique 10-character codes to 4m x 4m grid locations across India for precise digital addresses.

Timeline

2 months

Role

Full Stack

Team

Solo

Status
Completed

Technology Stack

Vite
JavaScript
React
Tailwind CSS
Vercel
Leaflet.js
Shadcn UI
TanStack Query
GeoJSON

Key Challenges

  • Grid Algorithm
  • Precision Mapping
  • Encoding Logic
  • Coordinate Accuracy
  • Map Rendering
  • Reverse Conversion

Key Learnings

  • Geo Gridding
  • Spatial Mapping
  • Encoding System
  • Offline Logic
  • Map Integration
  • State Handling

Overview

Bharat-Pin is an open-source, geo-coded addressing system built to provide a scalable and standardized digital address layer for India. Inspired by the Government of India's DIGIPIN initiative, this project divides India's geography into uniform 4m x 4m grids, assigning each a unique 10-character alphanumeric code based on latitude and longitude. It bridges the gap between physical locations and their digital representations and powers "Address as a Service" (AaaS) for seamless public and private service delivery.


Features

  • πŸ”’ Generates unique 10-digit alphanumeric DIGIPIN-like codes.
  • πŸ—ΊοΈ Uses Leaflet.js to render interactive maps and grids.
  • πŸ“ Click on any location to get the Bharat PIN for that spot.
  • 🌐 Converts between coordinates ↔ code in real-time.
  • βš™οΈ Offline usable logic for encoding and decoding.

Tech Stack

React.js β€” Frontend framework for building the user interface.

Tailwind CSS β€” Utility-first CSS framework for rapid and consistent styling.

Shadcn UI β€” Component library built with Radix UI primitives and Tailwind CSS for accessible and customizable UI design.

Leaflet.js β€” JavaScript library for interactive map rendering.

TanStack Query β€” Data-fetching library for managing server state, caching, synchronization, and API interactions.

GeoJSON β€” Standard format for encoding various geographic data structures.

JavaScript β€” Core programming language for implementing grid encoding/decoding logic and overall application functionality.


How It Works

  • India's territory is divided into a bounding box from 63.5Β°E – 99.5Β°E and 2.5Β°N – 38.5Β°N.
  • The area is split hierarchically into 4x4 grids for 10 levels (over 1 trillion cells).
  • Each cell is encoded using 16 specific alphanumeric characters.
  • The resulting 10-character code represents a specific 4m x 4m location.
  • The application allows users to generate and decode this code via a visual map interface.

Use Cases

  • πŸ₯ Emergency Response – Share exact location using a 10-digit code.
  • πŸ“¦ Delivery Services – Avoid address errors and improve last-mile delivery.
  • 🧭 Navigation Systems – Pinpoint destinations more accurately than traditional addresses.
  • πŸ™οΈ Urban Planning – Use structured, standardized location identifiers.

What I Learned

  • 🌍 Gained a deep understanding of geo-gridding systems and how to convert coordinates into fixed address codes.
  • βš™οΈ Practiced integrating complex algorithms with frontend tools like React and Leaflet, and improved skills in state management using TanStack Query.

Design & Developed by Asim
Β© 2025. All rights reserved.