A modern, gamified language learning application built with Next.js 14, featuring interactive lessons, progress tracking, and a comprehensive admin panel for content management.
- Interactive Lessons: Structured learning with units, lessons, and challenges
- Multiple Challenge Types:
- SELECT: Multiple choice questions
- ASSIST: Audio-assisted learning with visual cues
- Gamification: Hearts system, points, and progress tracking
- Audio Support: Pronunciation guides and sound effects
- Practice Mode: Regain hearts without losing progress
- Leaderboard: Compete with other learners
- Quests System: Daily challenges and XP goals
- Shop: Spend points on hearts and premium features
- Progress Tracking: Visual progress bars and completion statistics
- Stripe Integration: Subscription management
- Pro Mode: Unlimited hearts and advanced features
- Promotional System: Upgrade prompts for free users
- Content Management: Full CRUD operations for courses, units, lessons, challenges, and options
- React Admin: Professional admin interface
- Course Structure: Hierarchical organization (Courses โ Units โ Lessons โ Challenges)
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Radix UI - Accessible component primitives
- Lucide React - Icon library
- React Admin - Admin panel framework
- Drizzle ORM - Type-safe database operations
- PostgreSQL - Primary database (Neon serverless)
- Next.js API Routes - Serverless API endpoints
- Clerk - User authentication and management
- Stripe - Payment processing and subscriptions
- Zustand - Lightweight state management
- React Use - Useful React hooks
- Sonner - Toast notifications
- React Confetti - Celebration animations
lingo/
โโโ app/ # Next.js App Router
โ โโโ (main)/ # Main app routes
โ โ โโโ courses/ # Course selection
โ โ โโโ learn/ # Learning interface
โ โ โโโ leaderboard/ # User rankings
โ โ โโโ quests/ # Daily challenges
โ โ โโโ shop/ # Points marketplace
โ โโโ (marketing)/ # Landing page
โ โโโ admin/ # Admin panel
โ โโโ api/ # API endpoints
โ โโโ lesson/ # Lesson components
โโโ components/ # Reusable components
โ โโโ modals/ # Modal dialogs
โ โโโ ui/ # UI components
โโโ db/ # Database schema & queries
โโโ lib/ # Utility functions
โโโ store/ # Zustand stores
โโโ actions/ # Server actions
โโโ public/ # Static assets
The application uses a hierarchical structure:
- Courses โ Units โ Lessons โ Challenges โ Challenge Options
- User Progress: Tracks hearts, points, and active course
- Challenge Progress: Individual challenge completion
- User Subscriptions: Stripe integration for premium features
- Course Selection: Choose from available languages (Spanish, Italian, French, Croatian)
- Unit Progression: Complete units in order
- Lesson Challenges: Interactive exercises with immediate feedback
- Progress Tracking: Visual progress indicators and statistics
- Gamification: Earn points, maintain hearts, unlock achievements
- Clerk Integration: Secure user authentication
- Admin Protection: Role-based access control
- Session Management: Persistent user sessions
- Freemium Model: Free tier with limited hearts
- Premium Subscriptions: Unlimited hearts and features
- Points Economy: Earn and spend points on hearts
- Stripe Integration: Secure payment processing
- Node.js 18+
- PostgreSQL database
- Clerk account for authentication
- Stripe account for payments
-
Clone the repository
git clone <repository-url> cd lingo
-
Install dependencies
npm install
-
Environment Setup Create a
.env.localfile with:DATABASE_URL=your_postgresql_connection_string NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key CLERK_SECRET_KEY=your_clerk_secret STRIPE_API_KEY=your_stripe_secret_key NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
-
Database Setup
npm run db:push # Push schema to database npm run db:seed # Seed with initial data
-
Start Development Server
npm run dev
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run db:studio- Open Drizzle Studionpm run db:push- Push schema changesnpm run db:seed- Seed databasenpm run db:reset- Reset databasenpm run db:prod- Production database operations
- Responsive Design: Mobile-first approach
- Dark/Light Mode: Theme switching support
- Accessibility: ARIA-compliant components
- Animations: Smooth transitions and micro-interactions
- Audio Feedback: Sound effects for correct/incorrect answers
Access the admin panel at /admin (requires admin privileges)
- Manage courses, units, lessons, and challenges
- Create and edit content through intuitive forms
- View and manage user data
- Modify supported languages in
scripts/seed.ts - Adjust gamification parameters in
constants.ts - Customize UI themes in
tailwind.config.ts
- Progressive Web App: Installable on mobile devices
- Touch-Friendly: Optimized for touch interactions
- Responsive Layout: Adapts to all screen sizes
- Offline Capability: Core features work offline
The application is optimized for deployment on:
- Vercel (recommended for Next.js)
- Netlify
- Railway
- Any Node.js hosting platform
- Set up production database
- Configure environment variables
- Set up Stripe webhooks
- Configure Clerk production keys
- Run database migrations
- Test payment flows
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Built with modern web technologies
- Inspired by popular language learning platforms
- Uses open-source libraries and frameworks
Happy Learning! ๐๐