An advanced, full-stack Learning Management System built with Next.js 16, Prisma, Stripe, and AWS S3. Designed to provide a seamless educational experience with features like course creation, secure student enrollment, video content delivery, and real-time progress tracking.
- 🔐 Robust Authentication: Secure sign-up/login using Better Auth with Email OTP and GitHub/Google OAuth.
- 👥 Role-Based Access: Distinct roles for Admins, Tutors, and Students with protected routes and dashboards.
- 📚 Course Management: Comprehensive tools for instructors to create, edit, and publish courses with rich text descriptions (TipTap) and video lessons.
- 🎥 Video Streaming: High-performance video content delivery powered by AWS S3 with secure, presigned URLs.
- 💳 Secure Payments: Integrated Stripe checkout for one-time course purchases and subscription models (e.g., "Become a Tutor").
- 📈 Progress Tracking: Real-time tracking of lesson completion and overall course progress for students.
- 🛡️ Advanced Security: Protected by Arcjet for bot detection, rate limiting, and SQL injection prevention.
- 📧 Transactional Emails: Automated email notifications and OTPs via Resend.
- 📊 Interactive Dashboard: Visual analytics and stats using Recharts and TanStack Table.
- 🎨 Modern UI/UX: fast and responsive interface built with Tailwind CSS 4 and Radix UI(ShadcnUI) components.
- 🎨 Modern UI/UX: fast and responsive interface built with Tailwind CSS 4 and Radix UI(Shadcn) components.
- Framework: Next.js 16 (App Router)
- Library: React 19
- Styling: Tailwind CSS 4
- Components: Radix UI, Shadcn UI
- Icons: Lucide React
- Rich Text: TipTap
- Charts: Recharts
- Database: PostgreSQL
- ORM: Prisma
- Auth: Better Auth
- Server Actions: Next.js Server Actions for mutations
- CI/CD: Jenkins
- Containerization: Docker
- Container Registry: Docker Hub
This project uses a robust CI/CD pipeline managed by Jenkins to ensure code quality and seamless deployment.
- Fast Feedback Loop: Every commit triggers an automated pipeline.
- Automated Checks:
- Linting: Ensures code style and quality.
- Type Checking: Validates TypeScript types.
- Build Verification: Confirms the Next.js app builds successfully.
- Docker Integration:
- Automatically builds a Docker image on changes to the
mainbranch. - Pushes the image to Docker Hub with version tags.
- Automatically builds a Docker image on changes to the
- Pull Request Automation: Automatically merges approved PRs when checks pass.
Follow these steps to set up the project locally.
- Node.js (v20+ recommended)
- pnpm (Package Manager)
- PostgreSQL Database URL
- Accounts for Stripe, AWS, Resend, and Arcjet
-
Clone the repository:
git clone https://github.com/your-username/lak_lms_system.git cd lak_lms_system -
Install dependencies:
pnpm install
-
Configure Environment Variables: Create a
.envfile in the root directory and add the following keys:# Database DATABASE_URL="postgresql://..." # Authentication (Better Auth) BETTER_AUTH_SECRET="your_generated_secret" BETTER_AUTH_URL="http://localhost:3000" AUTH_GITHUB_CLIENT_ID="your_github_client_id" AUTH_GITHUB_SECRET="your_github_secret" AUTH_GOOGLE_CLIENT_ID="your_google_client_id" AUTH_GOOGLE_SECRET="your_google_secret" # Email (Resend) RESEND_API_KEY="re_..." # Security (Arcjet) ARCJET_KEY="aj_..." # Storage (AWS S3) AWS_ACCESS_KEY_ID="your_access_key" AWS_SECRET_ACCESS_KEY="your_secret_key" AWS_REGION="us-east-1" NEXT_PUBLIC_S3_NAME_IMGES="your_bucket_name" # Payments (Stripe) STRIPE_API_KEY="sk_test_..." STRIPE_WEBHOOK_SECRET="whsec_..." STRIPE_TUTOR_PRODUCT_ID="prod_..."
-
Setup the Database: Push the schema to your database.
npx prisma db push
-
Run the Development Server:
pnpm run dev
Open http://localhost:3000 to view the application.
lak_lms_system/
├── app/ # Next.js App Router pages and API routes
│ ├── (auth)/ # Authentication routes
│ ├── (public)/ # Publicly accessible pages
│ ├── admin/ # Admin dashboard and controls
│ ├── dashboard/ # Student dashboard
│ └── api/ # Backend API endpoints
├── components/ # Reusable UI components
├── lib/ # Utility functions and service configurations
├── prisma/ # Database schema
└── public/ # Static assetsContributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is proprietary and confidential.
Made with ❤️ by Sakila Lakmal