# Smart School – School Management System
## Complete Project Plan (Laravel 11)

Replica of CodeCanyon "Smart School" (v7.2.0) built with **Laravel 11**, **PHP 8.x**, **MySQL 8**.

---

## 1. Tech Stack
| Layer | Choice |
|---|---|
| Framework | Laravel 11 |
| PHP | 8.3 |
| Database | MySQL 8 |
| Auth | Laravel Breeze + Role-based middleware |
| UI | Blade + Bootstrap 5 + AdminLTE-style layout |
| Validation | Laravel Form Requests |
| File uploads | Laravel Storage (public + private) |
| Charts/Dashboard | Chart.js |
| Datatables | Simple server-side Blade tables |

---

## 2. User Roles (8 Panels)
1. **Super Admin** – everything, manage admins
2. **Admin** – all management modules
3. **Accountant** – fees collection, income/expense, fee reports
4. **Teacher** – own timetable, attendance, marks entry, progress reports
5. **Receptionist** – student admission, notice board, basic reports
6. **Librarian** – library books, members, issue/return
7. **Parent** – child profile, fees due, results, notices
8. **Student** – own profile, timetable, results, notices, downloads

**Note:** Laravel Breeze auth gives the generic User model. We extend `users` table with `role` + `role_id` and create a `roles` table for permissions.

---

## 3. Module List (Complete – no omissions)

### A. Core / System
1. Authentication (login/logout, register disabled)
2. Role-based access control (RBAC)
3. Profile management (change password, photo)
4. General Settings (school name, logo, address, session, currency)
5. Custom Fields (add custom fields to student/other forms)
6. Dashboard (role-specific widgets & charts)

### B. Student Management
7. Student Admission (40+ fields: personal, previous school, siblings, RTE, IDs, documents)
8. Student Search (multi-criteria)
9. Student Profile (360°: admission, personal, contact, fees, exam, documents)
10. Promote Student (next session, pass/fail/continue/leaving)
11. Student Categories (caste, skill, etc.)
12. Student CV generation
13. Student TC (Transfer Certificate) generation

### C. Academic Structure
14. Classes (CRUD)
15. Sections (CRUD)
16. Subjects (CRUD)
17. Teachers (staff records)
18. Assign Subject to Teacher/Class
19. Class Timetable

### D. Attendance
20. Attendance Entry (quick, class-section wise)
21. Attendance Report (monthly, class-section wise)

### E. Examinations
22. Exam Create (types: unit, term, final)
23. Exam Schedule
24. Marks Register / Marks Entry
25. Progress Report (with grades)
26. Grades Configuration

### F. Fees & Finance
27. Fee Types (CRUD)
28. Fee Groups (CRUD)
29. Fee Masters (fee structure per class)
30. Free-hand Fees
31. Due Dates & Fines
32. Discounts
33. Fee & Discount Allotment (5+ criteria: class, section, student, category, group)
34. Fee Collection Page (state-of-the-art: multiple receipts)
35. Fee Reports (statement, transactions, balance fees, collection)
36. Income & Expense (head-wise, receipt upload)

### G. Content & Communication
37. Download Center (syllabus, assignments, study material)
38. Library (books CRUD, members, issue/return)
39. Notice Board (send to students/parents/teachers)

### H. Infrastructure
40. Transport (vehicles/bus/van, routes, driver details)
41. Hostel (hostel rooms, room types)

### I. Reports
42. Student reports
43. Fee statement / transaction / balance fee reports
44. Attendance reports
45. Exam / result reports
46. Income-Expense reports

---

## 4. Database Schema (core tables)
```
roles, users, user_roles,
classes, sections, subjects, staff, assign_subjects, class_timetable,
students, student_categories, student_documents, student_siblings,
fees_types, fees_groups, fees_masters, fees_assign, discounts, discount_assign,
fees_payments, fees_installments, fees_receipts,
income_heads, expense_heads, incomes, expenses,
exams, exam_schedules, exam_marks, exam_grades, progress_reports,
attendances,
library_books, library_members, book_issues,
transport_vehicles, transport_routes, transport_assign,
hostel_rooms, room_types, hostel_assign,
notices, notice_users,
downloads, download_users,
custom_fields,
settings, sessions, school_sessions
```

---

## 5. Module ↔ Role Permissions Matrix
| Module | Super Admin | Admin | Accountant | Teacher | Receptionist | Librarian | Parent | Student |
|---|---|---|---|---|---|---|---|---|
| Students | ✓ | ✓ | view | view | ✓ | – | own child | own |
| Classes/Sections/Subjects | ✓ | ✓ | – | view | view | – | – | – |
| Timetable | ✓ | ✓ | – | own | view | – | view | view |
| Attendance | ✓ | ✓ | – | own class | ✓ | – | view own | view own |
| Exams | ✓ | ✓ | – | marks entry | – | – | view | view |
| Fees | ✓ | ✓ | ✓ | – | ✓ collect | – | view dues | view dues |
| Income/Expense | ✓ | ✓ | ✓ | – | – | – | – | – |
| Library | ✓ | ✓ | – | – | – | ✓ | view | view |
| Transport | ✓ | ✓ | – | – | view | – | view | view |
| Hostel | ✓ | ✓ | – | – | view | – | view | view |
| Notices | ✓ | ✓ | ✓ | view | ✓ | view | view | view |
| Downloads | ✓ | ✓ | – | ✓ | view | – | view | view |
| Settings/Custom Fields | ✓ | – | – | – | – | – | – | – |

---

## 6. Reports List
1. Student List (class/section/category wise)
2. Fee Statement (per student)
3. Transaction Report
4. Balance Fee Report
5. Fee Collection Summary
6. Attendance Monthly Report
7. Exam Result / Progress Report
8. Income-Expense Statement
9. Library Book Issue Report
10. Student Promote/Leaving List

---

## 7. Build Phases
- **Phase 1:** Setup + Auth + RBAC + Settings + Dashboard
- **Phase 2:** Academic structure (classes, sections, subjects, staff)
- **Phase 3:** Students (admission, search, profile, promote, categories, docs)
- **Phase 4:** Attendance
- **Phase 5:** Exams & marks
- **Phase 6:** Fees & finance
- **Phase 7:** Content (downloads, library, notices)
- **Phase 8:** Transport, Hostel
- **Phase 9:** Reports + CV/TC
- **Phase 10:** Polish, seeders, testing
