By students, for students β Get anything delivered inside campus instantly.
CampusRun is a full-stack, peer-to-peer delivery platform built exclusively for students at NIT Kurukshetra. It connects students who need items delivered (Amazon parcels from the gate, groceries from the market, food from shops) with fellow students willing to deliver them β all within the campus boundary.
Think of it as Dunzo/Swiggy Genie, but hyper-local to a single college campus, built and run entirely by students.
- Walking to the main gate in 45Β°C heat to collect an Amazon parcel
- No one available to pick up groceries from the campus market
- No organized, trusted way to get things delivered hostel-to-hostel
CampusRun provides a marketplace where:
- Customers post delivery requests with pickup/drop details and pricing
- Deliverers (verified students) accept and fulfill orders
- Real-time GPS tracking keeps everyone informed
- In-app chat enables negotiation and coordination
- UPI payments are handled securely via Razorpay
| Feature | Description |
|---|---|
| π College Email Auth | Only @nitkkr.ac.in emails can register, with OTP verification via Brevo + Fast2SMS |
| π€ AI ID Verification | Gemini AI verifies uploaded college ID cards for deliverer authentication |
| πΊοΈ Live GPS Tracking | Real-time Leaflet map tracking of deliverers across campus |
| π¬ In-App Chat | Real-time messaging between customer and deliverer with image sharing |
| π³ Razorpay Payments | Platform fee collection via Razorpay; deliverer payouts via UPI |
| π¦ Smart Pricing | Weight-based dynamic pricing with location-aware estimates |
| βοΈ Cloud Storage | Document uploads stored on Cloudflare R2 (S3-compatible) |
| π Dark/Light Mode | System-aware theme with manual toggle |
| β Rating System | Post-delivery rating and feedback for deliverers |
| π‘οΈ Security First | Helmet, rate limiting, bcrypt, JWT auth, input validation with Zod |
| Technology | Purpose |
|---|---|
| React 18 + TypeScript | UI framework |
| Vite | Build tool & dev server |
| TailwindCSS | Utility-first styling |
| shadcn/ui + Radix UI | Component library |
| Framer Motion | Animations |
| React Router v6 | Client-side routing |
| TanStack React Query | Server state management |
| Leaflet + React-Leaflet | Interactive maps |
| Zod + React Hook Form | Form validation |
| Technology | Purpose |
|---|---|
| Node.js + Express | API server |
| TypeScript | Type safety |
| Prisma ORM | Database access |
| PostgreSQL (Neon) | Production database |
| Cloudflare R2 | File/document storage |
| Razorpay SDK | Payment processing |
| Google Gemini AI | ID card verification |
| Brevo + Fast2SMS | Email/SMS notifications |
| Helmet + express-rate-limit | Security middleware |
| bcryptjs + JWT | Authentication |
campusrun/
βββ backend/ # Express API Server
β βββ prisma/
β β βββ schema.prisma # Database schema (User, Order, Message, VerificationToken)
β βββ src/
β β βββ index.ts # Server entry point
β β βββ db.ts # Prisma client instance
β β βββ routes/
β β β βββ auth.routes.ts # Signup, Login, OTP, Password Reset
β β β βββ orders.routes.ts # CRUD orders, accept, track, rate
β β β βββ profile.routes.ts # Profile view/edit, deliverer verification
β β βββ middlewares/
β β β βββ auth.middleware.ts # JWT verification guard
β β β βββ upload.middleware.ts # Multer + S3/R2 file uploads
β β βββ utils/
β β βββ mail.ts # Gmail SMTP transporter
β β βββ notifications.ts # Brevo email + Fast2SMS APIs
β βββ Dockerfile # Container config for deployment
β βββ .env.example # Required environment variables
β
βββ src/ # React Frontend
β βββ App.tsx # Root component with routing
β βββ main.tsx # Entry point
β βββ pages/
β β βββ Index.tsx # Landing page / Dashboard
β β βββ Auth.tsx # Login, Signup, OTP verification
β β βββ PlaceOrder.tsx # Order creation form
β β βββ Deliver.tsx # Deliverer marketplace
β β βββ Track.tsx # Live order tracking with map
β β βββ Profile.tsx # User profile management
β β βββ NotFound.tsx # 404 page
β βββ components/
β β βββ Navbar.tsx # Navigation bar
β β βββ Footer.tsx # Footer
β β βββ Layout.tsx # Page layout wrapper
β β βββ OrderChat.tsx # In-app messaging component
β β βββ ui/ # shadcn/ui component library
β βββ contexts/
β β βββ AuthContext.tsx # Authentication state provider
β βββ apiClient.ts # Axios/fetch API wrapper
β
βββ .env.example # Frontend env template
βββ vercel.json # Vercel SPA rewrite config
βββ tailwind.config.ts # TailwindCSS configuration
βββ vite.config.ts # Vite build configuration
βββ package.json # Frontend dependencies
- Node.js β₯ 18.x
- npm β₯ 9.x
- PostgreSQL database (or a free Neon account)
- Cloudflare R2 bucket (optional, falls back to local disk)
git clone https://github.com/codexbeats/CampusRun---NIT-KKR.git
cd CampusRun---NIT-KKRcd backend
npm install
cp .env.example .env
# Fill in your environment variables in .env
npx prisma db push # Create database tables
npm run dev # Starts on http://localhost:4000# From root directory
npm install
cp .env.example .env
# Verify VITE_API_URL points to your backend
npm run dev # Starts on http://localhost:5173Navigate to http://localhost:5173 β you should see the CampusRun landing page!
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/signup |
Register with college email |
| POST | /api/auth/login |
Login with credentials |
| POST | /api/auth/send-verification-otps |
Send email + phone OTPs |
| POST | /api/auth/verify-otps |
Verify email + phone OTPs |
| POST | /api/auth/forgot-password |
Request password reset OTP |
| POST | /api/auth/verify-reset-otp |
Verify reset OTP |
| POST | /api/auth/reset-password |
Reset password with OTP |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/orders |
Create a new delivery order |
| GET | /api/orders |
List all available orders |
| GET | /api/orders/my |
Get user's own orders |
| POST | /api/orders/:id/accept |
Accept a delivery request |
| PATCH | /api/orders/:id/status |
Update order status |
| PATCH | /api/orders/:id/location |
Update deliverer GPS location |
| POST | /api/orders/:id/rate |
Rate a completed delivery |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/profile |
Get current user profile |
| PATCH | /api/profile |
Update profile details |
| POST | /api/profile/verify-deliverer |
Upload ID for AI verification |
We welcome contributions! Whether it's bug fixes, new features, or documentation improvements β every contribution counts.
Please read our Contributing Guide before submitting a PR.
- Fork the repository
- Create a feature branch (
git checkout -b feat/your-feature) - Commit your changes (
git commit -m "feat: add your feature") - Push to the branch (
git push origin feat/your-feature) - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ by @codexbeats at NIT Kurukshetra.
β‘ CampusRun β Delivery, Reimagined for Campus Life