Learning Management System built with Next.js, Prisma, Clerk, and UploadThing.
- Node.js 18+
- npm or yarn
- PostgreSQL database (Neon/Vercel Postgres recommended)
- Clone the repository:
git clone <your-repo-url>
cd lms-tutorial- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.localThen fill in your actual values in .env.local:
- Clerk: Sign up at https://clerk.com and get your keys
- Database: Get PostgreSQL connection string from Neon or Vercel
- UploadThing: Sign up at https://uploadthing.com and configure App URL
- Mux (optional): For video processing at https://mux.com
- Stripe (optional): For payments at https://stripe.com
- Set up the database:
npx prisma generate
npx prisma db push- Run the development server:
npm run devOpen http://localhost:3000 in your browser.
- Framework: Next.js 16 (App Router with Turbopack)
- Language: TypeScript
- Database: PostgreSQL + Prisma ORM
- Authentication: Clerk
- File Upload: UploadThing
- Rich Text Editor: react-quill-new
- Styling: Tailwind CSS 4 + shadcn/ui
- Video Processing: Mux (optional)
- Payment: Stripe (optional)
lms-tutorial/
├── app/ # Next.js app directory
│ ├── (dashboard)/ # Dashboard routes (protected)
│ ├── api/ # API routes
│ └── globals.css # Global styles
├── components/ # React components
│ └── ui/ # shadcn/ui components
├── lib/ # Utilities
│ └── generated/prisma/ # Prisma client
└── prisma/ # Database schema
└── schema.prisma
See .env.example for all required environment variables.
Important: Never commit .env.local to Git! It contains sensitive keys.
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm start- Start production servernpx prisma studio- Open Prisma Studio (database GUI)npx prisma generate- Generate Prisma Clientnpx prisma db push- Push schema changes to database
- Clone the repository
- Copy
.env.exampleto.env.local - Ask team lead for actual API keys and database URL
- Run
npm install - Run
npx prisma generateto generate Prisma Client - Run
npm run devto start development - Happy coding! 🎉
- Sign up at https://uploadthing.com
- Create a new app
- In dashboard settings, set App URL to
http://localhost:3000(for local dev) - Copy
UPLOADTHING_TOKEN,UPLOADTHING_SECRET, andUPLOADTHING_APP_IDto.env.local
MIT