Free course platform featuring courses on coding, security, and technology. Built with Next.js, Supabase, and Firebase.
Live Demo: https://sofincourse.vercel.app/
- π Authentication: Firebase OAuth (Google & GitHub)
- π Course Management: Admin panel for creating/editing courses and lessons
- π₯ Rich Content: Markdown lessons with YouTube video embeds
- π Progress Tracking: Real-time progress saved in Supabase database
- π€ Guest Mode: First lesson free, login required for full access
- π± Mobile Responsive: Fully optimized for all devices
- π Secure: XSS prevention, SQL injection protection, rate limiting, RLS policies
- π¨ Modern UI: Cyberpunk theme with Tailwind CSS v4
- β‘ Fast: Next.js 16 App Router with React 19 Server Components
- π― SEO Optimized: Sitemap, metadata, and structured data
- Frontend: Next.js 14 (App Router) deployed on Vercel
- Backend/Database: Supabase (PostgreSQL)
- Authentication: Firebase Auth (Google & GitHub OAuth)
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui
- Markdown: gray-matter, react-markdown, rehype-highlight
- 3D Graphics: Three.js, React Three Fiber (coming soon)
- Deployment: Docker, Tor Hidden Service
The platform includes 5 courses with 8 lessons:
-
Introduction to Security (3 lessons)
- What is Cybersecurity?
- Common Security Threats
- Network Security Fundamentals
-
Python Basics (2 lessons)
- Introduction to Python
- Variables and Data Types
-
JavaScript Fundamentals (1 lesson)
- JavaScript Basics
-
Web Security Essentials (1 lesson)
- Web Security Fundamentals (OWASP Top 10)
-
Linux Basics (1 lesson)
- Linux Command Line Basics
- Node.js 18+ and npm
- Git
- Supabase account (optional, for database features)
- Firebase account (optional, for authentication)
git clone https://github.com/YOUR_USERNAME/sofincourse.git
cd sofincoursenpm installCopy the example environment file:
cp .env.example .env.localEdit .env.local with your credentials:
# Supabase (optional)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Firebase (optional)
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id- Create a project at supabase.com
- Go to SQL Editor and run the migration:
-- Copy and paste content from supabase-schema.sql - Copy your project URL and API keys to
.env.local
- Create a project at console.firebase.google.com
- Enable Authentication β Sign-in method β Google & GitHub
- Add authorized domains (localhost, your-domain.com)
- Copy your Firebase config to
.env.local
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm startSee DEPLOYMENT.md for detailed deployment instructions for:
- Vercel (Frontend)
- Supabase (Backend)
- Firebase (Authentication)
Courses are stored as markdown files in content/courses/:
content/courses/
intro-to-security/
meta.json
lessons/
01-what-is-cybersecurity.md
02-common-threats.md
03-network-security.md
meta.json format:
{
"title": "Introduction to Security",
"description": "Learn cybersecurity fundamentals",
"category": "security",
"thumbnail": "/courses/security.jpg",
"order": 1
}Lesson markdown frontmatter:
---
title: "What is Cybersecurity?"
order: 1
videoUrl: "https://www.youtube.com/embed/VIDEO_ID"
videoProvider: "youtube"
pdfUrl: "https://example.com/material.pdf"
contentType: "mixed"
---Access at /admin (requires authentication with admin role)
- Courses: Create, edit, delete courses
- Lessons: Manage video links, PDFs, and markdown content
- Users: View registered users and their progress
- Analytics: Dashboard with charts and statistics
app/
admin/ # Admin panel pages
api/ # API routes (auth, progress, stats)
auth/callback/ # OAuth callback
courses/ # Course pages
skill-tree/ # 3D skill tree
login/ # Login page
profile/ # User profile
components/ # React components
Navbar.tsx # Responsive navigation
LoginModal.tsx # Login modal
Skeletons.tsx # Loading states
content/courses/ # Markdown course content
lib/
supabase/ # Supabase clients
content.ts # Content utilities
data/
progress.json # User progress (JSON fallback)
users.json # User data (JSON fallback)
types/ # TypeScript types
- Firebase Google OAuth
- Email/Password login
- Guest mode (first lesson free)
- Protected routes
- Markdown-based content
- Video embedding (YouTube, Vimeo)
- PDF viewer integration
- Progress tracking
- Course completion badges
- Cyberpunk theme (dark mode)
- Neon green accents (#9bff00)
- Skeleton loading states
- Mobile-first responsive design
- Smooth animations
- Real-time stats (courses, lessons, students)
- User progress tracking
- Course completion rates
- ARIA labels
- Keyboard navigation
- Semantic HTML
- High contrast colors
- Screen reader friendly
- Core platform (auth, courses, lessons)
- Admin panel (course/lesson management)
- Guest access with login gate
- Mobile responsive design
- SEO optimization
- Progress tracking with real-time updates
- Security measures (XSS, SQL injection, rate limiting)
- Performance optimization
- Additional course content
- Prerequisites system for course progression
- 3D skill tree visualization with Three.js
- Course completion certificates
- User dashboard with statistics
- Course search and filtering
- Multi-language support
- β Lighthouse Score: 100/100 (Performance, Accessibility, Best Practices, SEO)
- β Font optimization with display: swap
- β Image optimization (AVIF, WebP)
- β Compression enabled
- β No lazy loading (skeleton loading instead)
-
Push to GitHub
git push origin main
-
Import to Vercel
- Go to vercel.com
- Import your GitHub repository
- Vercel will auto-detect Next.js
-
Add Environment Variables Go to Project Settings β Environment Variables and add:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_domain NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_bucket NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id ADMIN_SECRET_KEY=your_secret_key -
Deploy
- Click "Deploy"
- Your site will be live at
https://your-project.vercel.app
- Create project at supabase.com
- Go to SQL Editor
- Run the migration from
supabase-schema-v2.sql - Copy your project URL and keys to environment variables
We welcome contributions! Please see CONTRIBUTING.md for details on:
- How to contribute
- Code style guidelines
- Adding new courses
- Development setup
Security is a top priority. See SECURITY.md for:
- Reporting vulnerabilities
- Security measures implemented
- Best practices for contributors
This project is licensed under the MIT License - see LICENSE for details.
- Next.js - React framework
- Supabase - Backend as a Service
- Firebase - Authentication
- Tailwind CSS - Styling
- shadcn/ui - UI components
- All contributors and course creators
- GitHub Issues: Report a bug
- Discussions: Ask a question
- Email: contact@sofincourse.com
This project implements multiple security measures:
- Authentication: Firebase JWT token verification
- Authorization: Role-based access control (RBAC)
- Database: Row Level Security (RLS) policies on all tables
- Input Validation: Zod schemas for all user inputs
- XSS Prevention: DOMPurify sanitization
- SQL Injection: Parameterized queries
- Rate Limiting: IP-based rate limiting on API routes
- HTTPS: Enforced on all connections (Vercel default)
For security issues, please email: security@sofincourse.com
This project is licensed under the MIT License - see LICENSE for details.
- Next.js - React framework
- Supabase - Backend as a Service
- Firebase - Authentication
- Tailwind CSS - Styling
- Vercel - Hosting
If you find this project useful, please consider:
- Giving it a star β
- Contributing to the codebase
- Sharing with others
- Reporting bugs
Made with π by SofinCourse Team