Skip to content

sa001gar/nearby-guardians

Repository files navigation

Nearby Guardians

A location-based safety and mutual-help platform where users can request help in real-life situations and verified volunteers nearby can respond.

Nearby Guardians

Overview

Nearby Guardians connects people in need with verified volunteers in their vicinity. Whether it's a medical emergency, safety concern, or everyday assistance, our platform ensures help is always nearby.

Documentation

Document Description
Database Schema Complete database structure, tables, and relationships
Application Flow User journeys, workflows, and state diagrams
Technical Documentation Architecture, API routes, and implementation details

Quick Start

Prerequisites

  • Node.js 18+ (or Bun)
  • pnpm (recommended, or use npm/yarn)

Environment Variables

Create a .env.local file with the following variables:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# Aadhaar Encryption (32 bytes, base64 encoded)
AADHAAR_ENCRYPTION_KEY=your_32_byte_base64_key

# Redis (Upstash)
KV_REST_API_URL=your_upstash_url
KV_REST_API_TOKEN=your_upstash_token

# Supabase Auth Redirect (for development)
NEXT_PUBLIC_DEV_SUPABASE_REDIRECT_URL=http://localhost:3000

Installation

# Clone the repository
git clone https://github.com/sa001gar/nearby-guardians.git
cd nearby-guardians

# Install dependencies
pnpm install

# Run development server
pnpm dev

Features

For Users

  • Create help requests with location, category, and urgency
  • Upload images/videos for context
  • Track request status in real-time
  • Rate volunteers after receiving help

For Volunteers

  • Browse nearby help requests
  • Accept and respond to requests
  • Build reputation through ratings and badges
  • Set availability and response radius

For Admins

  • Verify KYC documents
  • Manage users and roles
  • View encrypted Aadhaar (secure decryption)
  • Monitor all help requests

For Police (Demo)

  • View high-risk alerts only
  • Minimal personal data exposure
  • Location-based monitoring

Tech Stack

Component Technology
Frontend Next.js 16, TypeScript, Tailwind CSS
UI Components shadcn/ui
Database Supabase (PostgreSQL + PostGIS)
Authentication Supabase Auth
Storage Supabase Storage
Caching Upstash Redis
Deployment Vercel

Project Structure

nearby-guardians/
├── app/                    # Next.js App Router pages
│   ├── admin/             # Admin dashboard
│   ├── auth/              # Authentication pages
│   ├── dashboard/         # User dashboard
│   ├── feed/              # Help request feed
│   ├── help/              # Help request pages
│   ├── kyc/               # KYC verification
│   ├── my-assignments/    # Volunteer assignments
│   ├── my-requests/       # User's requests
│   ├── notifications/     # Notification center
│   ├── onboarding/        # User onboarding
│   ├── police/            # Police demo dashboard
│   └── profile/           # User profile
├── components/            # React components
├── hooks/                 # Custom React hooks
├── lib/                   # Utility libraries
│   └── supabase/         # Supabase clients
├── scripts/               # Database migration scripts
├── docs/                  # Documentation
└── types/                 # TypeScript types

Security

  • AES-256 Encryption: Aadhaar numbers are encrypted before storage
  • Row Level Security: All tables have RLS policies
  • Signed URLs: Document storage uses signed URLs
  • Role-based Access: Four roles with different permissions
  • No Client-side Decryption: Sensitive data only decrypted server-side

User Roles

Role Permissions
user Create help requests, view own data
volunteer Accept requests, view nearby requests
admin Full access, KYC verification, decrypt Aadhaar
police_demo View high-risk alerts only (demo)

Our Team

Name Role GitHub
Shreya Ray Frontend Developer Shree-Thecreator
Soumitra Konar Backend Developer Rishi713144
Sahabaj Sekh Research Lead sahabaj-sekh
Monidipa Bhattacharjee Documentation Lead misti31307

Built with ❤️ for community safety by Department of Computer Science | Mankar College

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors