Skip to content

codinggita/nexhood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

123 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ˜๏ธ NexHood

Know Your Neighborhood. Own Your Space.

The real estate intelligence platform that turns neighborhood guesswork into data-driven decisions โ€” and transforms apartment parking chaos into a frictionless digital experience.

Figma Design License: MIT PRs Welcome Node.js React MongoDB Build Status


๐Ÿ“– Table of Contents


๐Ÿšจ Problem Statement

Real estate is one of the most significant financial decisions a family will ever make โ€” often involving multi-crore investments, multi-year EMIs, and permanent lifestyle shifts. Yet, the tools available to homebuyers are alarmingly primitive.

Problem 1: The Neighborhood Data Desert

When Rahul and his family decided to buy a 3BHK in the outskirts of Pune, they visited six properties, liked two, and chose one based on the price and the builder's brochure. Six months after moving in, they discovered:

  • The nearest school had a D-rated infrastructure
  • A chemical processing unit 2km away consistently pushed the AQI above 180
  • The area had 4โ€“6 hour power cuts every summer
  • The proposed metro line that the broker promised was still a decade away
  • The local water supply was tanker-dependent for 5 months a year

This is not an edge case. This is the norm.

Homebuyers today rely on:

  • Broker word-of-mouth โ€” biased by commission
  • Google Maps reviews โ€” unstructured, incomplete
  • Social media groups โ€” anecdotal, often outdated
  • Government PDFs โ€” buried in bureaucratic portals, unreadable

There is no single, structured, reliable platform that aggregates:

Data Category Current Availability NexHood Approach
School Quality Index Scattered across state portals Aggregated + scored
Air Quality Index CPCB portal, raw numbers Visualization from static/mock data
Water Availability Utility boards, inconsistent Crowd-sourced + verified
Future Infrastructure Master plans in 200-page PDFs Extracted + mapped

Problem 2: The Apartment Parking Warzone

In any gated society with 200+ apartments, parking is a daily battlefield.

Scenario: Mrs. Mehta's daughter is visiting for the weekend. She parks in what seems like a guest slot. Fifteen minutes later, a resident returns and finds their paid spot occupied. The security guard has no record of the visitor. The RWA (Resident Welfare Association) gets a complaint. The visitor is embarrassed. The resident is furious. The guard is helpless.

This happens every single day in apartments across India.

The root causes:

  • No digital visitor registration โ€” paper logbooks are ineffective
  • No parking slot mapping โ€” residents don't know which slots are available
  • No time-bound permissions โ€” visitors stay beyond acceptable hours
  • No accountability chain โ€” when a slot is misused, there's no audit trail
  • Gatekeeping is manual โ€” security guards work with outdated printouts

The result: conflicts, security risks, and a degraded living experience for everyone.


๐Ÿ’ก Our Solution

NexHood is a full-stack real estate intelligence platform built around two core engines:

Engine 1: Neighborhood Intelligence Platform (NIP)

A data aggregation, scoring, and visualization system that gives homebuyers a 360ยฐ profile of any neighborhood before they commit. The platform uses structured static and mock data to present neighborhood metrics across education, safety, environment, water & utilities, infrastructure, and growth potential.

Every neighborhood receives a NexScoreโ„ข โ€” a composite score out of 100 โ€” broken into six sub-scores that buyers can review to compare localities.

Engine 2: Smart Visitor Parking System (SVPS)

A QR-code-based, role-aware parking management system that brings digital accountability to apartment visitor access.

The flow is simple:

  1. Resident invites a visitor via the app โ†’ system generates a time-bound QR pass
  2. Visitor shows QR at gate โ†’ security guard scans โ†’ system validates and logs entry
  3. System allocates a guest parking slot โ†’ visitor navigates to it
  4. On expiry or exit, slot is freed and audit log updated

No paper. No confusion. Full traceability.


โœจ Features

๐Ÿ—บ๏ธ Neighborhood Analytics Dashboard

  • Interactive map view with color-coded NexScore overlays
  • Comparison mode: Compare neighborhoods side-by-side across all metrics
  • Drill-down cards: Click any metric to see data and last-updated timestamp
  • Neighborhood data served from static/mock JSON datasets

๐Ÿ“Š Neighborhood Scoring (NexScoreโ„ข)

  • Composite score (0โ€“100) computed from structured neighborhood data
  • Weighted average of 6 sub-scores:
    • ๐Ÿซ Education Index: School density, board affiliation, infrastructure rating
    • ๐Ÿ”’ Safety Index: Crime incident frequency, type distribution
    • ๐ŸŒฌ๏ธ Environment Index: AQI data, green cover percentage
    • ๐Ÿ’ง Water & Utilities Index: Water availability, power outage frequency
    • ๐Ÿ—๏ธ Infrastructure Index: Road quality, metro/highway proximity
    • ๐Ÿ”ฎ Growth Potential Index: Upcoming projects, price appreciation history

๐Ÿš— QR-Based Visitor Parking System

  • Resident Portal: Generate time-bound visitor passes (2 hours / 4 hours / full day / custom)
  • Pass carries: Visitor name, vehicle number, arrival window, host apartment
  • QR code generation: Server-side QR generated via qrcode library
  • Parking slot dashboard: Visual map of all guest slots and availability
  • Automatic expiry: System flags overstay
  • Audit logs: Every scan event stored with timestamp, guard ID, outcome

๐Ÿ  Admin + Resident Dashboards

Admin Dashboard:

  • Society overview: Total units, active residents, parking capacity
  • Daily visitor traffic analytics
  • Incident reports management

Resident Dashboard:

  • Generate and manage visitor passes
  • View parking slot map
  • Neighborhood score for their locality

๐Ÿ“ฑ Mobile-Friendly UI

  • Fully responsive design with Tailwind CSS breakpoints
  • Touch-optimized map interactions
  • QR scanner uses native camera API

๐Ÿ” Role-Based Access Control (RBAC)

Three distinct roles with granular permissions:

Role Capabilities
Society Admin Manage residents, configure parking, view all logs
Resident Generate passes, view dashboards
Security Guard Scan QR codes, log manual entries

JWT-based authentication with middleware protection on all private routes.


๐Ÿ› ๏ธ Tech Stack

Frontend

Technology Purpose
React.js 18 Component-based UI framework
React Router Client-side routing
Tailwind CSS 3 Utility-first responsive styling
Recharts Responsive chart components (line, bar, radar)
Axios HTTP client with interceptors for auth headers
Context API Global auth state management

Backend

Technology Purpose
Node.js 18 Runtime environment
Express.js REST API framework
JWT Stateless authentication
qrcode Server-side QR code generation as PNG/SVG
Joi Request payload validation

Database

Technology Purpose
MongoDB 6 Primary database (neighborhoods, users, visitor passes)
Mongoose ODM with schema validation and middleware

Tooling

Technology Purpose
ESLint + Prettier Code style enforcement
dotenv Environment variable management

๐Ÿ›๏ธ System Architecture

NexHood follows a clean MVC architecture โ€” with a React frontend (View), Express controllers (Controller), and Mongoose models (Model).

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                          CLIENT LAYER                               โ”‚
โ”‚                                                                     โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚   โ”‚              React Web App (Vite + React Router)          โ”‚     โ”‚
โ”‚   โ”‚         Home ยท Login ยท Dashboard ยท Neighborhood ยท Parking โ”‚     โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚  HTTPS (REST API calls via Axios)
                               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      Express.js API Server                           โ”‚
โ”‚               Auth Middleware ยท CORS ยท Request Logging               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚                        โ”‚                        
        โ–ผ                        โ–ผ                        
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Neighborhood โ”‚   โ”‚  Parking & Visitor โ”‚   โ”‚   User & Auth         โ”‚
โ”‚  Controller   โ”‚   โ”‚  Controller        โ”‚   โ”‚   Controller          โ”‚
โ”‚               โ”‚   โ”‚                   โ”‚   โ”‚                       โ”‚
โ”‚  - Fetch data โ”‚   โ”‚  - Generate QR    โ”‚   โ”‚  - Register / Login   โ”‚
โ”‚  - Score calc โ”‚   โ”‚  - Verify QR      โ”‚   โ”‚  - Role assignment    โ”‚
โ”‚  - Reports    โ”‚   โ”‚  - Slot tracking  โ”‚   โ”‚  - Profile mgmt       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚                    โ”‚                           โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                      โ”‚
                                      โ–ผ
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                          โ”‚       MongoDB         โ”‚
                          โ”‚                      โ”‚
                          โ”‚  - Users             โ”‚
                          โ”‚  - Neighborhoods     โ”‚
                          โ”‚  - Visitor Passes    โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                      โ”‚
                                      โ–ผ
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                          โ”‚    Static Mock Data   โ”‚
                          โ”‚  (neighborhoods.json  โ”‚
                          โ”‚   neighborhoods.js)   โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

API Request Flow โ€” Neighborhood Report

User clicks "View Neighborhood"
        โ”‚
        โ–ผ
React frontend calls GET /api/neighborhood-data/:locality_id
        โ”‚
        โ–ผ
Express API validates JWT via authMiddleware, routes to neighborhoodController
        โ”‚
        โ”œโ”€โ”€โ–บ MongoDB: fetch neighborhood document
        โ”‚
        โ””โ”€โ”€โ–บ Static mock data: fill missing fields from neighborhoods.js
        โ”‚
        โ–ผ
Controller composes full neighborhood object
        โ”‚
        โ–ผ
Response returned to frontend as JSON
        โ”‚
        โ–ผ
React renders dashboard with Recharts + map visualization

๐Ÿ“ Folder Structure

nexhood/
โ”œโ”€โ”€ client/                     # React frontend (View)
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ assets/             # images, icons
โ”‚   โ”‚   โ”œโ”€โ”€ components/         # reusable UI
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ui/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ layout/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ charts/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ map/
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ pages/              # main pages (View layer)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Home.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Login.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Neighborhood.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Parking.jsx
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/              # Controller logic (React hooks)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ useAuth.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ useNeighborhood.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ useParking.js
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ services/           # API calls (Controller)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ api.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ authService.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ neighborhoodService.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ parkingService.js
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ context/            # global state (optional)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ AuthContext.jsx
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ utils/              # helpers
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ constants.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ helpers.js
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ data/               # static/mock data (IMPORTANT)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ neighborhoods.json
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ”‚   โ””โ”€โ”€ main.jsx
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ tailwind.config.js
โ”‚
โ”œโ”€โ”€ server/                     # Backend (Model + Controller)
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ””โ”€โ”€ db.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ models/                 # Model layer
โ”‚   โ”‚   โ”œโ”€โ”€ User.js
โ”‚   โ”‚   โ”œโ”€โ”€ Neighborhood.js
โ”‚   โ”‚   โ””โ”€โ”€ Visitor.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ controllers/            # Controller logic
โ”‚   โ”‚   โ”œโ”€โ”€ authController.js
โ”‚   โ”‚   โ”œโ”€โ”€ neighborhoodController.js
โ”‚   โ”‚   โ””โ”€โ”€ parkingController.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ routes/                 # Routes
โ”‚   โ”‚   โ”œโ”€โ”€ authRoutes.js
โ”‚   โ”‚   โ”œโ”€โ”€ neighborhoodRoutes.js
โ”‚   โ”‚   โ””โ”€โ”€ parkingRoutes.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ”‚   โ””โ”€โ”€ authMiddleware.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ””โ”€โ”€ generateQR.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ data/                   # mock data (VERY USEFUL)
โ”‚   โ”‚   โ””โ”€โ”€ neighborhoods.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ app.js
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ package.json

โš™๏ธ Installation Guide

Prerequisites

Ensure you have the following installed:

  • Node.js >= 18.0.0
  • MongoDB 6.x (local or Atlas)
  • Git

1. Clone the Repository

git clone https://github.com/your-org/nexhood.git
cd nexhood

2. Install Dependencies

# Install root dependencies
npm install

# Install client dependencies
cd client && npm install

# Install server dependencies
cd ../server && npm install

3. Set Up Environment Variables

Backend (server/.env)

# App
NODE_ENV=development
PORT=4000

# MongoDB
MONGODB_URI=mongodb://localhost:27017/nexhood

# JWT
JWT_SECRET=your-very-long-random-secret-key-here
JWT_EXPIRES_IN=7d

# QR Code
QR_BASE_URL=http://localhost:3000/verify

Frontend (client/.env)

VITE_API_URL=http://localhost:4000/api

4. Database Setup

Start MongoDB

# If running locally
mongod

Seed Initial Data

cd server
npm run seed
# Populates: sample neighborhoods, demo society, admin user

5. Start the Development Servers

# Terminal 1 โ€” Backend API
cd server && npm run dev

# Terminal 2 โ€” Frontend
cd client && npm run dev

6. Verify Setup

Visit the following URLs to confirm everything is running:

  • Frontend: http://localhost:5173
  • API Health: http://localhost:4000/api/health

Default credentials after seeding:

  • Admin: admin@nexhood.in / Admin@123
  • Resident: demo.resident@nexhood.in / Resident@123

๐Ÿ“˜ Usage Guide

Workflow 1: First-Time Homebuyer โ€” Evaluating a Neighborhood

  1. Register as a new user at /register
  2. Navigate to Neighborhood Explorer from the sidebar
  3. Search for a locality by name or pin code (e.g., "Baner, Pune")
  4. View the NexScoreโ„ข overview card โ€” overall score + 6 sub-scores
  5. Click "View Full Analysis" to expand the dashboard:
    • Explore the AQI trend chart
    • View the infrastructure timeline (upcoming projects)
  6. Click "Compare" to add a second neighborhood side-by-side

Workflow 2: Visitor Parking QR Flow

Step 1 โ€” Resident generates a pass:

  1. Resident logs in โ†’ goes to Parking section
  2. Clicks "Invite Visitor"
  3. Fills form: Visitor Name, Vehicle Number, Expected Arrival, Duration
  4. Clicks "Generate Pass"
  5. System creates a time-bound QR code

Step 2 โ€” Visitor arrives:

  1. Visitor shows QR code on phone to security guard
  2. Guard opens the Guard App (/guard) and taps "Scan QR"
  3. Camera opens โ†’ scans QR
  4. System validates: checks token signature and expiry
  5. If valid: โœ… Green screen with slot assignment (e.g., "G-07")
  6. If expired/invalid: โŒ Red screen with reason

Step 3 โ€” Slot update:

  1. Resident's dashboard shows parking slot as "Occupied"
  2. On visitor exit, guard marks exit โ†’ slot freed โ†’ dashboard updates

๐ŸŽจ Design & Prototypes

The UI/UX of NexHood is designed with a focus on clarity, data-driven insights, and seamless user experience for both homebuyers and residential societies.

The design system emphasizes:

  • Clean and intuitive dashboards for complex data visualization
  • Map-first interface for neighborhood exploration
  • Mobile-friendly flows for visitor parking and QR scanning
  • Role-based UI tailored for Admins, Residents, and Security Guards

Figma Project:
https://www.figma.com/proto/iuxNtjRbFpwefcHVPplrlT/MID_SEM?page-id=74%3A1289&node-id=84-2&p=f&viewport=80%2C-61%2C0.15&t=ee6ZGvsyigkQYL9u-1&scaling=scale-down-width&content-scaling=fixed&starting-point-node-id=84%3A2

Key Screens Designed:

  • Neighborhood Explorer
  • NexScore Dashboard
  • Infrastructure Timeline
  • Visitor Pass Generation
  • QR Scanner (Guard App)

Note: The screenshots below are exported directly from the Figma designs.


๐Ÿ“ธ Screenshots

๐Ÿ“Œ Screenshots are from the live staging environment at staging.nexhood.in

Screen Preview
Neighborhood Explorer
NexScoreโ„ข Dashboard
Infrastructure Timeline
Neighborhood Comparison

๐Ÿ“ก API Documentation

Base URL: http://localhost:4000/api

All authenticated endpoints require:

Authorization: Bearer <access_token>
Content-Type: application/json

๐Ÿ” Auth Endpoints

POST /auth/register

Register a new user.

Request:

{
  "name": "Rahul Sharma",
  "email": "rahul@example.com",
  "password": "SecurePass@123",
  "role": "resident",
  "society_id": "soc_abc123"
}

Response 201:

{
  "success": true,
  "user": { "id": "usr_xyz", "name": "Rahul Sharma", "role": "resident" },
  "accessToken": "eyJhbGci..."
}

POST /auth/login

Authenticate and receive token.


๐Ÿ˜๏ธ Neighborhood Endpoints

GET /neighborhood-data/:locality_id

Fetch full neighborhood data object.

Response 200:

{
  "locality": {
    "id": "loc_pune_baner",
    "name": "Baner",
    "city": "Pune",
    "coordinates": { "lat": 18.5590, "lng": 73.7868 },
    "nexscore": 71,
    "sub_scores": {
      "education": 78,
      "safety": 65,
      "environment": 58,
      "water_utilities": 72,
      "infrastructure": 80,
      "growth_potential": 74
    },
    "data_confidence": "high"
  }
}

POST /neighborhood-data/compare

Compare multiple localities.

Request:

{
  "locality_ids": ["loc_pune_baner", "loc_pune_wakad", "loc_pune_kothrud"]
}

Response 200: Array of scored locality objects.


๐Ÿš— Visitor Parking Endpoints

POST /visitor-pass

Generate a new time-bound QR visitor pass. Requires resident role.

Request:

{
  "visitor_name": "Priya Kapoor",
  "vehicle_number": "MH12AB1234",
  "arrival_window_start": "2025-04-15T14:00:00Z",
  "duration_hours": 4,
  "host_apartment": "B-402"
}

Response 201:

{
  "pass_id": "vp_7f9c2a",
  "qr_code_url": "http://localhost:4000/qr/vp_7f9c2a.png",
  "valid_until": "2025-04-15T18:00:00Z",
  "slot_pre_assigned": "G-07",
  "status": "active"
}

POST /verify-qr

Validate a scanned QR pass. Requires guard or admin role.

Request:

{
  "token": "vp_7f9c2a_signed_payload_here",
  "guard_id": "grd_001",
  "scan_type": "entry"
}

Response 200 (valid):

{
  "valid": true,
  "visitor_name": "Priya Kapoor",
  "vehicle_number": "MH12AB1234",
  "host_apartment": "B-402",
  "slot_assigned": "G-07",
  "valid_until": "2025-04-15T18:00:00Z",
  "message": "Access granted. Direct visitor to slot G-07."
}

Response 403 (expired):

{
  "valid": false,
  "reason": "pass_expired",
  "expired_at": "2025-04-15T18:00:00Z",
  "message": "This pass has expired. Please ask the resident to generate a new pass."
}

PATCH /visitor-pass/:pass_id/exit

Mark a visitor as exited and free the parking slot.

Response 200:

{
  "success": true,
  "slot_freed": "G-07",
  "duration_parked": "3h 22m",
  "exit_time": "2025-04-15T17:22:00Z"
}

GET /parking/slots/:society_id

Get parking slot map for a society.

Response 200:

{
  "total_guest_slots": 20,
  "available": 13,
  "occupied": 7,
  "slots": [
    { "slot_id": "G-01", "status": "available" },
    { "slot_id": "G-07", "status": "occupied", "pass_id": "vp_7f9c2a", "visitor": "Priya Kapoor" }
  ]
}

๐Ÿ—„๏ธ Database Schema

MongoDB Collections

neighborhoods

{
  _id: ObjectId,
  locality_id: String,        // Unique slug: "pune_baner"
  name: String,
  city: String,
  state: String,
  coordinates: { lat: Number, lng: Number },
  nexscore: Number,           // Composite score
  sub_scores: {
    education: Number,
    safety: Number,
    environment: Number,
    water_utilities: Number,
    infrastructure: Number,
    growth_potential: Number
  },
  raw_data: {
    aqi: { current: Number, trend: Array },
    schools: Array,
    upcoming_projects: Array
  },
  last_synced: Date,
  created_at: Date
}

visitor_passes

{
  _id: ObjectId,
  pass_id: String,            // "vp_7f9c2a"
  resident_id: ObjectId,
  society_id: ObjectId,
  visitor_name: String,
  vehicle_number: String,
  host_apartment: String,
  slot_assigned: String,
  qr_token: String,           // Signed token embedded in QR
  valid_from: Date,
  valid_until: Date,
  status: Enum['active', 'used', 'expired', 'revoked'],
  scan_logs: [{
    guard_id: ObjectId,
    scan_type: Enum['entry', 'exit'],
    timestamp: Date,
    result: Enum['success', 'failed']
  }],
  created_at: Date
}

users

{
  _id: ObjectId,
  name: String,
  email: String,              // Unique
  password_hash: String,      // bcrypt
  role: Enum['admin', 'resident', 'guard'],
  society_id: ObjectId,
  apartment: String,          // e.g., "B-402"
  is_active: Boolean,
  created_at: Date
}

๐Ÿ”ฎ Future Improvements

๐Ÿค– Advanced AI Predictions

  • Price appreciation forecast: ML model trained on historical price data + infrastructure developments to predict 2โ€“5 year property value growth
  • Personalized matching: Input your lifestyle profile and get ranked neighborhood recommendations

๐Ÿ“ฑ Native Mobile App

  • iOS + Android apps built with React Native
  • Offline-first architecture with local caching for low-connectivity areas
  • Biometric authentication for guard app
  • Push notifications for QR expiry, slot availability

๐Ÿ”Œ IoT Parking Sensors

  • Ultrasonic sensors in parking slots transmit live occupancy via MQTT
  • Automatic slot status updates without manual guard intervention
  • Dashboard shows sensor battery levels and health

๐Ÿ›๏ธ Government Data Integration

  • Direct API integrations with:
    • NCRB (National Crime Records Bureau)
    • UDISE+ (Unified District Information System for Education)
    • Smart Cities Mission portal
    • MoHUA (Ministry of Housing and Urban Affairs)
  • Auto-sync scheduled tasks replace manual data upload

๐Ÿ—๏ธ Developer API (B2B)

  • Public API for PropTech companies to embed NexScore widgets
  • White-label neighborhood intelligence for real estate portals
  • Tiered pricing with rate limiting via API keys

๐Ÿ—ฃ๏ธ Multilingual Support

  • UI localization: Hindi, Marathi, Tamil, Telugu, Kannada
  • Voice-based neighborhood search for low-literacy users
  • Regional government portal scraping for state-specific data

๐Ÿง— Challenges Faced

1. Data Aggregation

Challenge: Government data exists in 50+ formats โ€” some as PDFs, some as Excel sheets, some as poorly structured HTML tables.

Approach: Used structured static JSON datasets (neighborhoods.json / neighborhoods.js) as a reliable fallback, with mock data representing verified neighborhood metrics. Coverage can be extended as real data sources become available.


2. QR Token Security

Challenge: A malicious user could screenshot a valid QR and share it, or attempt to reuse expired tokens.

Approach:

  • QR tokens are signed with HMAC using a server-side secret
  • Token validity is checked against expiry on every scan
  • Guard app displays registered vehicle number for manual cross-check
  • 5-minute post-expiry grace window to handle clock drift

3. Privacy & Misuse Concerns

Challenge: Visitor pass data contains PII. QR token security must be airtight.

Approach:

  • Visitor PII encrypted at rest
  • QR tokens are time-bound with expiry validation
  • Role-based access ensures only authorized guards can verify passes

๐Ÿค Contributing

We welcome contributions from developers, designers, data engineers, and domain experts in real estate and urban planning.

Getting Started

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/your-feature-name
  3. Follow the coding standards: npm run lint && npm run format
  4. Write tests for new features: npm run test
  5. Submit a pull request with a clear description

Contribution Areas

  • ๐Ÿ—„๏ธ Data: Help source and clean neighborhood datasets for new cities
  • ๐ŸŽจ Design: UI/UX improvements, accessibility
  • ๐Ÿ”ง Backend: New API endpoints, performance optimization
  • ๐Ÿ“– Docs: Improve documentation and add usage examples

Code Standards

  • All code must pass ESLint + Prettier checks
  • New API endpoints must include Joi validation
  • React components must follow hook-based patterns
  • Commits follow Conventional Commits format

Reporting Issues

Use the GitHub Issues tab. Please include:

  • Environment (OS, Node version, browser)
  • Steps to reproduce
  • Expected vs actual behaviour
  • Relevant logs (redact sensitive data)

๐Ÿ“„ License

This project is licensed under the MIT License.

MIT License

Copyright (c) 2025 NexHood Technologies Pvt. Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

See LICENSE for full text.


๐Ÿ‘ค Authors

Hanuman Singh
Full-Stack Engineer & Product Lead
@Github ยท LinkedIn

๐Ÿ’Œ For business inquiries, partnerships, or pilot programs: hanumanrajpurohit.vercel.app


Built with โค๏ธ for homebuyers who deserve better data.

NexHood โ€” Know Your Neighborhood. Own Your Space.

โญ If this project helped you, consider giving it a star!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors