0

اهلا وسهلا

Hello

Bonjour

Hola

Ciao

Hallo

Olá

こんにちは

नमस्ते

Привет

The details are not the details.

They make the design.

// CASE_STUDY_REPORT

Sahla LMS: A Multi-Tenant B2B2C SaaS Learning Platform

A full-stack, multi-tenant B2B2C LMS empowering instructors to launch their own branded online academies with features like a drag-and-drop page builder, AI quizzes, and interactive coding playgrounds.

SPEC
// Category

Collaborative Team Project

// Core_Stack
Next.js 15 (App Router)React 19TypeScriptPostgreSQL & PrismaStripeTailwind CSS & shadcn/uiMulti-tenancynext-intl (i18n)Judge0 APIPuck.js
Sahla LMS: A Multi-Tenant B2B2C SaaS Learning Platform
Encrypted_Stream: OKAsset_ID: 2025_9_SAHLA_LMS
[ 01_SEQUENTIAL_DATA ]

Project Objective

The primary goal of Sahla LMS was to create a white-label SaaS platform that empowers educators and businesses to launch their own online learning academies without technical overhead. We aimed to provide a comprehensive, all-in-one solution that handles everything from course creation and student management to payment processing and custom branding, allowing creators to focus solely on their content.

[ 02_SEQUENTIAL_DATA ]

Technical Architecture

Next.js (App Router) & TypeScript

Next.js (App Router) & TypeScript

Chosen for its robust features like Server Components, Server Actions for mutations, and built-in routing, which are ideal for a complex, full-stack application. TypeScript ensures type safety and scalability across the entire codebase.

PostgreSQL & Prisma

PostgreSQL & Prisma

PostgreSQL provides a reliable and scalable relational database. Prisma was used as the ORM for its excellent type safety, declarative schema, and seamless integration with Next.js, making database interactions predictable and efficient.

Stripe for Payments & Subscriptions

Stripe for Payments & Subscriptions

Integrated Stripe for secure payment processing, handling both one-time course purchases and recurring subscriptions. Webhooks were implemented to automate enrollments and manage subscription statuses in real-time.

Multi-Tenancy Architecture

Multi-Tenancy Architecture

The core of the platform. We used a subdomain-based approach, managed through Next.js Middleware, to isolate tenant data at both the routing and database levels, ensuring each instructor has a completely separate and branded experience.

Judge0 API for Code Execution

Judge0 API for Code Execution

To provide a hands-on learning experience for technical courses, we integrated the Judge0 API. This allows students to write and execute code in multiple languages directly within a lesson, receiving instant feedback.

Puck.js for Page Building

Puck.js for Page Building

To give instructors full control over their brand, we integrated Puck.js as a headless, drag-and-drop landing page editor. This allows for dynamic, customizable public-facing pages without writing any code.

[ 03_SEQUENTIAL_DATA ]

Visual Assets

Asset 1
Asset 2
Asset 3
Asset 4
Asset 5
Asset 6
[ 04_SEQUENTIAL_DATA ]

Logic & Challenges

One of the most significant challenges was implementing the multi-tenancy architecture. We needed to ensure that data for each instructor (courses, students, branding) was completely isolated. Our solution involved using Next.js Middleware to identify the tenant from the subdomain. This subdomain was then used to dynamically scope all Prisma queries, ensuring that every database request was automatically filtered by the correct tenantId. This approach provided robust data isolation and allowed each instructor to have a truly independent platform.

Another challenge was implementing localization to support both English (LTR) and Arabic (RTL). This went beyond simple text translation. We used the next-intl library and architected our UI components with Tailwind CSS to dynamically handle layout mirroring, text direction, and culturally appropriate formatting, providing a native experience for all users.

[ 05_SEQUENTIAL_DATA ]

Final Analysis

Verified_Outcome

This project was a deep dive into building a scalable SaaS product from the ground up. I gained significant experience in full-stack development with the Next.js App Router, implementing a secure multi-tenant architecture, and integrating complex third-party APIs like Stripe and Judge0. I also learned the importance of creating a seamless user experience, from the admin dashboard to the student learning environment, and how to balance technical complexity with business goals.

[ 06_SEQUENTIAL_DATA ]

Additional Logs

The Story Behind "Sahla"

Sahla (Arabic for "سهله") was born from a simple idea: to democratize online education by removing the technical barriers for talented creators. We envisioned a platform where any instructor could launch a professional, fully-branded online academy in minutes, not months.

As a key developer on the team, my work was central to building the core learning experience... I led the development of the instructor and student dashboards, transforming them into data-rich interfaces with analytics, a "Continue Learning" feature, and a full gamification system (XP & Leaderboards)... Furthermore, I implemented critical learning features such as lesson completion tracking, course locking logic..., and a versatile question import tool (CSV/JSON)... I also developed the platform's role-based commenting system.

I also led the development of the student and instructor dashboards, focusing on creating a data-rich experience with analytics that provides actionable insights. This included building features like "Continue Learning" and the gamification system (XP & Leaderboards) to significantly boost student engagement and course completion rates. This project wasn't just about writing code; it was about building a product that empowers others to build their own businesses.

COMM_
LINK
[ ESTABLISH_CONNECTION ]

Let's Build
The Future.

Ready to take your project to the next level? Book a session or send a direct transmission.

Avg_Response_Time: 4 Hours
Sync_Status: Online & Ready

Quick_Transmission

// Latency: 24ms// Protocol: Secure_HTTPS
Waiting for your signal...