A Next.js + Supabase web app for managing student admissions, fees, and test results.
- Frontend: Next.js 14 (App Router) + TypeScript + Tailwind CSS
- Backend/Database: Supabase (PostgreSQL)
- Go to supabase.com and create a new project
- Once the project is ready, go to SQL Editor
- Copy and paste the entire contents of
supabase_schema.sqland click Run - This will create all tables, views, indexes, and seed data
- Duplicate
.env.exampleand rename it to.env.local - Go to your Supabase project → Project Settings → API
- Copy Project URL and paste it as
NEXT_PUBLIC_SUPABASE_URL - Copy anon/public key and paste it as
NEXT_PUBLIC_SUPABASE_ANON_KEY
NEXT_PUBLIC_SUPABASE_URL=https://xxxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGc...
npm install
npm run dev| Module | What it does |
|---|---|
| Dashboard | Overview stats — students, classes, monthly fees collected/due |
| Classes | Add/remove classes and subjects |
| Students | Admit students, view profiles, see their full fee + result history |
| Fees | Generate monthly fees for all students, mark fees as paid/unpaid |
| Tests | Create tests (name, class, subject, date), enter marks for whole class |
| Results | View class results with ranking, % score, and grade (A+ to F) |
- Go to Fees page at the start of each month
- Click Generate Monthly Fees — this creates one fee record per active student
- As students pay, click Mark Paid next to their name
- Filter by "Unpaid" to see who still owes
- Go to Tests → Create Test
- Fill in test name, class, subject, date, total marks → click Create
- You land directly on the mark entry screen
- Type each student's marks — press Enter to move to next student
- Check Absent for absent students
- Click Save All Marks when done
- Go to Results
- Select the class and test
- Show the screen to the parent — it shows marks, percentage, grade, and class rank
You can also call this from Supabase SQL editor:
SELECT generate_monthly_fees(2025, 9); -- September 2025This creates fee records for all active students, using their default monthly fee. If a record already exists (e.g., you ran it twice), it is safely skipped.
academy/
├── app/
│ ├── dashboard/page.tsx # Stats overview
│ ├── students/
│ │ ├── page.tsx # Student list with filters
│ │ ├── new/page.tsx # Admit new student
│ │ └── [id]/page.tsx # Student profile + fees + results
│ ├── fees/page.tsx # Fee management
│ ├── tests/
│ │ ├── page.tsx # Test list
│ │ ├── new/page.tsx # Create test
│ │ └── [id]/marks/page.tsx # Mark entry grid
│ ├── results/page.tsx # Results viewer
│ └── classes/page.tsx # Manage classes & subjects
├── components/layout/Sidebar.tsx
├── lib/supabase.ts # Supabase client
├── types/index.ts # TypeScript types
└── supabase_schema.sql # Full database schema