_ __ _____
/ | / /__ ____ ______/ ___/___ ______ _____
/ |/ / _ \/ __ `/ ___/\__ \/ _ \/ ___/ | / / _ \
/ /| / __/ /_/ / / ___/ / __/ / | |/ / __/
/_/ |_/\___/\__,_/_/ /____/\___/_/ |___/\___/
Features · Architecture · Quick Start · API Docs · Development · Contributing
NearServe is a production-ready platform that connects customers with local service providers in real-time. Designed for the Indian market, it enables quick hiring of skilled workers — plumbers, electricians, carpenters, painters, and more.
|
Key Highlights
|
Project Origin This project is a complete rewrite of Rozgaarsetu, originally developed as a college mini project. Rebuilt from the ground up with modern technologies and production-grade architecture. |
| For Customers | For Workers | Platform |
|---|---|---|
|
|
|
| Category | Technologies |
| Frontend |
|
| Backend |
|
| Authentication |
|
| Real-time |
|
| Payments |
|
| Storage |
|
| AI |
|
┌──────────────────────────────────┐
│ CLIENT LAYER │
│ Next.js 15 · React 19 │
│ Tailwind CSS · PWA │
└────────────────┬─────────────────┘
│
▼
┌──────────────────────────────────┐
│ AUTHENTICATION │
│ Firebase-auth │
│ OAuth · Email · Phone │
└────────────────┬─────────────────┘
│
┌─────────────────────────────┼─────────────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────────────────┐ ┌──────────────────────────┐ ┌──────────────────────────┐
│ API LAYER │ │ FIREBASE │ │ EXTERNAL │
│ │ │ │ │ │
│ Jobs API │ │ Firestore (Real-time) │ │ Razorpay (Payments) │
│ Workers API │ │ FCM (Push) │ │ Cloudinary (Images) │
│ Customers API │ │ Authentication │ │ Google Gemini (AI) │
│ Notifications API │ │ │ │ Google Maps API │
└──────────────────────────┘ └──────────────────────────┘ └──────────────────────────┘
| Requirement | Version |
|---|---|
| Node.js | 18.x or higher |
| npm / pnpm | Latest |
You will also need accounts for: Firebase-auth, Firebase, and optionally Razorpay, Cloudinary.
# Clone the repository
git clone https://github.com/yourusername/nearserve.git
cd nearserve
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Start development server
npm run devThe application will be available at http://localhost:3000
Copy .env.example to .env.local and configure the following:
# Firebase Configuration
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
# Firebase Admin (Server-side)
FIREBASE_CLIENT_EMAIL=your_admin_email
FIREBASE_PRIVATE_KEY=your_private_key
# Payment Gateway (Razorpay)
NEXT_PUBLIC_RAZORPAY_KEY_ID=rzp_test_...
RAZORPAY_KEY_SECRET=your_secret
# Storage (Cloudinary)
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_secret
# AI Assistant (Google Gemini)
GOOGLE_API_KEY=your_api_key
# Maps & Geolocation
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_maps_keySee .env.example for the complete list.
nearserve/
│
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication pages
│ │ ├── sign-in/
│ │ └── sign-up/
│ ├── (main)/ # Application routes
│ │ ├── customer/ # Customer dashboard & pages
│ │ ├── worker/ # Worker dashboard & pages
│ │ ├── onboarding/ # User onboarding flow
│ │ └── workers/ # Public worker profiles
│ └── api/ # REST API endpoints
│ ├── auth/
│ ├── customer/
│ ├── worker/
│ ├── jobs/
│ └── notifications/
│
├── components/ # React components
│ ├── ui/ # Base UI components
│ ├── customer/ # Customer-specific
│ └── worker/ # Worker-specific
│
├── lib/ # Utilities & services
│ ├── firebase-admin.ts # Firebase Admin SDK
│ ├── firebase-client.ts # Firebase Client SDK
│ └── razorpay-service.ts # Payment service
│
├── hooks/ # Custom React hooks
├── contexts/ # React context providers
├── types/ # TypeScript definitions
│
| Endpoint | Method | Description |
|---|---|---|
/api/auth/session |
GET |
Retrieve current session |
/api/auth/callback |
GET |
OAuth callback handler |
/api/auth-check |
GET |
Verify authentication status |
| Endpoint | Method | Description |
|---|---|---|
/api/jobs |
GET |
List all jobs with filters |
/api/jobs |
POST |
Create a new job |
/api/jobs/[id] |
GET |
Get job by ID |
/api/jobs/[id] |
PATCH |
Update job status |
| Endpoint | Method | Description |
|---|---|---|
/api/workers |
GET |
Search workers |
/api/worker/profile |
GET |
Get worker profile |
/api/worker/profile |
PUT |
Update worker profile |
/api/worker/jobs |
GET |
Get assigned jobs |
/api/worker/earnings |
GET |
Get earnings summary |
| Endpoint | Method | Description |
|---|---|---|
/api/customer/profile |
GET |
Get customer profile |
/api/customer/profile |
PUT |
Update customer profile |
/api/customer/jobs |
GET |
Get customer bookings |
/api/customer/dashboard-stats |
GET |
Dashboard statistics |
| Endpoint | Method | Description |
|---|---|---|
/api/fcm/subscribe |
POST |
Subscribe to push notifications |
/api/notifications/send |
POST |
Send notification |
/api/notifications/mark-read |
POST |
Mark as read |
| Command | Description |
|---|---|
npm run dev |
Start development server with Turbopack |
npm run build |
Create production build |
npm run start |
Start production server |
npm run lint |
Run ESLint |
| Phase | What We Built | Key Achievement |
|---|---|---|
| Phase 1: Foundation (e2596b0-5f273b3) | Landing page, UI components, animations, theme switching | Core design system |
| Phase 2: Core Features (efbab7a-dbb4d26) | Maps API, Chatbot, Profiles, Jobs, Onboarding, Pricing | Feature-complete marketplace |
| Phase 3: Real-time Shift (b5ad8b2-b4000d7) | Firestore, FCM notifications, Firebase Auth, i18n | PostgreSQL → Firestore migration |
| Phase 4: Production Polish (0bcc2e5-f7b39ca) | Mobile optimization, Analytics, Code cleanup | Production-ready deployment |
- Phase 3: Migrated from PostgreSQL to Firebase Firestore for real-time data synchronization and scalability
- Phase 3: Switched authentication from Clerk to Firebase-auth for unified backend integration
- Phase 4: Removed unused dependencies and optimized codebase for production deployment
Current Status: All development phases completed and deployed on Vercel
Contributions are welcome. Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and commit:
git commit -m 'Add your feature' - Push to your fork:
git push origin feature/your-feature - Submit a Pull Request
Please ensure your code follows the existing style and passes linting.
This project is licensed under the MIT License. See LICENSE for details.