Skip to content

Repository files navigation

TerraTrace

TerraTrace is a web platform for transparent monitoring of dam projects and their impact on displaced populations, leveraging satellite imagery, public datasets, and interactive mapping. It is designed for stakeholders, researchers, and affected communities to visualize, document, and report on infrastructure projects and environmental changes in India.

Features

  • Interactive Map: Visualizes Indian dams and forest coverage data with hundreds of markers, auto-centering and auto-fitting to show all data points.
  • Project Pages: Detailed information for each dam, including status, affected population, displacement percentage, and last update.
  • Document Management: Upload and view documents related to dam projects and compensation.
  • Complaints System: Submit and track complaints about displacement, compensation, and environmental impact, with support for evidence uploads.
  • Forest Coverage Visualization: View 26 years of forest data (1987–2013) for all Indian states/UTs, with change analysis and statistics.
  • Authentication: Login and signup with JWT-based authentication.
  • Mobile Responsive: Professional UI/UX, optimized for all devices and technologies.

Basic Architecture

  • Frontend: Next.js (React), Tailwind CSS, Recharts for data visualization, Leaflet for mapping.
  • API: Next.js API routes (app/api/*) for all backend logic, including dams, forest coverage, authentication, complaints, and documents.
  • Database: Neon (PostgreSQL serverless) for storing dam data, complaints, users, and documents.
  • Deployment: Hosted on Vercel, with environment variables for database and API configuration.
[User] <-> [Next.js Frontend] <-> [Next.js API Routes] <-> [Neon Database]

Data Sources

  • Global and Indian dams datasets (6,915 global, 310+ Indian dams)
  • Forest coverage data for 37 Indian states/UTs (1987–2013)

How to Use

  1. Clone the repository and install dependencies (pnpm install)
  2. Set up environment variables (see .env.example)
  3. Run locally with pnpm dev
  4. Deploy to Vercel for production

Deployment Notes

  • All backend logic is implemented as Next.js API routes for Vercel compatibility.
  • Environment variables (e.g., DATABASE_URL, NEXT_PUBLIC_API_URL) must be set in Vercel dashboard.
  • No sensitive files (e.g., .env, database dumps) should be committed.

Scalability & Extensibility

  • Supports 500+ markers on the map (configurable)
  • Database and API ready for 6,915+ global dams
  • Easily extendable for new datasets, clustering, and real-time updates

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages