Skip to content

About

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Unified-EV

One app. Every charger. No prepaid wallets. Reliability you can trust.

Unified-EV is a cross-CPO EV charging platform for India that solves the fragmented charging experience by providing a single app to access every charging network with real-time reliability data and direct paymentβ€”no prepaid wallets required.

Live Demo Next.js TypeScript License


🎯 The Problem

EV drivers in India face a painful charging experience:

  • Multiple apps β€” Each CPO (Tata Power, Jio-bp, Statiq, HPCL, etc.) requires its own app
  • Prepaid wallets β€” Money locked in each CPO's ecosystem with minimum top-ups
  • Unreliable chargers β€” No way to know if a charger actually works before driving there
  • Fragmented history β€” Charging data scattered across multiple apps

πŸ’‘ The Solution

Unified-EV provides:

  • βœ… Single app for all CPOs β€” Access every charging network in one place
  • βœ… Reliability-first β€” Color-coded stations (green/amber/red) based on 30-day success rate
  • βœ… Direct payment β€” Pay with UPI, cards, or netbanking. No prepaid wallets.
  • βœ… Smart routing β€” Route planner recommends the most reliable charging stops
  • βœ… Unified passport β€” All your charging history and stats in one place
  • βœ… Verified reviews β€” Only users who've charged can review (no fake reviews)

πŸ—οΈ Architecture

Tech Stack

Layer Technology Purpose
Framework Next.js 15 (App Router) React framework with SSR/SSG support
Language TypeScript 5.6 Type-safe development
Styling Tailwind CSS Utility-first CSS framework
State Management Zustand Lightweight state management
Maps Google Maps API Station mapping and route planning
Charts Recharts Battery health visualization
Payment Razorpay (mocked) Multi-method payment gateway
Deployment Vercel Edge-optimized hosting

Current Status: Layer 1 (V1 Prototype)

This is a fully-functional demo with mocked backend data. See DOCS/01_MVP_Overview.md for the complete product vision and roadmap.


πŸ“ Project Structure

unified-ev/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router pages
β”‚   β”‚   β”œβ”€β”€ page.tsx           # Landing page
β”‚   β”‚   β”œβ”€β”€ map/               # Unified map with stations
β”‚   β”‚   β”œβ”€β”€ station/[id]/      # Station detail page
β”‚   β”‚   β”œβ”€β”€ scan/              # QR scan & payment
β”‚   β”‚   β”œβ”€β”€ session/[id]/      # Live session & completion
β”‚   β”‚   β”œβ”€β”€ route/             # Route planner
β”‚   β”‚   β”œβ”€β”€ passport/          # Charging passport
β”‚   β”‚   β”œβ”€β”€ profile/           # User profile
β”‚   β”‚   β”œβ”€β”€ onboarding/        # OTP & vehicle setup
β”‚   β”‚   └── story/             # Founder story
β”‚   β”‚
β”‚   β”œβ”€β”€ components/             # React components
β”‚   β”‚   β”œβ”€β”€ layout/            # Navigation, theme toggle
β”‚   β”‚   β”œβ”€β”€ map/               # Map canvas, bottom sheet, filters
β”‚   β”‚   β”œβ”€β”€ station/           # Station cards, pins, reliability badges
β”‚   β”‚   β”œβ”€β”€ session/           # SoC dial, session UI
β”‚   β”‚   β”œβ”€β”€ payment/           # Payment sheet (Razorpay mock)
β”‚   β”‚   β”œβ”€β”€ route/             # Route map with polylines
β”‚   β”‚   β”œβ”€β”€ passport/          # Battery health chart
β”‚   β”‚   └── ui/                # Toast, skeleton loaders
β”‚   β”‚
β”‚   β”œβ”€β”€ data/                   # Mock JSON data (Layer 1)
β”‚   β”‚   β”œβ”€β”€ stations.json      # 60+ seeded stations
β”‚   β”‚   β”œβ”€β”€ routes.json        # 3 pre-generated routes
β”‚   β”‚   β”œβ”€β”€ history.json       # 15 charging sessions
β”‚   β”‚   β”œβ”€β”€ vehicles.json      # 15 EV models with specs
β”‚   β”‚   β”œβ”€β”€ reviews.json       # Station reviews
β”‚   β”‚   β”œβ”€β”€ reliability.json   # Reliability scores
β”‚   β”‚   └── cpos.json          # CPO metadata
β”‚   β”‚
β”‚   β”œβ”€β”€ stores/                 # Zustand state stores
β”‚   β”‚   β”œβ”€β”€ userStore.ts       # User profile & auth state
β”‚   β”‚   β”œβ”€β”€ mapStore.ts        # Map filters & search
β”‚   β”‚   β”œβ”€β”€ sessionStore.ts    # Active session state
β”‚   β”‚   β”œβ”€β”€ passportStore.ts   # Charging history
β”‚   β”‚   └── themeStore.ts      # Dark/light mode
β”‚   β”‚
β”‚   β”œβ”€β”€ hooks/                  # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ useStations.ts     # Fetch & filter stations
β”‚   β”‚   β”œβ”€β”€ useStation.ts      # Single station data
β”‚   β”‚   β”œβ”€β”€ useSessionSim.ts   # Session simulation
β”‚   β”‚   β”œβ”€β”€ useToast.ts        # Toast notifications
β”‚   β”‚   └── useReliabilityLive.ts
β”‚   β”‚
β”‚   └── lib/                    # Utilities & business logic
β”‚       β”œβ”€β”€ data/              # Data client (adapter pattern)
β”‚       β”œβ”€β”€ reliability.ts     # Reliability calculations
β”‚       β”œβ”€β”€ recommend.ts       # Smart recommendation engine
β”‚       └── format.ts          # Number/date formatting
β”‚
β”œβ”€β”€ docs/                       # Comprehensive documentation
β”‚   β”œβ”€β”€ 01_MVP_Overview.md     # Product vision & MVP scope
β”‚   β”œβ”€β”€ 02_Layer_1_V1_Prototype.md
β”‚   β”œβ”€β”€ 03_Layer_2_Post_Pilot.md
β”‚   β”œβ”€β”€ 04_Layer_3_Production.md
β”‚   β”œβ”€β”€ 05_Future_Scope_Must_Add.md
β”‚   β”œβ”€β”€ 06_Future_Scope_Should_Add.md
β”‚   └── design/                # Design system & mockups
β”‚
β”œβ”€β”€ prompts/                    # Week-by-week build prompts
β”œβ”€β”€ scripts/                    # Data generation scripts
└── public/                     # Static assets

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ or Bun
  • pnpm (recommended) or npm
  • Google Maps API key

Installation

  1. Clone the repository

    git clone https://github.com/dilipsaroj/unified-ev-app.git
    cd unified-ev-app
  2. Install dependencies

    pnpm install
    # or
    npm install
  3. Set up environment variables

    cp .env.example .env.local

    Edit .env.local and add your Google Maps API key:

    NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_api_key_here
  4. Run the development server

    pnpm dev
    # or
    npm run dev
  5. Open in browser

    Navigate to http://localhost:3000

Build for Production

pnpm build
pnpm start

🎨 Key Features

1. Reliability-First Map

  • 60+ stations across 6 CPOs (Tata Power, Jio-bp, Statiq, HPCL, IOCL, BPCL)
  • Color-coded by reliability: 🟒 Green (>90%) β€’ 🟑 Amber (70-90%) β€’ πŸ”΄ Red (<70%)
  • Smart recommendations: "400m farther but 32% more reliable"

2. Station Detail

  • Reliability score as hero metric (e.g., "94% β€’ last confirmed 12 min ago")
  • Real connector types (CCS2, CHAdeMO, Type 2, Bharat AC/DC)
  • Pricing, amenities, verified reviews, photos

3. Scan-to-Charge Flow

  • QR code scanning (mocked in V1)
  • Multi-method payment (UPI / Card / Netbanking)
  • Live session with SoC dial, kWh counter, power meter

4. Smart Settlement

  • Razorpay hold-and-capture (mocked)
  • Animated settlement: β‚Ή500 held β†’ β‚Ή347 captured β†’ β‚Ή153 refunded
  • Instant receipts

5. Route Planner

  • 3 hardcoded routes (Mumbaiβ†’Pune, Delhiβ†’Jaipur, Bengaluruβ†’Mysore)
  • Google Maps polylines with charging stops
  • Recommends most reliable stations, not just nearest

6. Charging Passport

  • Unified history across all CPOs
  • Battery health chart (Recharts)
  • Stats: total kWh, β‚Ή spent, COβ‚‚ saved

πŸ§ͺ Demo Credentials

OTP: Any 4-digit code works (e.g., 1234)

Preset Routes:

  • Mumbai β†’ Pune (165 km, 1 charging stop)
  • Delhi β†’ Jaipur (280 km, 1 charging stop)
  • Bengaluru β†’ Mysore (145 km, 1 charging stop)

Seeded Data:

  • 60+ stations with real Indian coordinates
  • 15 charging session history
  • 15 vehicle models (Tata Nexon EV, MG ZS EV, etc.)

πŸ“– Documentation

Document Purpose
01_MVP_Overview.md Product vision, moat, competitive analysis
02_Layer_1_V1_Prototype.md V1 architecture, week-by-week build
03_Layer_2_Post_Pilot.md Real backend, auth, payments
04_Layer_3_Production.md Multi-CPO scale, fleet dashboard
05_Future_Scope_Must_Add.md Priority features (multi-language, 2W/3W)
06_Future_Scope_Should_Add.md Nice-to-have features

πŸ—ΊοΈ Roadmap

Phase Timeline Deliverables
Layer 1 (Current) Weeks 1-4 MVP demo with mocked data, 7 core screens
Layer 1.5 Weeks 5-8 Polish, secondary screens, pilot prep
Layer 2 Month 3+ Real backend (Supabase), first CPO pilot
Layer 3 Month 9+ Multi-CPO, fleet dashboard, native mobile
Layer 4 Year 2+ OEM integrations, white-label, expansion

🀝 Contributing

This is currently a solo founder project. Contribution guidelines will be added when the repo goes public.


πŸ“„ License

MIT License - see LICENSE for details.


πŸ‘€ Author

Dilip Kumar Saroj


πŸ™ Acknowledgments

  • Co-authored with Cursor AI
  • Inspired by real EV driving pain points in India
  • Built with insights from Layer 1-4 documentation
  • Design system based on modern mobility app standards

πŸ“ž Contact

For pilot opportunities, investment inquiries, or technical questions:


Status: πŸš€ Layer 1 Complete β€’ Ready for demo β€’ TypeScript type-safe β€’ Zero lint errors

About

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages