A modern, structured frontend for managing academic modules and student-created supplementary videos (kuppi) built with Next.js and Tailwind CSS.
"Kuppi" refers to supplementary learning materials created by students to help their peers understand complex topics. These can include:
- Video explanations
- Study notes
- Practice problems
- Concept summaries
- Telegram download links
- Additional learning resources
The system follows a simplified hierarchical structure:
- Faculty โ Department โ Semester โ Modules โ Kuppi Videos
- Users can view all available modules for their semester
- Each module contains student-created kuppi videos with embedded YouTube players
- Simplified Selection: Faculty โ Department โ Semester โ Modules
- Module Discovery: View all available modules for the semester
- Kuppi Browsing: Browse and view student-created learning materials
- YouTube Integration: Embedded video players for seamless viewing
- Resource Sharing: Access Telegram links and material files
- Progressive Flow: Step-by-step selection process
- Responsive Design: Mobile-first approach with Tailwind CSS
- Intuitive Navigation: Clear back buttons and breadcrumbs
- Visual Feedback: Loading states, error handling, and success messages
- Video URLs: Multiple video sources (YouTube, etc.)
- Telegram Links: Direct download links
- Material Files: Notes, PDFs, and additional resources
- Metadata: Titles, descriptions, and timestamps
- Read-only Access: Browse and view existing kuppi content
src/app/
โโโ page.tsx # Home page (redirects to faculty)
โโโ faculty/page.tsx # Faculty selection
โโโ department/page.tsx # Department selection
โโโ semester/page.tsx # Semester selection + Module display
โโโ module-kuppi/page.tsx # View kuppi videos for a specific module
โโโ dashboard/page.tsx # Main dashboard with modules
โโโ videos/page.tsx # View all videos for a module
โโโ browse-kuppi/page.tsx # Browse all kuppi videos
โโโ my-kuppi/page.tsx # Manage user's own kuppi
- Frontend: Next.js 15 with App Router
- Styling: Tailwind CSS 4
- Language: TypeScript
- State Management: React hooks with localStorage
- Database: Supabase PostgreSQL (ready for integration)
The system is designed to work with the following PostgreSQL tables:
-- Core tables
faculties (id, name)
departments (id, name, faculty_id)
batches (id, name)
semesters (id, name)
students (id, name, faculty_id, department_id, batch_id, semester_id, image_url)
-- Module management
modules (id, code, name, description)
module_assignments (id, module_id, faculty_id, department_id, batch_id, semester_id)
student_additional_modules (id, student_id, module_id)
-- Video content
videos (id, module_id, title, youtube_links, telegram_links, material_urls, is_kuppi, student_id, created_at)- Node.js 18+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd kuppihub-advanced
-
Install dependencies
npm install
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
This project supports a full local Supabase stack using Docker via the Supabase CLI.
npm install -g supabaseCopy from env.example and fill it:
cp env.example .env./scripts/supabase-sync-migrations.shsupabase startThe CLI will print local URLs and keys. Update your .env with those values:
NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_local_anon_key
SUPABASE_URL=http://localhost:54321
SUPABASE_SERVICE_ROLE_KEY=your_local_service_role_keynpm run devApp: http://localhost:3000
supabase stopIf you want the app running in Docker (using a hosted Supabase):
docker compose up --buildIf you only want a local Postgres database (no Supabase services):
docker compose -f docker-compose.db.yml up --buildThis will:
- Start Postgres on
localhost:5432 - Run all SQL files in
supabase_migrations/on first startup
Default credentials:
DB: kuppihub
USER: kuppihub
PASS: kuppihub
Stop and remove data:
docker compose -f docker-compose.db.yml down -vTo connect with your Supabase database:
-
Install Supabase client
npm install @supabase/supabase-js
-
Create environment variables
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Replace mock data calls in each page component with actual Supabase queries
This project can run a full local Supabase stack in Docker using the Supabase CLI.
-
Install Supabase CLI
npm install -g supabase
-
Sync migrations
./scripts/supabase-sync-migrations.sh
-
Start local Supabase
supabase start
-
Update
.envfor local Use the URLs/keys printed bysupabase startand set:NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321 NEXT_PUBLIC_SUPABASE_ANON_KEY=your_local_anon_key SUPABASE_URL=http://localhost:54321 SUPABASE_SERVICE_ROLE_KEY=your_local_service_role_key
-
Run the app
npm run dev
import { createClient } from '@supabase/supabase-js'
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
)
// Fetch faculties
const { data: faculties, error } = await supabase
.from('faculties')
.select('*')
.order('name')When a videos row is approved (is_approved = true on insert, or false -> true on update), a DB trigger sends a POST request to your email service.
-
Apply migrations Ensure SQL in
supabase_migrations/is applied, including:20260329_video_approval_email_webhook.sql
-
Update database config values The trigger reads values from
public.system_config:emaildata_webhook_urlemaildata_webhook_secret
Update them directly in DB when needed:
UPDATE public.system_config SET value = 'https://your-email-endpoint.example', updated_at = now() WHERE name = 'emaildata_webhook_url'; UPDATE public.system_config SET value = 'your_shared_secret', updated_at = now() WHERE name = 'emaildata_webhook_secret';
-
Verify requests in email service The trigger sends headers:
x-webhook-secret: <emaildata_webhook_secret value>x-webhook-source: kuppihub-db-trigger
Validate
x-webhook-secreton the email endpoint before processing. Payload includesemails_listas an array of objects:{ name, email }.
The system uses Tailwind CSS with a consistent color scheme:
- Blue: Primary actions and navigation
- Green: Success states and confirmations
- Purple: Kuppi-related elements
- Orange: Creation and editing actions
- Red: Destructive actions
Each page uses gradient backgrounds and consistent card layouts:
- Rounded corners (
rounded-lg) - Subtle shadows (
shadow-lg) - Hover effects (
hover:shadow-xl) - Smooth transitions (
transition-all)
The system is fully responsive with:
- Mobile-first approach
- Grid layouts that adapt to screen size
- Touch-friendly buttons and interactions
- Optimized spacing for different devices
- No authentication required (as per requirements)
- Input validation on forms
- URL sanitization for external links
- XSS prevention through proper React practices
npm run build
npm start- Connect your GitHub repository to Vercel
- Set environment variables
- Deploy automatically on push
The system can be deployed to any platform that supports Next.js:
- Netlify
- AWS Amplify
- DigitalOcean App Platform
- Railway
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For questions or issues:
- Check the documentation
- Review existing issues
- Create a new issue with detailed information
- User Authentication: Login and user profiles
- Real-time Updates: Live notifications and chat
- Advanced Search: Full-text search and filters
- Analytics Dashboard: Usage statistics and insights
- Mobile App: React Native companion app
- API Integration: RESTful API for external access
Built with โค๏ธ for the student community