Skip to content

A full-stack production-ready web application connecting homeowners and contractors with skilled construction workers. Built with Next.js 14, TypeScript, PostgreSQL, and modern web technologies.

Notifications You must be signed in to change notification settings

SadeeshaJayaweera/WANDURA

Repository files navigation

🏗️ Wandura - Skilled Labor On-Demand

Wandura Logo

Next.js TypeScript PostgreSQL Prisma TailwindCSS Stripe License

A comprehensive, production-ready full-stack web application connecting homeowners and contractors with skilled construction workers.

Similar to Uber/Fiverr but specifically designed for the construction industry

FeaturesDemoInstallationDocumentationContributing


📸 Application Preview

🏠 Landing Page

Landing Page

Modern, responsive landing page showcasing platform features and call-to-action

👷 Worker Search & Discovery

Worker Search

Advanced search with skill-based filtering, location, price range, and availability

📊 Customer Dashboard

Customer Dashboard

Comprehensive dashboard with booking management, projects, and quick actions

💼 Worker Dashboard

Worker Dashboard

Earnings tracking, job management, and availability settings

📅 Booking Management

Bookings Page

Complete booking lifecycle management with status tracking

💰 Material Cost Estimator

Estimator

Smart calculator with common materials library and PDF export

🏪 Hardware Stores

Stores

Browse and order construction materials from verified hardware stores

📈 Analytics Dashboard

Analytics

Detailed insights and performance metrics for all user types

🔧 Admin Panel

Admin Panel

Complete platform management with user, booking, and transaction oversight


🎯 Core Concept

Wandura revolutionizes the construction labor marketplace by connecting:

Stakeholder Benefits
Homeowners Easy access to verified skilled workers with transparent pricing
Contractors Quick hiring of specialized labor for projects
Workers Steady job opportunities with fair compensation
Hardware Stores Direct sales channel to construction professionals

🚀 Features

🔐 Authentication & Security

  • ✅ Multi-role registration (Customer, Worker, Hardware Store, Admin)
  • ✅ JWT-based authentication with NextAuth.js
  • ✅ Role-based access control (RBAC)
  • ✅ Secure password hashing with bcrypt
  • ✅ Protected API routes and pages
  • ✅ Session management

👷 Worker Module

  • ✅ Professional profile creation with portfolio
  • ✅ Skills: Mason, Welder, Carpenter, Tile Layer, Plumber, Electrician, Steel Fixer, Painter
  • ✅ Daily/hourly rate setting
  • ✅ Experience and certification showcase
  • ✅ Location-based visibility
  • ✅ Availability calendar management
  • ✅ Rating and review system
  • ✅ Earnings dashboard with wallet
  • ✅ Job history tracking
  • ✅ Accept/Reject booking requests

🏠 Customer Module

  • ✅ Advanced worker search with multiple filters
  • ✅ Skill-based filtering
  • ✅ Location and price range filters
  • ✅ Rating-based sorting
  • ✅ Google Maps integration
  • ✅ Booking by day/hour
  • ✅ Project scheduling
  • ✅ Real-time chat with workers
  • ✅ Secure Stripe payments
  • ✅ Review and rating submission
  • ✅ Active project tracking

🏗️ Project Management

  • ✅ Project creation and organization
  • ✅ Worker assignment to projects
  • ✅ Task list management
  • ✅ Material tracking
  • ✅ Budget monitoring
  • ✅ Progress visualization
  • ✅ Notes and documentation

💰 Material Cost Estimator

  • ✅ Add unlimited materials
  • ✅ Quantity and unit price input
  • ✅ Auto-calculation of totals
  • ✅ Common materials library
  • ✅ Save estimates to account
  • ✅ Export to PDF
  • ✅ Share estimates

🏪 Hardware Store Module

  • ✅ Store dashboard
  • ✅ Product catalog management
  • ✅ Price and stock management
  • ✅ Order processing
  • ✅ Delivery status tracking
  • ✅ Customer ratings

💳 Payment System

  • ✅ Stripe integration
  • ✅ Secure checkout
  • ✅ Platform commission (10%)
  • ✅ Worker wallet system
  • ✅ Withdrawal management
  • ✅ Transaction history
  • ✅ Payment webhooks

⭐ Reviews & Ratings

  • ✅ 1-5 star rating system
  • ✅ Written reviews
  • ✅ Average rating calculation
  • ✅ Review moderation

🔔 Notifications

  • ✅ Booking confirmations
  • ✅ Job acceptance/rejection alerts
  • ✅ Payment notifications
  • ✅ Delivery updates
  • ✅ System announcements

📊 Analytics Dashboard

  • ✅ Role-specific metrics
  • ✅ Time-based filtering (7/30/90 days)
  • ✅ Earnings reports
  • ✅ Booking statistics
  • ✅ Performance insights

🛠️ Tech Stack

Category Technology
Framework Next.js 14 (App Router)
Language TypeScript 5.3
Styling TailwindCSS 3.4
UI Components Radix UI + Custom Components
Database PostgreSQL
ORM Prisma 5.8
Authentication NextAuth.js 4.24
Payments Stripe
Maps Google Maps API
State Management Zustand
Form Validation Zod
Icons Lucide React
Date Handling date-fns

📁 Project Structure

WANDURA/
├── app/                          # Next.js App Router
│   ├── api/                      # API Routes
│   │   ├── auth/                 # Authentication endpoints
│   │   ├── workers/              # Worker CRUD operations
│   │   ├── bookings/             # Booking management
│   │   ├── projects/             # Project management
│   │   ├── products/             # Product catalog
│   │   ├── estimates/            # Cost estimates
│   │   ├── analytics/            # Analytics data
│   │   ├── chat/                 # Messaging
│   │   ├── notifications/        # Notification system
│   │   ├── payments/             # Stripe integration
│   │   └── webhooks/             # External webhooks
│   ├── admin/                    # Admin panel
│   ├── analytics/                # Analytics dashboard
│   ├── auth/                     # Auth pages (signin/signup)
│   ├── dashboard/                # User dashboards
│   │   ├── bookings/             # Booking management
│   │   └── projects/             # Project management
│   ├── estimator/                # Cost estimator tool
│   ├── stores/                   # Hardware store listing
│   └── workers/                  # Worker search & profiles
├── components/                   # Reusable components
│   └── ui/                       # Base UI components
│       ├── button.tsx
│       ├── card.tsx
│       ├── input.tsx
│       ├── select.tsx
│       ├── toast.tsx
│       └── ...
├── lib/                          # Utility libraries
│   ├── auth.ts                   # Auth configuration
│   ├── prisma.ts                 # Prisma client
│   ├── stripe.ts                 # Stripe configuration
│   ├── utils.ts                  # Helper functions
│   └── validations.ts            # Zod schemas
├── prisma/                       # Database
│   ├── schema.prisma             # Database schema
│   └── seed.ts                   # Seed data
├── types/                        # TypeScript types
│   ├── index.ts
│   └── next-auth.d.ts
├── docs/                         # Documentation
│   └── screenshots/              # App screenshots
├── .env.example                  # Environment template
├── package.json                  # Dependencies
├── tailwind.config.ts            # Tailwind configuration
└── tsconfig.json                 # TypeScript configuration

📦 Installation

Prerequisites

  • Node.js 18+ and npm/yarn
  • PostgreSQL database
  • Stripe account (for payments)
  • Google Maps API key (for location features)

Quick Start

  1. Clone the repository
git clone https://github.com/SadeeshaJayaweera/wandura.git
cd wandura
  1. Install dependencies
npm install
  1. Set up environment variables

Create a .env file in the root directory:

# Database
DATABASE_URL="postgresql://username:password@localhost:5432/wandura?schema=public"

# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="generate-with-openssl-rand-base64-32"

# Stripe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_your_key"
STRIPE_SECRET_KEY="sk_test_your_key"
STRIPE_WEBHOOK_SECRET="whsec_your_webhook_secret"

# Google Maps
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY="your_google_maps_api_key"

# App Config
NEXT_PUBLIC_APP_URL="http://localhost:3000"
PLATFORM_COMMISSION_RATE="0.10"
  1. Set up the database
# Generate Prisma client
npx prisma generate

# Run migrations
npx prisma migrate dev --name init

# Seed the database with sample data
npm run prisma:seed
  1. Start the development server
npm run dev
  1. Open your browser Navigate to http://localhost:3000

🗄️ Database Schema

Core Models

Model Description
User Authentication and basic user data
Profile Customer profile information
WorkerProfile Worker-specific data (skills, rates, portfolio)
StoreProfile Hardware store information
Booking Worker booking/hiring records
Project Customer project management
Task Project tasks
Material Project materials
Estimate Cost estimates
Product Hardware store products
Order Material orders
Review Ratings and reviews
Transaction Payment records
Notification User notifications

Enums

  • Role: CUSTOMER, WORKER, HARDWARE_STORE, ADMIN
  • SkillType: MASON, TILE_LAYER, WELDER, STEEL_FIXER, CARPENTER, PLUMBER, ELECTRICIAN, PAINTER
  • BookingStatus: PENDING, ACCEPTED, REJECTED, IN_PROGRESS, COMPLETED, CANCELLED
  • PaymentStatus: PENDING, COMPLETED, FAILED, REFUNDED

👥 Sample Login Credentials

After running the seed script:

Role Email Password
Admin admin@wandura.com password123
Customer john.doe@example.com password123
Worker mike.mason@example.com password123
Hardware Store contact@buildersmart.com password123

📚 API Documentation

Authentication

Method Endpoint Description
POST /api/auth/signup Register new user
POST /api/auth/signin Sign in user
POST /api/auth/signout Sign out user

Workers

Method Endpoint Description
GET /api/workers Get all workers (with filters)
GET /api/workers/[id] Get worker by ID
POST /api/workers Create worker profile
PATCH /api/workers/[id] Update worker profile

Bookings

Method Endpoint Description
GET /api/bookings Get user's bookings
POST /api/bookings Create new booking
PATCH /api/bookings/[id] Update booking status

Projects

Method Endpoint Description
GET /api/projects Get user's projects
POST /api/projects Create new project
PATCH /api/projects/[id] Update project

Estimates

Method Endpoint Description
GET /api/estimates Get saved estimates
POST /api/estimates Save new estimate

Analytics

Method Endpoint Description
GET /api/analytics Get analytics data

🔧 Available Scripts

npm run dev              # Start development server
npm run build            # Build for production
npm run start            # Start production server
npm run lint             # Run ESLint
npm run prisma:generate  # Generate Prisma client
npm run prisma:migrate   # Run database migrations
npm run prisma:seed      # Seed database with sample data
npm run prisma:studio    # Open Prisma Studio

🚀 Deployment

Production Build

npm run build
npm run start

Recommended Platforms

Platform Use Case
Vercel Frontend hosting (recommended for Next.js)
Railway PostgreSQL database
Neon Serverless PostgreSQL
AWS Full-stack deployment
DigitalOcean VPS deployment

Environment Variables for Production

Ensure all environment variables are set:

  • DATABASE_URL - Production database connection string
  • NEXTAUTH_SECRET - Strong random string (32+ characters)
  • NEXTAUTH_URL - Production URL
  • Stripe production keys
  • Google Maps API key with restrictions

🔒 Security Features

  • ✅ JWT-based authentication
  • ✅ Password hashing with bcrypt
  • ✅ Protected API routes
  • ✅ Role-based access control
  • ✅ Secure payment processing via Stripe
  • ✅ SQL injection prevention via Prisma
  • ✅ XSS protection
  • ✅ CSRF protection

🎯 Key Highlights

Feature Description
Comprehensive Complete ecosystem for construction labor marketplace
Scalable Enterprise-level architecture built for growth
Modern Latest Next.js 14 with App Router
Type-Safe 100% TypeScript with strict mode
Secure Industry-standard security practices
Fast Optimized performance and loading
Beautiful Modern UI with TailwindCSS
Production-Ready Deployment-ready codebase

📊 Application Statistics

Metric Count
API Endpoints 25+
Database Models 14
UI Components 15+
Pages 12+
Features 50+

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments


📞 Support

For support, open an issue in the repository.


Built with ❤️ using modern web technologies

Next.js 14, TypeScript, PostgreSQL, Prisma, TailwindCSS

© 2026 Wandura. All rights reserved.


Made with Next.js Deployed on Vercel

About

A full-stack production-ready web application connecting homeowners and contractors with skilled construction workers. Built with Next.js 14, TypeScript, PostgreSQL, and modern web technologies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages