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.
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.
01Context
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.
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.
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.
02Ownership
The areas I owned end to end as Backend & DevOps Engineer.
Built JWT authentication, OTP verification, password recovery, and client, barber, salon, employee, and admin access policies
Implemented barber and salon booking flows with employee availability, overlap validation, rescheduling, cancellation, and status transitions
Integrated Stripe Checkout, billing portal sessions, signed webhooks, subscription synchronization, and duplicate-event protection
Created Docker, GitHub Actions, Terraform, Ansible, Nginx, monitoring, and rollback configurations for staged AWS delivery
03System design
Layer 01
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.
Layer 02
Ten Django applications separate users, profiles, services, bookings, reviews, favorites, subscriptions, portfolios, recommendations, and educational content behind versioned REST endpoints.
Layer 03
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.
04Engineering judgment
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.
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.
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.
05Toolbox
06Capabilities
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.
Barber and employee time slots, service-duration validation, booking histories, cancellation rules, rescheduling, business status updates, and salon-wide or employee-scoped views.
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.
Stripe Checkout, customer billing portal, subscription history and entitlements, configurable plan limits, and published educational content with subscription-based premium access.
07Problem solving
Challenge 01
Appointments can belong either to an independent barber or to a salon with an assigned employee, creating different ownership, availability, service, and permission rules.
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
Multiple requests can target an employee and overlapping time range while a slot still appears available.
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
Checkout completion, renewals, failures, cancellations, and duplicate webhook deliveries can otherwise leave local entitlement data inconsistent with Stripe.
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.
08Result
Produced versioned, Swagger and ReDoc-documented APIs across ten marketplace domains.
Packaged four application services for consistent local, staging, and production Docker Compose environments.
Established selective CI/CD with immutable commit-tagged ECR images, production deployment through AWS SSM, health verification, and service-level rollback tooling.
09Reflection
Multi-tenant scheduling is easier to reason about when business ownership and employee assignment are encoded as database constraints rather than only serializer conventions.
Payment integrations require idempotent event processing and explicit entitlement transitions because checkout responses alone are not an authoritative subscription state.
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
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 Mir — Backend & DevOps Engineer, Dhaka, Bangladesh.