Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

Hirfa Logo

Craftsmen Maintenance Marketplace - حِرفة (Hirfa)

A full-stack, mobile-first app, The all-in-one home services platform for the Arabic world. Browse verified craftsmen, compare prices, view before/after portfolios, book instantly, and track your orders , all from your phone.


Overview

Hirfa is a complete home maintenance platform built with Next.js 16 and Supabase. It serves three user types:

  • Clients — Browse craftsmen and organizations, book services, request emergency help, manage orders and wallet
  • Craftsmen (Workers) — Manage gallery with before/after photos, accept/reject orders, set services, manage schedule and payments
  • Organizations — Manage a team of craftsmen under one brand, handle org bookings, assign workers, manage services and portfolio

✨ Features

🔐 Authentication & Onboarding

  • Phone-based login with OTP verification
  • Role selection (Client / Craftsman)
  • Multi-step onboarding flow with splash, welcome, intro carousel, and success animation

Client App

FeatureDescription
HomeCategory grid, featured craftsmen & organizations, nearby listings
Craftsman ProfileFull profile with before/after gallery, services, reviews, booking CTA
Organization ProfileOrg profile with services catalog, portfolio gallery, workers, reviews
Gallery ModalCard-based photo viewer with navigation (before/after comparison)
Booking4-step wizard with date picker, time slots, address, payment method
Emergency SOSQuick emergency booking with live tracking simulation
OrdersTrack orders — shows org name + worker name for org bookings
InvoiceFinal invoice with org branding for org bookings
RatingRate workers or organizations after completion
WalletDeposit, cards management, transaction history
AddressesSaved addresses with CRUD
SearchSearch craftsmen by name or profession
NotificationsReal-time notifications
ProfileEdit personal info, settings menu

🔧 Craftsman (Worker) App

FeatureDescription
HomeAvailability toggle, new requests, appointments, quick links
OrdersAccept/reject orders, update status, order cards with emergency badge
GalleryAdd/delete before/after work photos with card modal
ServicesManage offered services and pricing
MessagesChat with clients
ScheduleManage availability and appointments
NotificationsIn-app notifications
ProfileEdit info, verification status, payment methods, help, terms
WalletEarnings overview, withdrawals
CalendarView booked appointments
Org RatingRating as part of an organization shown on profile

🏢 Organization App

FeatureDescription
DashboardReal-time stats (bookings, revenue, pending/completed), recent orders, rating
Orders ManagementView all org bookings, accept/reject, assign workers, update tracking status
Worker AssignmentAssign org workers to bookings, search linked accounts, send notifications
Workers ManagementDedicated workers page — add, remove, search linked accounts, portfolio upload
Services ManagementManage org services and pricing
Portfolio GalleryUpload/remove org portfolio photos (up to 5)
Organization ProfileCreate/edit org with name, category, city, logo, description
Plan SystemFree plan with worker limits, Pro plan for unlimited workers
WalletOrg wallet with earnings, withdrawals, transaction history
MessagesChat with clients
SettingsOrg settings and configuration

Admin Dashboard

  • User management, system rules, content moderation

🏢 Organization System

The platform supports a full organization management system where craftsmen can form organizations and manage teams.

How It Works

  1. Worker creates an organization via their profile → becomes the owner
  2. Owner adds workers to the org (search by name/phone, link accounts)
  3. Clients browse organizations alongside individual craftsmen
  4. Client books an org → order appears in the org's dashboard
  5. Owner assigns a worker to the booking
  6. Worker completes the job → confirmation code flow
  7. Payment goes to the org owner's wallet (not the individual worker)
  8. Client rates → rating goes to both the worker and the organization

Key Components

ComponentDescription
Org Profile (Client)Services catalog, portfolio gallery (5 photos), workers list, reviews
Org Dashboard (Owner)Stats grid, recent orders, gallery management, quick actions
Org OrdersFull order list with worker assignment, tracking updates, status badges
Org WorkersAdd/remove workers, search linked accounts, portfolio upload (4 photos)
Org WalletEarnings from all org bookings, transaction history, withdrawals
Org Booking FlowClient selects org service → default schedule → org owner assigns worker

Database

  • organizations — org profile with name, category, city, logo, plan, rating
  • organization_workers — workers linked to an org (linked_user_id → auth.users)
  • organization_worker_portfolio — portfolio photos per worker
  • organization_reviews — client reviews for the org (auto-updated via trigger)
  • organization_gallery — org portfolio photos
  • organization_services — services offered by the org
  • Bookings link to org via organization_id and assigned_worker_id

Rating System

  • Worker ratings: stored in reviews table, average on profiles.rating
  • Org ratings: stored in organization_reviews table, average on organizations.rating
  • Auto-propagation: when a worker review is inserted and the worker belongs to an org, a database trigger automatically inserts an org review — keeping org ratings in sync
  • Workers see "تقييم كجزء من المؤسسة" (rating as part of organization) on their profile

Payment Flow

  • Direct bookings: money goes to the worker's wallet
  • Org bookings: money goes to the org owner's wallet
  • Commission rate determined by the recipient's subscription tier
  • Transactions logged with (مؤسسة) label for org bookings

Tech Stack

LayerTechnology
FrameworkNext.js 16 (App Router, Turbopack)
LanguageTypeScript
StylingTailwind CSS v4 + custom dark theme
DatabaseSupabase (PostgreSQL with RLS)
AuthSupabase Auth (phone OTP)
IconsLucide React
MapsLeaflet / Mapbox GL
AnimationsFramer Motion
Internationalizationnext-intl (Arabic RTL-first)
StateReact Hooks + TanStack Query
UI Primitivesshadcn/ui + Base UI

Emergency SOS

One-tap emergency booking that auto-fills user address and creates an urgent order with real-time tracking simulation.


📱 Mobile App (Capacitor) & CI/CD

Hirfa is built as a mobile-first application and is compiled into a native Android APK using Capacitor.


📄 License

Hirfa Team — All rights reserved.


Built with ❤️ for the Arabic-speaking world
حِرفة — لأن حرفتك تستحق الأفضل

About

A full-stack, mobile-first app, The all-in-one home services platform for the Arabic world. Browse verified craftsmen, compare prices, view before/after portfolios, book instantly, and track your orders , all from your phone.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors