Transforming Advanced Software Learning into Engaging Daily Challenges
Lucent is an innovative learning platform that breaks down complex software engineering books into engaging, bite-sized daily challenges. Born from the struggle of understanding dense technical literature, Lucent makes mastering advanced concepts both achievable and enjoyable.
- The Problem
- The Solution
- Key Features
- Technology Stack
- Getting Started
- Environment Variables
- Project Structure
- Subscription Tiers
- Admin Features
- Architecture
- Contributing
- License
As a software engineer or student, you've likely faced these challenges:
- ๐ Struggling through 800-page technical books
- ๐ต Feeling overwhelmed by complex concepts
- ๐ Difficulty maintaining consistent learning habits
- ๐ฎ Lack of interactive elements in traditional learning
- โก No immediate feedback or reinforcement
Lucent transforms the learning experience through:
- โฑ๏ธ Daily 15-minute interactive lessons
- ๐ฎ Gamified learning with XP and rewards
- ๐ Progress tracking and streaks
- ๐งฉ Interactive quizzes and exercises
- ๐ฅ Community learning features
- ๐ค AI-powered hints and guidance
- Structured Learning Paths: Courses organized into chapters and lessons
- Course Enrollment: Easy enrollment with progress tracking
- Course Details: Comprehensive course information with ratings and reviews
- Prerequisites: Smart prerequisite checking for course progression
- Bite-sized Content: 15-minute daily lessons broken into digestible parts
- Rich Content: Markdown support with code blocks and formatted text
- Progress Tracking: Track completion status for each lesson part
- Lesson Navigation: Easy navigation between lessons and chapters
Lucent supports multiple interactive exercise types:
- Multiple Choice: Traditional multiple-choice questions with immediate feedback
- Fill-in-the-Blanks: Dropdown-based fill-in exercises with shuffled options
- Short Answer: Flexible text input with multiple acceptable answers
- Drag and Drop: Interactive matching exercises (desktop and mobile-friendly)
- Code Challenges: Programming exercises with Monaco editor integration
- True/False: Simple true/false questions
- Lesson Quizzes: End-of-lesson assessments
- Chapter Quizzes: Comprehensive chapter reviews
- Final Course Exam: Complete course evaluation
- Daily Quiz Limits:
- Free tier: 1 quiz per day
- PRO tier: 5 quizzes per day
- Passing Scores: Configurable passing thresholds
- Detailed Feedback: Explanations for each question
- XP System: Earn experience points for completing lessons and exercises
- Gems: Virtual currency earned through learning activities
- Level Progression: Level up as you gain XP
- Achievement Badges:
- First Quiz Completed
- Streak milestones (5-day, 10-day, etc.)
- Course completion badges
- Daily Streaks: Maintain learning consistency with streak tracking
- Visual Rewards: Confetti animations and notifications for achievements
- Visual Progress Bars: See your progress at course, chapter, and lesson levels
- Completion Metrics: Track completion percentages
- Time Tracking: Monitor time spent on lessons
- Performance Analytics: View scores and performance history
- Last Activity: Track your learning activity timeline
- Three Tiers: FREE, PRO, and ENTERPRISE
- Stripe Integration: Secure payment processing
- Subscription Management: Easy upgrade/downgrade and billing management
- Tier-based Limits: Different access levels per subscription tier
- Course Management: Create, edit, and delete courses
- User Management: View and manage user accounts
- Enrollment Tracking: See enrolled students per course
- Subscription Management: Manage user subscriptions
- Migration Tools: Admin utilities for data migration
- Real-time Notifications: Toast notifications for actions
- Badge Notifications: Celebrate achievements
- XP Notifications: Show XP gains and level-ups
- Error Handling: User-friendly error messages
- Next.js 15.1.6 - React framework with App Router
- React 18.2.0 - UI library
- Tailwind CSS 3.4.1 - Utility-first CSS framework
- Framer Motion 12.6.3 - Animation library
- Lucide React 0.474.0 - Icon library
- React Hot Toast 2.5.2 - Toast notifications
- React Confetti 6.2.3 - Celebration animations
- Monaco Editor 4.6.0 - Code editor component
- Radix UI - Accessible UI primitives
- React Beautiful DnD - Drag and drop functionality
- Next.js API Routes - Serverless API endpoints
- MongoDB 6.12.0 - NoSQL database
- Mongoose 8.9.5 - MongoDB object modeling
- Node.js 18+ - Runtime environment
- Clerk 6.10.3 - Authentication and user management
- Stripe 15.12.0 - Payment processing and subscriptions
- Svix 1.64.0 - Webhook verification
- ESLint 9 - Code linting
- PostCSS 8 - CSS processing
- Git - Version control
- Node.js 18 or higher
- MongoDB database (local or Atlas)
- Clerk account
- Stripe account (for subscriptions)
-
Clone the repository
git clone https://github.com/yourusername/Lucent.git cd Lucent -
Install dependencies
npm install
-
Set up environment variables (see Environment Variables)
-
Run the development server
npm run dev
-
Open http://localhost:3000 in your browser
npm run build
npm startCreate a .env.local file in the root directory:
# MongoDB
MONGODB_URI=your_mongodb_connection_string
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
# Stripe (for subscriptions)
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key
STRIPE_WEBHOOK_SECRET=whsec_your_stripe_webhook_secret
STRIPE_PRICE_PRO_MONTHLY=price_xxxxx
STRIPE_PRICE_PRO_YEARLY=price_xxxxx
STRIPE_PRICE_ENTERPRISE_YEARLY=price_xxxxx
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000See SUBSCRIPTION_SETUP.md for detailed Stripe setup instructions.
Lucent/
โโโ src/
โ โโโ app/ # Next.js App Router pages
โ โ โโโ api/ # API routes
โ โ โ โโโ admin/ # Admin endpoints
โ โ โ โโโ courses/ # Course management
โ โ โ โโโ lessons/ # Lesson endpoints
โ โ โ โโโ quizzes/ # Quiz endpoints
โ โ โ โโโ profile/ # User profile
โ โ โ โโโ billing/ # Stripe integration
โ โ โ โโโ webhooks/ # Webhook handlers
โ โ โโโ admin/ # Admin panel pages
โ โ โโโ course-details/ # Course detail pages
โ โ โโโ lesson/ # Lesson pages
โ โ โโโ quiz/ # Quiz pages
โ โ โโโ profile/ # User profile page
โ โ โโโ components/ # Page-specific components
โ โโโ components/ # Shared React components
โ โ โโโ exercises/ # Exercise components
โ โ โโโ ui/ # UI primitives
โ โโโ models/ # Mongoose models
โ โ โโโ User.js # User schema
โ โ โโโ Course.js # Course schema
โ โ โโโ Exercise.js # Exercise schema
โ โโโ lib/ # Utility libraries
โ โ โโโ mongodb.js # Database connection
โ โ โโโ stripe.js # Stripe configuration
โ โ โโโ badgeDefinitions.js # Badge system
โ โ โโโ rewards.js # Reward calculations
โ โโโ hooks/ # Custom React hooks
โ โ โโโ useEnrollmentCheck.js
โ โ โโโ useSubscription.js
โ โโโ data/ # Course data
โ โ โโโ seedCourse.js # Course seed data
โ โ โโโ designPatternsCourse.js
โ โโโ contexts/ # React contexts
โโโ public/ # Static assets
โโโ docs/ # Documentation
โโโ scripts/ # Utility scripts
โโโ package.json
- โ Access to 2 courses
- โ 3 lessons per day
- โ 5 exercises per day
- โ 1 quiz per day
- โ Basic progress tracking
- โ Daily streaks
- โ Unlimited courses
- โ Unlimited lessons
- โ Unlimited exercises
- โ 5 quizzes per day
- โ Priority support
- โ All FREE tier features
- โ Everything in PRO
- โ Custom features
- โ Dedicated support
- โ Custom integrations
The admin panel (/admin) provides:
-
Course Management
- Create new courses with full editor
- Edit existing courses
- Delete courses
- View enrolled students per course
-
User Management
- View all users
- Manage user roles (USER/ADMIN)
- Update subscription tiers
- View user progress
-
Migration Tools
- Migrate users to subscription system
- Data cleanup utilities
Lucent follows a modern full-stack architecture:
โโโโโโโโโโโโโโโโโโโ
โ Next.js App โ
โ (Frontend + โ
โ API Routes) โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโดโโโโโ
โ โ
โโโโโผโโโโ โโโโผโโโโโ
โ Clerk โ โStripe โ
โ (Auth)โ โ(Pay) โ
โโโโโโโโโ โโโโโโโโโ
โ
โโโโโโผโโโโโ
โ MongoDB โ
โ Atlas โ
โโโโโโโโโโโ
- Server Components: Leverages Next.js 15 App Router for optimal performance
- API Routes: RESTful API endpoints for all backend operations
- MongoDB: Flexible schema for course content and user progress
- Clerk: Managed authentication to focus on core features
- Stripe: Industry-standard payment processing
The platform supports multiple exercise types with rich feedback:
- Multiple Choice: Standard MCQ with explanations
- Fill-in-the-Blanks: Dropdown-based with shuffled options
- Short Answer: Flexible matching with multiple acceptable answers
- Drag and Drop: Interactive matching (desktop & mobile)
- Code Challenges: Monaco editor integration
- True/False: Simple binary questions
See docs/short-answer-guide.md for exercise formatting details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- 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 private and proprietary. All rights reserved.
Made with โค๏ธ for developers who want to master advanced software engineering concepts