FixService Payment Solution For Home Services FixService-Payment is a End-to-End backend API that provide a Home Service Platform With a Stripe Payment System.
Customers can browse services, hire technicians, make secure online payments, and review completed work.
Technicians can create professional profiles, manage services, accept bookings, and complete jobs.
Admin manage users, service categories, bookings, and platform moderation.
Register & Login Browse all services Search & Filter technicians Book technicians Track booking status Stripe Payment Integration Payment History Review completed services Profile Management Register as Technician Create Technician Profile Add Services Manage Availability Accept/Reject Bookings Update Booking Status Complete Jobs Dashboard Analytics User Management Ban / Unban Users Manage Categories View All Bookings Monitor Payments Platform Moderation Technology Usage Node.js Runtime Express.js Backend Framework TypeScript Language PostgreSQL Database Prisma ORM ORM JWT Authentication Bcrypt Password Hashing Stripe Payment Gateway Cookie Parser Authentication CORS Cross Origin Support
Prisma ORM Database Relation 8/8 Table Has Many Belongs To Has One User Booking, Payment, Review - TechnicianProfile TechnicianProfile Service, Availability, Booking, Review User - Category Service - - Service Booking Category, TechnicianProfile - Booking - Customer(User), TechnicianProfile, Service Payment, Review Payment - Booking, User - Review - Booking, Customer(User), TechnicianProfile - Availability - TechnicianProfile -
fixitnow-Payment-backend/
│
├── prisma/
│ ├── migrations/ # Prisma migration history
│ ├── schema/
│ │ ├── availability.prisma
│ │ ├── booking.prisma
│ │ ├── category.prisma
│ │ ├── enums.prisma
│ │ ├── payment.prisma
│ │ ├── review.prisma
│ │ ├── schema.prisma # Main Prisma schema
│ │ ├── service.prisma
│ │ ├── technicianProfile.prisma
│ │ └── user.prisma
│ └── seed.ts # Database seeding
│
├── src/
│ ├── config/
│ │ └── index.ts # Environment configuration
│ │
│ ├── lib/
│ │ ├── prisma.ts # Prisma Client instance
│ │ └── stripe.ts # Stripe configuration
│ │
│ ├── middlewares/
│ │ ├── ApiError.ts # Custom API error class
│ │ ├── auth.ts # JWT Authentication & Role Authorization
│ │ ├── globalErrorHandler.ts # Global error handler
│ │ ├── notFound.ts # 404 handler
│ │ └── validationRequest.ts # Zod request validation middleware
│ │
│ ├── modules/
│ │ ├── admin/
│ │ │ ├── admin.controller.ts
│ │ │ ├── admin.route.ts
│ │ │ └── admin.service.ts
│ │ │
│ │ ├── auth/
│ │ │ ├── auth.controller.ts
│ │ │ ├── auth.interface.ts
│ │ │ ├── auth.route.ts
│ │ │ ├── auth.service.ts
│ │ │ └── auth.validation.ts
│ │ │
│ │ ├── booking/
│ │ │ ├── booking.controller.ts
│ │ │ ├── booking.route.ts
│ │ │ ├── booking.service.ts
│ │ │ └── booking.validation.ts
│ │ │
│ │ ├── category/
│ │ │ ├── category.controller.ts
│ │ │ ├── category.route.ts
│ │ │ └── category.service.ts
│ │ │
│ │ ├── payment/
│ │ │ ├── payment.controller.ts
│ │ │ ├── payment.route.ts
│ │ │ ├── payment.service.ts
│ │ │ └── payment.validation.ts
│ │ │
│ │ ├── review/
│ │ │ ├── review.controller.ts
│ │ │ ├── review.route.ts
│ │ │ ├── review.service.ts
│ │ │ └── review.validation.ts
│ │ │
│ │ ├── service/
│ │ │ ├── service.controller.ts
│ │ │ ├── service.route.ts
│ │ │ ├── service.service.ts
│ │ │ └── service.validation.ts
│ │ │
│ │ ├── technician/
│ │ │ ├── technician.controller.ts
│ │ │ ├── technician.interface.ts
│ │ │ ├── technician.route.ts
│ │ │ ├── technician.service.ts
│ │ │ └── technician.validation.ts
│ │ │
│ │ └── user/
│ │ ├── user.controller.ts
│ │ ├── user.interface.ts
│ │ ├── user.route.ts
│ │ └── user.service.ts
│ │
│ ├── utils/
│ │ ├── catchAsync.ts # Async error wrapper
│ │ ├── jwt.ts # JWT helper functions
│ │ ├── paginationHelper.ts # Pagination utility
│ │ └── sendResponse.ts # Standard API response formatter
│ │
│ ├── app.ts # Express application
│ └── server.ts # Server entry point
│
├── .env.example
├── .gitignore
├── README.md
├── package.json
├── package-lock.json
├── prisma.config.ts
├── tsconfig.json
├── tsup.config.ts
└── vercel.json
API Customer Technician Admin Register Can Can Can't Login Can Can Can Browse Services Can Can Can Create Booking Can Can't Can Payment Can Can't Can't Review Can Can't Can't Manage Services Can't Can Can't Update Availability Can't Can Can't Manage Categories Can't Can't Can Manage Users Can't Can't Can
Method Endpoint Description POST /api/auth/registerRegister new user (customer/technician) POST /api/auth/loginLogin user, return JWT GET /api/auth/meGet current authenticated user
Services & Technicians (Public) Method Endpoint Description GET /api/servicesGet all services with filters (type, location, rating) GET /api/techniciansGet all technicians with filters GET /api/technicians/:idGet technician profile with reviews GET /api/categoriesGet all service categories
Method Endpoint Description POST /api/bookingsCreate new booking (customer) GET /api/bookingsGet user's bookings GET /api/bookings/:idGet booking details
Payments (Stripe / SSLCommerz) Method Endpoint Description POST /api/payments/createCreate a payment intent/session for an accepted booking POST /api/payments/confirmConfirm/verify payment (webhook or callback) GET /api/paymentsGet user's payment history GET /api/payments/single/:idGet payment details
Method Endpoint Description PUT /api/technician/profileUpdate technician profile PUT /api/technician/availabilityUpdate availability slots GET /api/technician/bookingsGet technician's bookings PATCH /api/technician/bookings/:idUpdate booking status (accept/decline/complete)
Method Endpoint Description POST /api/reviewsCreate review (after job completion)
Method Endpoint Description GET /api/admin/usersGet all users PATCH /api/admin/users/:idUpdate user status (ban/unban) GET /api/admin/bookingsGet all bookings GET /api/admin/categoriesGet all categories POST /api/admin/categoriesCreate new service category
Email Notifications SMS Notifications Real-time Booking Updates Chat Between Customer & Technician AI Technician Recommendation Multi-language Support Admin Dashboard Analytics MD MUSTAFIZUR RAHMAN
Computer Science & Engineering Student
Backend Developer | TypeScript | Node.js | Express | PostgreSQL | Prisma