Backend & DevOps2026

HairLyncAI-Assisted Hair Marketplace Platform

A containerized hair-services marketplace combining a Django REST API, FastAPI-based image analysis, Stripe subscriptions, role-specific booking workflows, web interfaces, and AWS deployment infrastructure.

Primary technologies

  • Django REST Framework
  • FastAPI
  • PostgreSQL
  • OpenAI API
  • Stripe
  • React
  • Docker
  • AWS
HairLync marketing site: an AI hairstyle-analysis hero with app store links

What this project is

HairLync is a multi-service platform where clients can discover barbers and salons, browse services and portfolios, manage favorites and appointments, and receive hair-style recommendations. Professionals manage profiles, availability, bookings, employees, subscriptions, and educational content.

Engineering problem

The platform must keep client, independent-barber, salon-owner, and salon-employee data isolated while coordinating availability, service eligibility, booking transitions, payments, media, and AI-driven workflows across multiple deployable services.

Success criteria

Provide protected and documented APIs for marketplace operations, expose image-based hair analysis as an independent service, and package the system for repeatable local, staging, and production deployment.

The repository organizes marketplace behavior into ten Django applications, exposes OpenAPI-documented REST endpoints, runs image analysis through a separate FastAPI service, and deploys four Dockerized services through environment-specific Compose, GitHub Actions, Terraform, Ansible, and Nginx configurations.

What I designed, built, and shipped

The areas I owned end to end as Backend & DevOps Engineer.

  1. Built JWT authentication, OTP verification, password recovery, and client, barber, salon, employee, and admin access policies

  2. Implemented barber and salon booking flows with employee availability, overlap validation, rescheduling, cancellation, and status transitions

  3. Integrated Stripe Checkout, billing portal sessions, signed webhooks, subscription synchronization, and duplicate-event protection

  4. Created Docker, GitHub Actions, Terraform, Ansible, Nginx, monitoring, and rollback configurations for staged AWS delivery

How the system is structured

  1. Layer 01

    Four-service deployment

    Docker Compose runs the Django backend, FastAPI analysis service, Next.js admin dashboard, and React landing site as independently buildable services with health checks and environment-specific overrides.

  2. Layer 02

    Domain-oriented marketplace API

    Ten Django applications separate users, profiles, services, bookings, reviews, favorites, subscriptions, portfolios, recommendations, and educational content behind versioned REST endpoints.

  3. Layer 03

    AWS delivery pipeline

    Terraform provisions EC2, PostgreSQL RDS, S3 media storage, CloudFront, IAM, and networking; GitHub Actions builds changed services into ECR and deploys production releases through short-lived OIDC credentials and SSM Run Command.

Key technical decisions

Explicit role and ownership policies

Custom DRF permissions distinguish clients, barbers, salon owners, salon employees, administrators, verified users, and subscribed professionals, while owner-scoped querysets limit access to business records.

Database-backed booking integrity

Booking and time-slot models use ownership check constraints, indexed lookup fields, employee-scoped uniqueness, overlap validation, atomic writes, and conditional row locking for salon scheduling operations.

Webhook-driven subscription state

Stripe Checkout and billing-portal flows are reconciled through signature-verified webhooks, transactional subscription updates, and a unique webhook-event ledger that makes repeated Stripe deliveries idempotent.

Technology stack

Application

  • Python 3.13
  • Django
  • Django REST Framework
  • FastAPI

Web interfaces

  • React
  • Vite
  • Next.js
  • Tailwind CSS
  • Framer Motion

Data, security & integrations

  • PostgreSQL
  • Simple JWT
  • OTP email verification
  • Stripe
  • OpenAI API
  • YouTube Data API

Infrastructure & delivery

  • Docker Compose
  • GitHub Actions
  • AWS EC2, RDS, S3, ECR, SSM & CloudFront
  • Terraform
  • Ansible
  • Nginx
  • Prometheus, Grafana, Loki & Promtail

What the system does

Multi-role marketplace

Client, barber, salon, salon-employee, and admin accounts with OTP onboarding, JWT refresh and blacklisting, role-aware endpoints, profiles, services, portfolios, favorites, and location-based discovery.

Availability and booking management

Barber and employee time slots, service-duration validation, booking histories, cancellation rules, rescheduling, business status updates, and salon-wide or employee-scoped views.

AI hair analysis

A FastAPI upload endpoint sends supported images to an OpenAI vision model for structured face, hair, skin, color, care, and style analysis, then enriches recommendations with YouTube tutorials or search fallbacks.

Subscriptions and gated content

Stripe Checkout, customer billing portal, subscription history and entitlements, configurable plan limits, and published educational content with subscription-based premium access.

Challenges & solutions

Challenge 01

Supporting independent and salon bookings

Problem

Appointments can belong either to an independent barber or to a salon with an assigned employee, creating different ownership, availability, service, and permission rules.

Solution

The data model enforces exactly one business owner, requires an employee for salon appointments, verifies employee-service membership, and exposes separate client, employee, and salon-owner workflows.

Challenge 02

Preventing conflicting appointments

Problem

Multiple requests can target an employee and overlapping time range while a slot still appears available.

Solution

The salon booking serializer validates working availability and active-booking overlap inside a database transaction, using row locking when supported before creating the appointment.

Challenge 03

Synchronizing external billing events

Problem

Checkout completion, renewals, failures, cancellations, and duplicate webhook deliveries can otherwise leave local entitlement data inconsistent with Stripe.

Solution

Centralized Stripe services map customers and plans, update billing periods transactionally, preserve access during retryable payment failures, and record every webhook event by its unique Stripe identifier.

What was delivered

  1. Produced versioned, Swagger and ReDoc-documented APIs across ten marketplace domains.

  2. Packaged four application services for consistent local, staging, and production Docker Compose environments.

  3. Established selective CI/CD with immutable commit-tagged ECR images, production deployment through AWS SSM, health verification, and service-level rollback tooling.

What I took away

  1. Multi-tenant scheduling is easier to reason about when business ownership and employee assignment are encoded as database constraints rather than only serializer conventions.

  2. Payment integrations require idempotent event processing and explicit entitlement transitions because checkout responses alone are not an authoritative subscription state.

  3. A monorepo deployment pipeline benefits from change detection and service-scoped rebuilds when backend, AI, admin, and landing applications have independent release boundaries.

Next step

Building something that needs this kind of backend?

I take on backend, API, and DevOps work — from data modelling and REST design through containerization and production deployment.

A project case study by Md Fahad MirBackend & DevOps Engineer, Dhaka, Bangladesh.