Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ› οΈ FixIt β€” Premium Home Services Platform

FixIt is a full-stack, production-grade home services platform that connects consumers with skilled technicians. It supports real-time job scheduling, secure payments via Stripe, email OTP-based authentication, forgot password flow, and dedicated dashboards for both consumers and technicians.

Next.js NestJS Node.js PostgreSQL Vercel Railway License

🌐 Live Consumer/Tech Portal: https://fixit-beige.vercel.app

πŸ”Œ Live API Endpoint: https://fixit-production-b37f.up.railway.app/api/v1


πŸ“ Architecture

The application runs on a highly scalable, decoupled cloud infrastructure. The frontend is served via Vercel's Edge Network for global performance and SEO. The backend runs as a containerized NestJS API on Railway, connected to a fully managed PostgreSQL database.

                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  User Browser  ────────► β”‚   Vercel Edge Network    β”‚ (Next.js 16, SSR + Static)
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚ HTTPS REST API
                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                          β”‚    Railway (Docker)       β”‚ (NestJS 10 API)
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚                       β”‚                   β”‚
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ Railway PostgreSQL β”‚   β”‚    Stripe API      β”‚  β”‚  SendGrid API   β”‚
  β”‚    (Database)      β”‚   β”‚   (Payments)       β”‚  β”‚    (Emails)     β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧰 Technology Stack

Layer Technology
Frontend Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS v4
Backend NestJS 10, TypeScript, Node.js 20
Database PostgreSQL 15 (Railway managed)
ORM TypeORM
Authentication Email OTP + JWT Access/Refresh Token Rotation
Email Service SendGrid (HTTP API β€” Railway compatible)
Payments Stripe API (Payment Intents + Webhooks)
Frontend Cloud Vercel Edge Network (Auto-deploy from GitHub)
Backend Cloud Railway PaaS (Docker container)
Security Helmet, bcrypt, throttling, role-based guards

✨ Core Features

πŸ” Authentication & Security

  • Email OTP verification on registration β€” 6-digit code sent via SendGrid
  • Forgot Password flow β€” request a reset code via email, set a new password
  • JWT Access + Refresh Token rotation for session management
  • Role-based access control β€” separate Consumer and Technician experiences
  • Passwords hashed with bcrypt; OTP codes expire after 5 minutes

πŸ‘€ Consumer Features

  • Browse a rich service catalog (Plumbing, Electrical, AC, Cleaning, etc.)
  • Book services with a date, time, and address picker
  • Submit custom job requests with descriptions and photos
  • Choose payment method β€” Stripe (credit/debit) or Cash on Delivery
  • Consumer dashboard with booking history and real-time status tracking

πŸ”§ Technician Features

  • Daily job agenda view with full job details
  • Accept / reject custom job quotes
  • Real-time status updates: CONFIRMED β†’ IN_PROGRESS β†’ COMPLETED
  • Weekly earnings ledger and payment history

πŸ’³ Payments

  • Stripe Payment Intents for secure, PCI-compliant card processing
  • Cash on Delivery option
  • Stripe Webhook integration to confirm payments and update booking status server-side

☁️ CI/CD Pipeline

Every git push to main automatically triggers both deployments with zero downtime.

git push β†’ main
      β”‚
      β”œβ”€β”€β–Ί Vercel (Frontend)
      β”‚     1. Detects changes in /frontend
      β”‚     2. Builds Next.js optimized static & serverless pages
      β”‚     3. Deploys to Vercel Global Edge Network (~30s)
      β”‚
      └──► Railway (Backend)
            1. Detects changes in /Backend
            2. Builds Docker container (node:20-alpine, multi-stage)
            3. Rolling zero-downtime deployment (~60s)

πŸ’» Local Development Setup

Prerequisites

1. Clone the Repository

git clone https://github.com/abdulhadi-js/Fixit.git
cd Fixit

2. Configure Backend Environment

Create a .env file inside /Backend:

# Database
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=your_postgres_password
DB_NAME=fixit

# Auth
JWT_SECRET=your_jwt_secret
JWT_REFRESH_SECRET=your_jwt_refresh_secret

# Email (SendGrid)
SENDGRID_API_KEY=SG.xxxxxxxxxxxxxxxxxxxxxxxx
MAIL_FROM=your-verified-sender@gmail.com

# Payments (Stripe)
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

PORT=3001

3. Run the Backend (NestJS API)

cd Backend
npm install
npm run seed       # Seeds the database with default services & categories
npm run start:dev
# βœ… API running at http://localhost:3001

4. Configure Frontend Environment

Create a .env.local file inside /frontend:

NEXT_PUBLIC_API_URL=http://localhost:3001/api/v1
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...

5. Run the Frontend (Next.js)

cd ../frontend
npm install
npm run dev
# βœ… UI running at http://localhost:3000

πŸš€ Production Deployment Variables

These environment variables must be set in your Railway backend service:

Variable Description
DATABASE_URL Railway PostgreSQL connection string
JWT_SECRET Secret key for signing access tokens
JWT_REFRESH_SECRET Secret key for signing refresh tokens
SENDGRID_API_KEY Your SendGrid API key (SG.xxx...)
MAIL_FROM Email address verified in SendGrid Sender Identity
STRIPE_SECRET_KEY Stripe live/test secret key
STRIPE_WEBHOOK_SECRET Stripe webhook signing secret
PORT 3001

πŸ“ Project Structure

Fixit/
β”œβ”€β”€ Backend/                    # NestJS API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ auth/               # JWT auth, OTP, forgot/reset password
β”‚   β”‚   β”œβ”€β”€ mail/               # SendGrid email service
β”‚   β”‚   β”œβ”€β”€ bookings/           # Job booking & scheduling module
β”‚   β”‚   β”œβ”€β”€ payments/           # Stripe payment integration
β”‚   β”‚   β”œβ”€β”€ services/           # Service catalog module
β”‚   β”‚   └── users/              # User entity & role management
β”‚   β”œβ”€β”€ Dockerfile              # Multi-stage Docker build for Railway
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/                   # Next.js 16 Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”œβ”€β”€ (public)/       # Auth pages
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ login/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ register/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ verify-otp/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ forgot-password/
β”‚   β”‚   β”‚   β”‚   └── reset-password/
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/      # Consumer booking dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ checkout/       # Stripe payment page
β”‚   β”‚   β”‚   └── technician/     # Technician dashboard & earnings
β”‚   β”‚   β”œβ”€β”€ components/         # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ hooks/              # Custom React hooks (useAuth, etc.)
β”‚   β”‚   └── lib/api/            # Typed API client layer
β”‚   └── package.json
β”‚
β”œβ”€β”€ .gitignore
└── README.md

πŸ”‘ Auth Flow

Register (email + password)
      β”‚
      β–Ό
OTP sent to email via SendGrid
      β”‚
      β–Ό
User enters 6-digit OTP ──► Account Verified
      β”‚
      β–Ό
Login (email + password) ──► JWT Access Token + Refresh Token
      β”‚
      β–Ό
Protected routes use Bearer token in Authorization header

Forgot Password Flow:

Enter email ──► OTP sent to email ──► Enter OTP + new password ──► Login

πŸ“„ License

This project is proprietary and confidential. All rights reserved Β© FixIt 2026.

About

A premium, full-stack home services platform connecting consumers with skilled technicians. Built with Next.js 15, NestJS, and PostgreSQL. Features real-time job scheduling, secure Stripe payments, and OTP authentication.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages