I've created a comprehensive class management system with dual login functionality exactly as you requested. Here's what you have:
-
Dual Login System:
- Students login with registration number + password
- Admin login with passkey only
-
Responsive Design:
- Mobile-first approach
- Perfect for both mobile and desktop
- Modern, clean UI with Tailwind CSS
-
Complete Feature Set:
- Student dashboard with overview, seminars, assignments, homework, tests, notes, todos
- Admin dashboard with user management and content management
- Real-time data from Supabase database
- Secure authentication with JWT tokens
-
Create Supabase Account:
- Go to supabase.com
- Sign up for a free account
- Create a new project
-
Set Up Database:
- In your Supabase dashboard, go to "SQL Editor"
- Copy the entire content from
database/setup.sql - Paste and execute it
- This creates all tables and sample data
-
Get Your Credentials:
- Go to Settings > API
- Copy your Project URL and anon/public key
- Update .env file:
# Replace with your actual Supabase credentials NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_here SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here # Change this to something secure ADMIN_PASSKEY=your_secure_admin_passkey # Generate a strong random string JWT_SECRET=your_very_secure_jwt_secret_here
-
Install Dependencies:
npm install
-
Start Development Server:
npm run dev
-
Open in Browser:
- Navigate to http://localhost:3000
- You should see the login page
After running the database setup, you can use these credentials:
- Passkey:
admin123(or whatever you set in .env)
- Registration Number:
STU001,STU002, orSTU003 - Password:
admin123
- Dashboard: Overview of all activities
- Seminars: View and register for events
- Assignments: Track due dates and requirements
- Homework: Access homework assignments
- Tests: View test schedules and syllabi
- Notes: Study materials and notes
- To-dos: Personal task management
- User Management: Add, edit, delete students
- Content Management: Create seminars, assignments, tests
- System Settings: Configure application settings
- Analytics: View system statistics
- Role-based access control
- JWT token authentication
- Password hashing with bcrypt
- Protected API routes
- Middleware-based route protection
The entire application is built mobile-first:
- ✅ Responsive navigation
- ✅ Touch-friendly interface
- ✅ Optimized for all screen sizes
- ✅ Fast loading on mobile networks
- Frontend: Next.js 15, React 19, TypeScript
- Database: Supabase (PostgreSQL)
- Styling: Tailwind CSS 4
- Authentication: Custom JWT implementation
- Icons: Lucide React
- Push your code to GitHub
- Connect to Vercel
- Add environment variables
- Deploy automatically
- Netlify
- Railway
- DigitalOcean App Platform
If you need help:
- Check the main README.md for detailed documentation
- Ensure all environment variables are set correctly
- Verify Supabase database is set up properly
- Check the browser console for any errors
- Customize the Design: Modify colors, layouts in the components
- Add More Features: Create new sections as needed
- Set Up Production: Deploy to a hosting platform
- Configure Domain: Point your domain to the deployed app
Your class management system is now ready to use! 🎉