Appearance
Local Setup & Environment
This guide covers how to get the LMS platform running on your local machine for development.
Because the platform is decoupled, the Admin UI, User UI, and backend Edge Functions are maintained in completely separate repositories. You will need to clone and run the specific repository you are actively working on.
Prerequisites
Before cloning the repositories, ensure your local development environment has the following installed:
- Node.js (v18 or higher)
- npm (v9 or higher)
- Git
- Supabase CLI (Required for serving Edge Functions locally)
- Docker (Required by the Supabase CLI to emulate the backend environment)
1. Repository Setup
Choose the application or service you need to work on and clone its specific repository.
For the Admin Application:
bash
git clone https://github.com/shajipaintsdev/lms-admin-v2.git
cd lms-admin-v2
npm installFor the User Application:
bash
git clone https://github.com/shajipaintsdev/lms-user-v3.git
cd lms-user-v3
npm installFor the Edge Functions:
bash
git clone https://github.com/shajipaintsdev/lms-supabase-functions.git
cd lms-supabase-functions
npm install2. Environment Variables
Frontend Applications (Admin & User) In the root of the React repository you are working in, duplicate the example file:
bash
cp .env.localPopulate it with the staging keys provided by the team lead or higher authority:
bash
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_keyEdge Functions
Edge functions handle server-side logic and require their own environment variables (often for third-party API keys or service roles). In the root of the lms-supabase-functions repository:
bash
cp .env.localPopulate it with the staging keys provided by the team lead or higher authority:
bash
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key