A cutting-edge platform for students and lecturers to collaborate, learn, and grow together in the digital age. Built with modern web technologies and designed with user experience as the top priority.
- Modern Design System: Custom color palette with 50+ carefully crafted color variations
- Dark/Light Mode: Complete theme system with system preference detection
- Smooth Animations: 60fps micro-interactions and page transitions
- Glassmorphism Effects: Modern blur effects and transparency layers
- Responsive Design: Pixel-perfect on mobile, tablet, and desktop
- Accessibility: WCAG 2.1 AA compliant with proper contrast ratios
- Role-based Access: Separate student and lecturer experiences
- JWT Security: Secure token-based authentication
- Password Strength: Real-time validation with visual feedback
- Social Login: Google and GitHub integration ready
- Remember Me: Persistent sessions with secure storage
- Form Validation: Client-side and server-side validation
- Student Dashboard: Course progress, certificates, and achievements
- Lecturer Dashboard: Student analytics, course management, revenue tracking
- Real-time Statistics: Live data with animated counters
- Progress Tracking: Visual progress bars and completion metrics
- Quick Actions: One-click access to common tasks
- Theme Toggle: Multiple variants (button, dropdown) with smooth animations
- System Detection: Automatic dark/light mode based on OS preference
- FOUC Prevention: No flash of unstyled content on page load
- Persistent Storage: Theme preference saved across sessions
- Smooth Transitions: 300ms transitions for all theme changes
- Next.js 15 - React framework with App Router and Turbopack
- TypeScript - Full type safety with strict mode
- Tailwind CSS v4 - Latest utility-first CSS framework
- React Context - Advanced state management for themes
- Custom Hooks - Reusable logic with TypeScript generics
- Modern Design System - 300+ utility classes and custom components
- FastAPI - High-performance Python web framework
- SQLAlchemy 2.0 - Modern async-capable ORM
- Pydantic v2 - Advanced data validation and serialization
- Python-JOSE - JWT token handling and validation
- Passlib + Bcrypt - Secure password hashing
- CORS Middleware - Cross-origin resource sharing
- Uvicorn - Lightning-fast ASGI server
- SQLite - Development database (file-based)
- MySQL/PostgreSQL - Production database options
- LocalStorage - Client-side theme and auth persistence
- Database Migrations - Automatic schema management
- Node.js 18+ and npm
- Python 3.8+
- Git
-
Navigate to backend directory
cd backend -
Create and activate virtual environment
python -m venv env source env/bin/activate # On Windows: env\Scripts\activate
-
Install dependencies
pip install fastapi uvicorn sqlalchemy pydantic python-multipart bcrypt python-jose[cryptography] email-validator passlib
-
Initialize database
python create_db.py
-
Start the development server
python run.py # OR uvicorn main:app --host 0.0.0.0 --port 8000 --reloadβ API available at:
http://localhost:8000
π API Documentation:http://localhost:8000/docs
-
Open a new terminal and navigate to frontend
cd frontend -
Install dependencies
npm install
-
Start the development server
npm run dev
β Frontend available at:
http://localhost:3000
π¨ Theme Demo:http://localhost:3000/theme-demo
- π Visit Homepage - Navigate to
http://localhost:3000 - π Choose Role - Select Student or Lecturer path
- β¨ Create Account - Sign up with email and strong password
- π Sign In - Access your personalized dashboard
- π Toggle Theme - Switch between light, dark, or system mode
- π Browse Courses - Explore available learning content
- π Track Progress - Monitor completion and achievements
- π Earn Certificates - Complete courses for recognition
- π» Interactive Learning - Engage with hands-on materials
- π Dashboard Analytics - View learning statistics
- β Create Courses - Build comprehensive learning experiences
- π₯ Manage Students - Monitor enrollment and progress
- π View Analytics - Access detailed performance insights
- π° Track Revenue - Monitor course earnings
- π’ Send Updates - Communicate with students
code-platform-app/
βββ frontend/ # βοΈ Next.js 15 Frontend
β βββ app/
β β βββ components/ # π§Ώ Reusable UI Components
β β β βββ Button.tsx # Modern button variants
β β β βββ Input.tsx # Enhanced form inputs
β β β βββ ThemeToggle.tsx # Theme switching component
β β β βββ ThemeScript.tsx # FOUC prevention script
β β β βββ FormWrapper.tsx # Form container with styling
β β β βββ RoleCard.tsx # Interactive role selection
β β βββ contexts/ # π« React Context Providers
β β β βββ ThemeContext.tsx # Theme state management
β β βββ dashboard/ # π Dashboard Pages
β β β βββ layout.tsx # Dashboard layout wrapper
β β β βββ student/ # Student dashboard
β β β βββ lecturer/ # Lecturer dashboard
β β βββ utils/ # π§ Utilities & Helpers
β β β βββ api.ts # API client & auth
β β βββ role/ # π Role selection page
β β βββ signin/ # π Authentication pages
β β βββ signup/
β β βββ theme-demo/ # π¨ Theme testing page
β β βββ globals.css # π¨ Design system & themes
β β βββ layout.tsx # Root layout with providers
β β βββ page.tsx # Landing page
β βββ package.json
βββ backend/ # π FastAPI Backend
β βββ main.py # FastAPI app with JWT auth
β βββ models.py # SQLAlchemy models
β βββ database.py # Database configuration
β βββ create_db.py # Database initialization
β βββ run.py # Development server
βββ README.md
βββ CONTRIBUTING.md
Our design system rivals industry leaders like Vercel, Linear, and Stripe:
- 50+ Color Variations: Each color has 11 shades (50-950)
- Semantic Colors: Background, foreground, muted, border, ring
- Theme Compatibility: Perfect contrast ratios in light/dark modes
- CSS Custom Properties: Dynamic theming with CSS variables
- Fluid Typography: Responsive sizing from mobile to desktop
- Font Variants: Geist Sans & Mono for optimal readability
- Hierarchy: 10 text sizes (xs to 6xl) with proper line heights
- Weight System: 4 font weights for perfect emphasis
- Button Variants: 6 styles (primary, secondary, ghost, destructive, success, gradient)
- Input Components: 3 variants with icons and validation states
- Form Wrappers: Glassmorphism containers with floating elements
- Theme Toggles: 2 variants (button, dropdown) with smooth animations
- Micro-interactions: Hover states with 200-300ms transitions
- Page Transitions: Fade-in, slide-up, scale-in animations
- Loading States: Beautiful spinners and skeleton screens
- 60fps Performance: Hardware-accelerated CSS animations
Create a .env file in the frontend directory:
NEXT_PUBLIC_API_URL=http://localhost:8000The backend uses SQLite by default. To use MySQL or PostgreSQL, update backend/database.py:
# For MySQL
DATABASE_URL = "mysql+pymysql://username:password@localhost:3306/codeplatform"
# For PostgreSQL
DATABASE_URL = "postgresql://username:password@localhost:5432/codeplatform"- Push your code to GitHub
- Connect your repository to Vercel
- Set environment variables
- Deploy
- Update database configuration for production
- Add production environment variables
- Deploy using your preferred platform
Customize the design system in app/globals.css:
:root {
/* Primary brand colors */
--primary-500: #0ea5e9; /* Main brand color */
--primary-600: #0284c7; /* Hover states */
/* Custom gradients */
--gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}# Create new account
POST /signup
{
"username": "john_doe",
"email": "john@example.com",
"password": "SecurePass123!",
"role": "student"
}
# Sign in
POST /signin
{
"email": "john@example.com",
"password": "SecurePass123!",
"role": "student"
}
# Health check
GET /// Successful signup
{
"message": "Student account created successfully",
"user_id": 1,
"success": true
}
// Successful signin
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "bearer",
"user": {
"id": 1,
"username": "john_doe",
"email": "john@example.com",
"role": "student"
},
"message": "Welcome back, john_doe!"
}GET /courses- List all available coursesPOST /courses- Create new course (lecturers only)GET /users/profile- Get current user profilePOST /enrollment- Enroll in a courseGET /analytics- Get dashboard analyticsPOST /certificates- Generate course certificates
- Password Hashing: Bcrypt for secure password storage
- JWT Tokens: Secure authentication tokens
- CORS Protection: Configured for frontend origin
- Input Validation: Pydantic models for data validation
- SQL Injection Protection: SQLAlchemy ORM
- Course management system
- Video streaming integration
- Real-time chat and forums
- Advanced analytics
- Mobile application
- Payment integration
- Certification system
- AI-powered recommendations
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For support and questions, please open an issue on GitHub.
Built with β€οΈ for learners worldwide.