Skip to content

Latest commit

Β 

History

445 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌌 UniVerse β€” On-Campus Peer-to-Peer Delivery Platform

CI / CD Pipeline Live Demo Node.js Next.js TypeScript Tailwind CSS Supabase Vitest License

UniVerse is a modern, high-performance, full-stack peer-to-peer campus delivery platform connecting college students with student runners for instant campus deliveries. Designed with production SaaS aesthetics, real-time messaging, comprehensive analytics, and enterprise resilience.


πŸš€ Key Features

πŸŽ“ Student Experience

  • Request Creation: Create delivery requests with item lists, quantities, price estimates, and pickup/drop-off locations.
  • Hostel & Room Autofill: Saved room defaults for fast 1-tap checkout.
  • Request Management: Track request statuses in real-time (Pending, Accepted, Picked Up, In Transit, Delivered, Cancelled).
  • Interactive Details Modal: Deep-dive into item specifications, runner details, and timelines.

πŸƒ Runner Experience

  • Available Requests Board: Browse live unassigned delivery requests across campus.
  • Delivery Lifecycle Management: Accept requests, update statuses sequentially, and manage active deliveries.
  • Runner Delivery History: Track past completed deliveries and performance metrics.

πŸ›‘οΈ Admin Management Panel

  • User Management: View, filter, search, and manage platform roles (Student, Runner, Admin) and account statuses (Active, Suspended).
  • Delivery Control: Complete platform delivery overview with search, status filters, sorting, and manual runner assignments.
  • Comprehensive Analytics Engine: Real-time KPI cards, success rate calculations, cancellation rates, and 30-day time-series trend data.
  • Export & Reporting System: Download analytics data dynamically in formatted CSV reports and structured JSON payloads.
  • Multi-Range Date Filters: Quick date range presets (Today, Last 7 Days, Last 30 Days, This Month, Last Month, All Time) and custom date pickers.

πŸ’¬ Realtime Chat & Notifications

  • Direct Messaging: In-app peer-to-peer chat between requesters and assigned runners.
  • Realtime Notifications: Unread count badges, category filtering (Delivery, Request, Runner, System, Admin), and instant status change alerts.

πŸ›‘οΈ Security & Reliability

  • Enterprise Resilience: Global React Error Boundaries, exponential backoff retry helpers (retryAsync), and crash-safe promise wrappers.
  • Network Awareness: Reactive online/offline status detection (useOnlineStatus) with non-intrusive notification banners.
  • Security Hardening: Open-redirect protection (isSafeRedirectUrl), string/numeric input validation, and production error sanitization.

πŸ› οΈ Tech Stack

Layer Technology
Framework Next.js 16 (App Router, Turbopack)
Language TypeScript 5
Styling Tailwind CSS v4, Vanilla CSS Design System
UI Components Radix UI Primitives, Lucide Icons, Framer Motion
Backend & Auth Supabase (PostgreSQL, Realtime Subscriptions, Row Level Security)
Testing Vitest, React Testing Library, jsdom, @testing-library/jest-dom
State & Data React Hooks, Context API, useMemo calculation engine

πŸ“‚ Project Structure

universe/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router routes & pages
β”‚   β”‚   β”œβ”€β”€ (auth)/             # Authentication routes (login, register, reset-password)
β”‚   β”‚   β”œβ”€β”€ admin/              # Admin control panel & analytics
β”‚   β”‚   β”œβ”€β”€ dashboard/          # Student & Runner dashboard views
β”‚   β”‚   └── api/                # API route handlers
β”‚   β”œβ”€β”€ components/             # Reusable UI component modules
β”‚   β”‚   β”œβ”€β”€ admin/              # Admin dashboard components & tables
β”‚   β”‚   β”œβ”€β”€ analytics/          # Analytics engine UI, charts & export toolbar
β”‚   β”‚   β”œβ”€β”€ chat/               # Realtime chat list & message window
β”‚   β”‚   β”œβ”€β”€ dashboard/          # Common dashboard cards & stats
β”‚   β”‚   β”œβ”€β”€ home/               # Landing page & navigation
β”‚   β”‚   β”œβ”€β”€ notifications/      # Notification bell & drawer list
β”‚   β”‚   β”œβ”€β”€ request/            # Request list, cards, status badges & timelines
β”‚   β”‚   β”œβ”€β”€ shared/             # ErrorState, EmptyState, SkeletonLoaders, ErrorBoundary
β”‚   β”‚   └── ui/                 # Radix UI primitives & design system components
β”‚   β”œβ”€β”€ constants/              # Navigation routes, status tokens, and animation variants
β”‚   β”œβ”€β”€ hooks/                  # Custom hooks (useOnlineStatus, useDebounce, etc.)
β”‚   β”œβ”€β”€ lib/                    # Core library modules
β”‚   β”‚   β”œβ”€β”€ database/           # Supabase database query functions (analytics, requests, chat)
β”‚   β”‚   β”œβ”€β”€ security/           # Security hardening, input validation, URL safety, env validation
β”‚   β”‚   β”œβ”€β”€ supabase/           # Supabase client/server connection factories
β”‚   β”‚   └── utils/              # Export utilities, formatting, async retry helpers
β”‚   β”œβ”€β”€ providers/              # Context providers (RealtimeProvider, ToastProvider)
β”‚   β”œβ”€β”€ testing/                # Vitest setup, renderWithProviders, and mock factories
β”‚   └── types/                  # TypeScript database & analytics definitions
β”œβ”€β”€ vitest.config.ts            # Master Vitest test runner configuration
β”œβ”€β”€ TESTING.md                  # Test suite guide & conventions
β”œβ”€β”€ ARCHITECTURE.md             # In-depth system architecture specification
β”œβ”€β”€ DEPLOYMENT.md               # Step-by-step Vercel & Supabase deployment guide
β”œβ”€β”€ CHANGELOG.md                # Release version history
└── RELEASE_CHECKLIST.md        # Production release verification checklist

⚑ Quick Start & Local Setup

1. Prerequisites

  • Node.js 20.x or higher
  • npm 10.x or higher
  • Supabase project credentials

2. Clone & Install

git clone https://github.com/avinash-git-24/universe.git
cd universe
npm install

3. Environment Variables

Copy .env.example to .env.local and add your Supabase project keys:

cp .env.example .env.local

Fill in .env.local:

NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your-publishable-key
NEXT_PUBLIC_APP_URL=http://localhost:3000

4. Development Server

npm run dev

Open http://localhost:3000 in your browser.


πŸ§ͺ Testing & Quality Assurance

Run the Vitest unit and component test suites:

# Run unit & component tests
npm test

# Generate code coverage report
npm run test:coverage

# Run ESLint validation
npm run lint

# Execute production build
npm run build

See TESTING.md for testing guidelines and mock helpers.


πŸ“– Documentation Guide

  • πŸ“„ ARCHITECTURE.md β€” System architecture, data flow, and real-time design.
  • πŸ“„ DEPLOYMENT.md β€” Vercel, Supabase, domain setup, and environment variables.
  • πŸ“„ CONTRIBUTING.md β€” Git workflow, branch naming, and pull request rules.
  • πŸ“„ CHANGELOG.md β€” Complete release version history.
  • πŸ“„ RELEASE_CHECKLIST.md β€” Final production deployment verification checklist.

🀝 Community & Collaboration

We welcome open-source contributions to UniVerse! Check out CONTRIBUTING.md to get started with issue discussions, feature requests, and pull requests. Built with active open-source collaboration across the campus community.

πŸ‘₯ Team & Contributors

  • Avinash Kumar (@avinash-git-24) β€” Lead Architect & Full-Stack Developer
  • Archi Kumari (@Archi-22108) β€” Core Collaborator & Architecture Contributor

πŸ“œ License

This project is licensed under the MIT License.


⭐ Show Your Support

If you find UniVerse helpful or interesting, please consider giving the repository a star!

About

Student-to-student campus delivery platform for Marwadi University.

Resources

Contributing

Stars

18 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages