Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GraveMap πŸ—ΊοΈ

Find any grave. Preserve every memory.

GraveMap is an open-source platform for digitally mapping and preserving cemeteries. Every cemetery, every grave, and every empty plot β€” searchable and locatable by anyone, forever.

Live Demo GitHub Pages License: MIT


🧭 The Problem

Most cemeteries around the world still rely on:

  • πŸ“„ Paper registers and old notebooks
  • 🧠 The memory of elderly caretakers
  • πŸ—οΈ Word-of-mouth knowledge passed down generations

When someone asks "Where is my grandfather buried?" the answer is often "Ask the old caretaker." Years later, nobody knows. Many graves disappear entirely. Cemeteries fill up, but nobody can find the empty plots.

GraveMap solves this.


βœ… Features

🌍 Public (No Login Required)

Feature Description
Interactive satellite map Full-screen map with cemetery boundaries and color-coded grave plots
Grave search Search by name, father's name, cemetery, city, or gender
Grave detail View name, dates, biography, section/row/plot, photo, and status
Shareable links Every grave has a unique URL (#grave-ID) β€” share on WhatsApp instantly
QR code Auto-generated QR code on every grave detail page
Navigate to grave One tap opens Google Maps with driving directions
Print grave card Professional printable record with QR code and all details
Cemetery directory Browse all registered cemeteries with occupancy stats
Request a cemetery Submit a request for a new cemetery to be added
Report corrections Flag wrong grave information for admin review

πŸ” Admin (Google Sign-In Required)

Feature Description
Cemetery wizard 3-step wizard: Info β†’ Pin location β†’ Draw boundary polygon
Grave wizard 3-step wizard: Person info β†’ Select cemetery β†’ Draw grave rectangle
Generate Grave Grid Auto-fill a cemetery with evenly-spaced grave plots from boundary
CSV bulk import Upload a spreadsheet to register hundreds of graves at once
Photo via URL Link an external photo (Imgur, Google Photos, etc.) to any grave
Dashboard Stats tiles: total graves, cemeteries, occupied, available, reserved, pending
Request management Review and approve/reject cemetery + correction requests
Quick status update Mark any grave as Occupied / Reserved / Empty from detail view
Satellite/street toggle Switch between satellite imagery and street map

πŸ› οΈ Technology Stack

Frontend

  • HTML5, CSS3, JavaScript (Vanilla) β€” no framework, no build step
  • Leaflet.js β€” interactive maps
  • Leaflet Geoman β€” polygon and rectangle drawing tools
  • Esri World Imagery β€” satellite tile layer
  • qrcodejs β€” QR code generation
  • Outfit β€” Google Fonts typography

Backend & Database

πŸ’‘ Zero server cost. Everything runs on Firebase free tier + GitHub Pages. No backend server, no Docker, no VPS.


πŸ—„οΈ Database Schema

Firebase Realtime Database
β”‚
β”œβ”€β”€ cemeteries/
β”‚   └── {id}/
β”‚       β”œβ”€β”€ name, city, province, district, country
β”‚       β”œβ”€β”€ address, description
β”‚       β”œβ”€β”€ centerLat, centerLng
β”‚       └── boundary          ← JSON polygon coordinates
β”‚
β”œβ”€β”€ graves/
β”‚   └── {id}/
β”‚       β”œβ”€β”€ cemeteryId
β”‚       β”œβ”€β”€ name, fatherName, gender
β”‚       β”œβ”€β”€ dob, deathDate, burialDate, age
β”‚       β”œβ”€β”€ section, row, plot
β”‚       β”œβ”€β”€ bio
β”‚       β”œβ”€β”€ status            ← "occupied" | "empty" | "reserved"
β”‚       β”œβ”€β”€ photoUrl          ← external image URL (no storage cost)
β”‚       β”œβ”€β”€ polygon           ← JSON rectangle coordinates
β”‚       β”œβ”€β”€ lat, lng          ← grave center coordinates
β”‚       β”œβ”€β”€ relatives/        ← [NEW] Bidirectional family tree relations
β”‚       β”‚   └── {relativeGraveId}
β”‚       β”‚       └── relation  ← "spouse" | "parent" | "child" | "sibling" | "other"
β”‚       └── createdAt
β”‚
β”œβ”€β”€ requests/
β”‚   └── {id}/
β”‚       β”œβ”€β”€ type              ← "new-cemetery" | "correction"
β”‚       β”œβ”€β”€ resolved          ← boolean
β”‚       └── ...fields
β”‚
β”œβ”€β”€ admins/                   ← [NEW] Managed list of Google UIDs
β”‚   └── {uid}/
β”‚       β”œβ”€β”€ email
β”‚       β”œβ”€β”€ name
β”‚       └── addedAt
β”‚
└── fcmTokens/                ← [NEW] Registered FCM tokens for admins
    └── {uid}/
        β”œβ”€β”€ token
        β”œβ”€β”€ email
        └── updatedAt

πŸš€ Getting Started

Run Locally

# Clone the repo
git clone https://github.com/shakeel143/GraveMap.git
cd GraveMap

# Serve with Python (no install needed)
python -m http.server 8000

# Open in browser
# http://localhost:8000

No npm install, no build step. Just open and run.

Firebase Setup (for your own instance)

  1. Create a project at console.firebase.google.com.
  2. Enable Realtime Database and Authentication β†’ Google provider.
  3. Replace the firebaseConfig object in index.html with your own credentials.
  4. Set the Realtime Database Rules to the following configuration (necessary for PWA, FCM, and multi-admin bootstrapping):
{
  "rules": {
    "cemeteries": {
      ".read": true,
      ".write": "auth != null"
    },
    "graves": {
      ".read": true,
      ".write": "auth != null"
    },
    "deceased": {
      ".read": true,
      ".write": "auth != null"
    },
    "requests": {
      ".read": "auth != null",
      ".write": true
    },
    "notifications": {
      ".read": "auth != null",
      ".write": "auth != null"
    },
    "admins": {
      ".read": "auth != null",
      "$uid": {
        ".write": "auth != null && (!root.child('admins').exists() || root.child('admins').child(auth.uid).exists())"
      }
    },
    "fcmTokens": {
      "$uid": {
        ".read": "auth != null && auth.uid == $uid",
        ".write": "auth != null && auth.uid == $uid"
      }
    }
  }
}

πŸ“ Project Structure

GraveMap/
β”œβ”€β”€ index.html                # Single-page app β€” HTML, head meta scripts, and SW init
β”œβ”€β”€ css/
β”‚   └── style.css             # Main styling + RTL direction & family tree styles
β”œβ”€β”€ js/
β”‚   └── app.js                # Main logic (Leaflet, wizards, language translation, family links, charts, FCM)
β”œβ”€β”€ sw.js                     # PWA Service Worker (App shell caching + offline map strategies)
β”œβ”€β”€ manifest.json             # Web App Manifest for mobile installation/PWA compliance
β”œβ”€β”€ firebase-messaging-sw.js  # FCM Service Worker for handling background notifications
β”œβ”€β”€ favicon.png               # Main app icon
β”œβ”€β”€ og-cover.png              # Cover image for social share previews
└── README.md

πŸ—ΊοΈ Roadmap

βœ… Phase 1 β€” Foundation

  • Google Authentication (admin only)
  • Firebase Realtime Database
  • Leaflet.js interactive map
  • Public map view with cemetery boundaries
  • Basic search

βœ… Phase 2 β€” Core Features

  • 3-step Cemetery creation wizard (info β†’ location β†’ draw boundary)
  • 3-step Grave registration wizard (person β†’ cemetery β†’ draw plot)
  • Color-coded grave status: 🟒 Available Β· πŸ”΄ Occupied Β· 🟑 Reserved
  • Satellite imagery as default map layer
  • Satellite / Street map toggle

βœ… Phase 3 β€” Community & Admin

  • Cemetery request workflow (public β†’ admin review)
  • Correction report workflow
  • Admin dashboard with statistics tiles
  • Generate Grave Grid (auto-fill boundary with plots)
  • Approve / reject requests

βœ… Phase 4 β€” Sharing & Convenience

  • QR code on every grave
  • Shareable grave URLs (#grave-ID)
  • πŸ”— Copy link button
  • πŸ–¨οΈ Print grave card (with QR code)
  • 🧭 Google Maps navigation
  • πŸ“₯ CSV bulk import with preview table
  • πŸ–ΌοΈ External photo URL (no storage cost)
  • OG/Twitter meta tags for social sharing previews
  • Escape key closes modals
  • Full mobile responsive layout

βœ… Phase 5 β€” Advanced

  • Multi-admin management (add/remove admin UIDs from dashboard)
  • Urdu / RTL language support
  • PWA / offline mode (service worker + manifest.json)
  • Family tree linking between related graves (bidirectional, with admin search UI)
  • FCM push notifications for new requests (foreground + background, VAPID-ready)
  • Occupancy analytics charts (donut + per-cemetery stacked bar chart)

🎨 Design

  • Dark topbar with glassmorphism backdrop filter
  • Map-first layout β€” the map is always full-screen behind all panels
  • Floating panels β€” left sidebar + right tools float over the map
  • Modals as wizards β€” multi-step forms with clear progress indicators
  • Color system: #2ECC8A Available Β· #E05A5A Occupied Β· #F0B429 Reserved
  • Mobile β€” panels collapse to bottom sheets, modals slide up from bottom

πŸ“Έ CSV Import Format

Download the template from Admin β†’ Graves β†’ πŸ“₯ Import CSV, or use this column layout:

name,fatherName,gender,dob,deathDate,burialDate,age,section,row,plot,bio,status,photoUrl
Ahmed Ali,Muhammad Ali,male,1945-03-12,2020-11-05,2020-11-06,75,A,3,12,A beloved father,occupied,
Column Format Required
name Full name βœ…
fatherName Father's full name β€”
gender male or female β€”
dob YYYY-MM-DD β€”
deathDate YYYY-MM-DD β€”
burialDate YYYY-MM-DD β€”
age Number β€”
section, row, plot Alphanumeric β€”
bio Free text β€”
status occupied, empty, or reserved β€”
photoUrl Public image URL β€”

Imported graves are fully searchable immediately. They appear on the map once a polygon is drawn for them.


🀝 Contributing

Pull requests are welcome. For major changes, please open an issue first.

  1. Fork the repo
  2. Create your branch: git checkout -b feature/my-feature
  3. Commit: git commit -m 'feat: add my feature'
  4. Push: git push origin feature/my-feature
  5. Open a Pull Request

πŸ“„ License

MIT Β© Shakeel

About

GraveMap is a map-first platform designed to digitize and preserve cemetery records. It enables public searching of grave plots, interactive maps, driving directions, and printable grave cards. For administrators, it offers satellite-based plot drawing wizards, bulk CSV imports, multi-admin management, and automatic grid generation.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages