A comprehensive Academic Information System built with Next.js 15, designed to manage student records, course registrations, grades, schedules, thesis management, accommodation, and more. Features full bilingual support (English/Slovak) and role-based access control.
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Configuration
- Running the Application
- User Roles & Permissions
- Complete Route Reference
- Testing Guide
- Internationalization
- Troubleshooting
| Feature | Description |
|---|---|
| π Course Enrollment | Browse open course offerings and enroll with capacity tracking |
| π Schedule Management | Interactive week/list view timetable with section registration |
| π Grade Tracking | View grades, GPA calculation, and earned credits |
| π Course Details | Access course materials, assessment components, and grades |
| π― Exam Registration | Register for exam terms (final, practical, presentation) |
| π Thesis Management | Browse topics, request assignment, track milestones, submit work |
| π Accommodation | Apply for dormitory, track application status, view payments |
| π Certificates | Request study confirmations and accommodation contracts (PDF) |
| βοΈ Messages | Receive and send messages with file attachments |
| π€ Profile | Manage personal information and avatar |
| Feature | Description |
|---|---|
| π Course Offerings | Create and manage course offerings for semesters |
| π Sections & Meetings | Define class sections with time slots, rooms, and meeting types (Lecture, Lab, Exercise, Seminar, etc.) |
| π Thesis Topics | Create, publish, and manage thesis topics |
| β Assignment Requests | Review and approve/reject student thesis requests |
| π₯ Thesis Supervision | Monitor student progress, create milestones, review submissions |
| π Student Management | View enrolled students and their progress |
| Feature | Description |
|---|---|
| π₯ User Management | Manage users and assign roles (admin, teacher, student) |
| π Accommodation Admin | Review applications, manage payments, process requests |
| π Certificate Admin | Fulfill official certificate requests |
| π System Statistics | Dashboard with system-wide analytics |
| Feature | Description |
|---|---|
| π Bilingual Support | Full English and Slovak language support |
| π¨ Theme Toggle | Light/Dark mode support |
| π± Responsive Design | Mobile-friendly interface |
| π Role-Based Access | Secure access control per user role |
| π File Attachments | Upload and download files with signed URLs |
| π PDF Generation | Generate certificates with Puppeteer |
| Technology | Purpose |
|---|---|
| Next.js 15.5.6 | React framework with App Router & Turbopack |
| React 19.1.0 | UI library |
| TypeScript | Type-safe development |
| Tailwind CSS 4 | Utility-first styling |
| Shadcn/ui | Accessible component library (built on Radix UI) |
| Lucide React | Icon library |
| React Hook Form | Form handling |
| Zod | Schema validation |
| Zustand | State management |
| Sonner | Toast notifications |
| date-fns | Date utilities |
| Technology | Purpose |
|---|---|
| Supabase | Backend-as-a-Service (PostgreSQL, Auth, Storage) |
| PostgreSQL | Relational database |
| Row Level Security | Database-level access control |
| Server Actions | Next.js server-side mutations |
| Puppeteer | PDF generation |
mais-clone/
βββ app/ # Next.js App Router
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ [lang]/ # Locale-prefixed routes
β β βββ layout.tsx # Dashboard layout with sidebar
β β βββ (auth)/ # Authentication pages
β β β βββ login/ # Login page
β β βββ (dashboard)/ # Protected dashboard routes
β β β βββ page.tsx # Home dashboard
β β β βββ accommodation/ # Student accommodation
β β β βββ admin/ # Admin panel
β β β β βββ accommodation/# Accommodation admin
β β β β βββ certificates/ # Certificate admin
β β β β βββ users/ # User management
β β β βββ appointments/ # Exam appointments
β β β βββ certificates/ # Certificate requests
β β β βββ enrollment/ # Course enrollment
β β β βββ messages/ # Messaging system
β β β βββ profile/ # User profile
β β β βββ schedule/ # Class schedule
β β β βββ studies/ # My courses & grades
β β β βββ teaching/ # Teacher portal
β β β β βββ offering/ # Course offerings
β β β β βββ thesis/ # Thesis management
β β β βββ terms/ # Exam terms
β β β βββ thesis/ # Student thesis
β βββ api/ # API routes
β βββ thesis/ # Thesis API endpoints
βββ components/ # React components
β βββ ui/ # Shadcn/ui components
β βββ layout/ # Layout components
β βββ data/ # Data display components
β βββ form/ # Form components
βββ hooks/ # Custom React hooks
βββ lib/ # Utility libraries
β βββ auth/ # Authentication utilities
β βββ i18n/ # Internationalization
β β βββ dictionaries/ # Translation files (en.json, sk.json)
β βββ pdf/ # PDF generation
β βββ supabase/ # Supabase clients
β βββ validators/ # Zod schemas
βββ types/ # TypeScript type definitions
β βββ db.ts # Database types
βββ public/ # Static assets
βββ middleware.ts # i18n routing middleware
βββ components.json # Shadcn/ui configuration
βββ next.config.ts # Next.js configuration
βββ tsconfig.json # TypeScript configuration
Before you begin, ensure you have the following installed:
| Requirement | Version | Download |
|---|---|---|
| Node.js | v18.0.0+ | nodejs.org |
| pnpm | v8.0.0+ | npm install -g pnpm |
| Git | Latest | git-scm.com |
| Resource | Minimum | Recommended |
|---|---|---|
| RAM | 4GB | 8GB |
| Disk | 500MB | 1GB |
| OS | Windows 10+, macOS 10.15+, Linux | Any |
git clone <repository-url>
cd mais-clonepnpm installCreate a .env.local file in the project root:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-keyThe .env.local file should contain:
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL | β |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anonymous key | β |
Note: Environment variables will be provided separately. The database uses Row Level Security (RLS) policies for all tables to ensure proper access control.
pnpm devThe application will be available at: http://localhost:3000
Uses Turbopack for fast refresh
The system supports three main user roles with distinct permissions:
Students have access to academic features focused on their studies:
| Permission | Description |
|---|---|
| View Dashboard | Access main dashboard with quick stats |
| Enroll in Courses | Browse and enroll in open offerings |
| Manage Schedule | Register for class sections, view timetable |
| View Grades | See component grades and final grades |
| Access Materials | Download course materials |
| Exam Registration | Register/unregister for exam terms |
| Thesis Work | Browse topics, request assignment, submit milestones |
| Accommodation | Apply for housing, track status, view payments |
| Certificates | Request study confirmations |
| Messages | Send/receive messages with attachments |
| Profile | Update personal information and avatar |
Teachers manage courses and supervise student work:
| Permission | Description |
|---|---|
| All Student Permissions | Teachers retain student-level access |
| Create Offerings | Create course offerings for semesters |
| Manage Sections | Create sections with meetings (day, time, room, type) |
| Edit Meetings | Modify meeting details with collision detection |
| Delete Sections/Meetings | Remove sections or individual meetings (with confirmation dialog) |
| Create Thesis Topics | Define thesis topics with capacity |
| Publish/Unpublish Topics | Control topic visibility |
| Review Requests | Approve/reject student thesis requests |
| Supervise Theses | View progress, create milestones, review submissions |
| Provide Feedback | Accept or request changes on submissions |
Administrators have full system access:
| Permission | Description |
|---|---|
| All Permissions | Full access to all features |
| User Management | View all users, assign/remove roles |
| Accommodation Admin | Review applications, manage payments |
| Certificate Admin | Fulfill official certificate requests |
| System Statistics | View system-wide analytics |
| Route | Description |
|---|---|
/ |
Redirects to /en or /sk based on preference |
/en/login |
English login page |
/sk/login |
Slovak login page |
| Route | Access | Description |
|---|---|---|
/en or /sk |
All | Dashboard home with stats overview |
/en/enrollment |
Student | Browse and enroll in courses |
/en/studies |
Student | View enrolled courses and grades |
/en/studies/[offeringId] |
Student | Course detail with materials and grades |
/en/schedule |
Student | Weekly/list view timetable with row-spanning meetings |
/en/appointments |
Student | Exam term registration |
/en/terms |
Student | Alternative exam terms view |
/en/thesis |
Student | Thesis dashboard (redirects to topics if no thesis) |
/en/thesis/topics |
Student | Browse available thesis topics |
/en/thesis/[thesisId] |
Student | Thesis detail with milestones, settings, file uploads |
/en/accommodation |
Student | Accommodation application with academic year selector |
/en/certificates |
Student | Request study/accommodation certificates |
/en/messages |
Student | Inbox with compose, attachments, image preview |
/en/profile |
All | Edit profile and avatar |
| Route | Access | Description |
|---|---|---|
/en/teaching |
Teacher | Teacher dashboard with course offerings list |
/en/teaching/offering/new |
Teacher | Create new course offering |
/en/teaching/offering/[id] |
Teacher | Manage sections and meetings for an offering |
/en/teaching/thesis |
Teacher | Thesis management dashboard with stats |
/en/teaching/thesis/topics |
Teacher | Create, edit, publish/unpublish thesis topics |
/en/teaching/thesis/requests |
Teacher | Review and approve/reject student requests |
/en/teaching/thesis/supervise |
Teacher | List of supervised theses with progress |
/en/teaching/thesis/[thesisId] |
Teacher | Supervise specific thesis, manage milestones, review submissions |
| Route | Access | Description |
|---|---|---|
/en/admin |
Admin | Admin dashboard with system statistics |
/en/admin/users |
Admin | User role management table |
/en/admin/accommodation/applications |
Admin | Review accommodation applications with filters |
/en/admin/accommodation/payments |
Admin | Manage accommodation payments |
/en/admin/certificates/requests |
Admin | Fulfill certificate requests |
The following demo accounts are pre-configured and ready to use:
| Role | Password | |
|---|---|---|
| π Student | [email protected] |
student123 |
| π¨βπ« Teacher | [email protected] |
teacher123 |
| π Admin | [email protected] |
admin123 |
Tip: These credentials are also displayed on the login page for quick access.
- Login β Go to
/en/login, enter student credentials - Enrollment β Navigate to
/en/enrollment, enroll in a course - Schedule β Go to
/en/schedule, register for a section - Studies β Check
/en/studiesto see enrolled courses - Course Detail β Click a course to view materials and grades
- Exam Registration β Go to
/en/appointments, register for an exam - Thesis β Navigate to
/en/thesis/topics, request a topic - Accommodation β Go to
/en/accommodation, submit an application - Certificates β Request a certificate at
/en/certificates - Messages β Send a test message at
/en/messages
- Login β Use teacher credentials
- Teaching Dashboard β Go to
/en/teaching - Create Offering β Click "New Offering", fill in details
- Manage Sections β Click an offering, add sections
- Add Meetings β Add meetings with day, time, room, type (Lecture/Lab/Exercise/Seminar)
- Edit Meeting β Click pencil icon to edit a meeting
- Delete Meeting β Click trash icon with AlertDialog confirmation
- Thesis Topics β Go to
/en/teaching/thesis/topics, create a topic - Publish Topic β Toggle the publish status
- Review Requests β Check
/en/teaching/thesis/requests - Supervise β Go to
/en/teaching/thesis/supervise, click a thesis - Add Milestone β Create milestones for the thesis
- Review Submission β Accept or request changes
- Login β Use admin credentials
- Admin Dashboard β Go to
/en/admin - User Management β Navigate to
/en/admin/users - Assign Roles β Add/remove roles for users
- Accommodation β Go to
/en/admin/accommodation/applications - Review Application β Change status, add notes
- Payments β Go to
/en/admin/accommodation/payments - Add Payment β Create a payment record
- Certificates β Go to
/en/admin/certificates/requests - Fulfill Request β Mark as fulfilled with file
- Week view displays meetings correctly
- Meetings spanning multiple hours show with rowSpan
- Meeting names (Lecture, Lab, etc.) are displayed
- List view shows all meetings
- Available sections show unregistered options
- Can register for a section
- Can unregister from a section
- Can create a new offering
- Can add sections to offering
- Can add meetings to sections with name/type
- Can edit meetings (room, time, name)
- Collision detection works (room/time conflicts show error)
- AlertDialog shows for delete confirmation
- Can delete meetings and sections
- Can browse available topics
- Can request topic assignment
- Teacher can approve/reject requests
- Student can view assigned thesis
- Student can submit milestones with files
- Teacher can create milestones
- Teacher can review submissions (accept/request changes)
- Can compose new message
- Can add recipients
- Can attach files (images and documents)
- Image attachments preview correctly (hover to enlarge)
- Sender can see their own attachments
- Can download attachments
- Unread indicator works
- Can archive messages
The application supports English and Slovak languages.
- Click the language toggle in the header
- Select "English" or "SlovenΔina"
- The URL updates to reflect the locale (
/en/...or/sk/...)
# Check your environment variables
cat .env.local
# Ensure URL and key are correct
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbG...# macOS/Linux
lsof -ti:3000 | xargs kill -9
# Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /F# Clear node_modules and reinstall
rm -rf node_modules pnpm-lock.yaml
pnpm installThis usually happens with client-side date formatting. Ensure dates are formatted consistently:
// Use suppressHydrationWarning for dynamic content
<time suppressHydrationWarning>
{new Date(date).toLocaleDateString()}
</time>This is likely due to Row Level Security (RLS) policies. Make sure you are:
- Logged in with valid credentials
- Using an account with the appropriate role for the feature
- The database has RLS policies configured for all tables
Made with β€οΈ by Matej Bendik for TUKE students and faculty