Skip to content

Latest commit

Β 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏫 Naet

A full-featured institutional management system built with Django, designed for Kenyan higher education institutions. πŸ‡°πŸ‡ͺ

Handles everything from student enrollment and academic session management to fee collection, timetabling, and role-based access control. A student's portal that doesn't make you want to drop out.

Built out of genuine frustration with Kenyan university portals β€” the kind that require a specific browser, a stable connection, and apparently a blood offering to load your fee balance.


✨ Features

πŸŽ“ Academic Management

  • πŸ›οΈ Multi-level institutional hierarchy β€” Institution β†’ School β†’ Department β†’ Programme β†’ Class
  • πŸ—“οΈ Academic session and semester management with automated rollover
  • πŸ“š Curriculum management with course enrollment (core, elective, and common units)
  • ⚑ Automatic enrollment of students into core courses on registration
  • πŸ• Timetable management with venue and lecturer clash detection
  • πŸ“ Exam scheduling with cross-programme clash detection

πŸ‘€ Student Management

  • πŸ“‹ Comprehensive student profiles (personal, family, emergency contacts, academic)
  • βœ… Student reporting per session (online and physical)
  • ⏸️ Deferral and graduation tracking
  • πŸͺŸ Proxy model views: Resident Students, Deferred Students, Graduated Students

πŸ’° Fee Management (under consideration to be moved to financial erp's)

  • 🧾 Per-class fee structures with itemised breakdowns (tuition, registration, hostel, etc.)
  • πŸ“Š Per-student fee accounts with real-time balance tracking
  • πŸ’³ Payment recording (M-Pesa, bank transfer, cash)
  • ⚠️ Overdraft detection and carry-forward to next session or refund flagging

πŸ” User & Access Management

  • πŸ‘₯ Custom user model with role-based access (Student, Staff, Admin)
  • πŸ›οΈ Role hierarchy: Institution Admin β†’ School Admin β†’ Dept Admin β†’ Lecturer β†’ Student
  • πŸ”’ Scoped Django admin β€” each role sees only the data within their jurisdiction
  • ⚑ Automatic group and permission assignment on user creation

πŸ“Š Results

  • πŸ“ CAT and exam result recording per student per course

πŸ™„ Oh great, another school management system

I know, I know.

But hear me out β€” my university portal was so bad it became a personality trait. Slow on a good day, broken on a bad one, and somehow requiring a specific browser, a stable connection, and the right phase of the moon just to check your fee balance.

I'm a CS student. I got bored. Here we are.

Built with curiosity, mild institutional frustration, and the audacity to think a student could just... build a better one.

β€” Bett πŸ‡°πŸ‡ͺ, 2026

wanna read me rumble more? β†’ why.md 🎀

πŸ› οΈ Tech Stack

Layer Technology
🐍 Backend Python, Django
πŸ§‘β€πŸ’» Frontend HTML,CSS,JS
πŸ—„οΈ Database PostgreSQL
πŸ” Auth Django AbstractBaseUser + custom UserManager
⚑ Automation Django signals for enrollment and session events

πŸ“ Project Structure

StudentsPortal/
β”œβ”€β”€ base/
β”‚   β”œβ”€β”€ models.py/        # All models
β”‚   β”œβ”€β”€ admin.py/         # Custom ModelAdmin classes
β”‚   β”œβ”€β”€ signals.py        # Signal receivers
β”‚   β”œβ”€β”€ managers.py       # Custom UserManager
β”‚   β”œβ”€β”€ forms.py/         # UserCreationForm, UserChangeForm
β”‚   β”œβ”€β”€ apps.py           # AppConfig with signals loader
β”‚   β”œβ”€β”€ fixtures/         # Seed data - depracted
β”‚   β”œβ”€β”€ templates/        # html templates for the site
β”‚   β”œβ”€β”€ static/           # static files
β”‚   β”œβ”€β”€ management/
β”‚   └── tests/
β”‚
β”œβ”€β”€ docs/                 # Full documentation
β”œβ”€β”€ user-upload/          # media folder for user uploaded files
β”œβ”€β”€ manage.py
└── requirements.txt

User                    Custom AbstractBaseUser (email login)
β”œβ”€β”€ Student             OneToOne β†’ User, academic + personal profile
β”œβ”€β”€ Lecturer            OneToOne β†’ User, department
β”œβ”€β”€ DeptAdmin           OneToOne β†’ User, department
β”œβ”€β”€ SchoolAdmin         OneToOne β†’ User, school
└── InstitutionAdmin    OneToOne β†’ User

School
└── Department
    └── Programme
        └── Tclass (Class)
            └── Curriculum (Tclass + Course + Session + Lecturer)

Session                 Academic year + semester, institution-wide
Reporting               Student check-in per session
FeeStructure            Per class per session fee breakdown
StudentFeeAccount       Per student ledger
Payment                 Individual transactions (M-Pesa, bank, cash)
OverDraft               Overpayment tracking with carry-forward/refund status
Results                 CAT and exam scores per student per course
Timetable               Class schedule with venue and lecturer conflict prevention

πŸš€ Setup

πŸ“‹ Requirements

  • Python 3.10+
  • PostgreSQL

πŸ“¦ Installation

git clone https://github.com/thelaughingbett/Naet.git
cd Naet

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

pip install -r requirements.txt

βš™οΈ Configuration

Copy the example env file and fill in your values:

cp .env.example .env
SECRET_KEY=your-secret-key
DEBUG=True
DATABASE_URL=postgres://user:password@localhost:5432/studentsportal

πŸ—„οΈ Database

python manage.py migrate
python manage.py createsuperuser
python manage.py loaddata base/fixtures/data.json  # optional seed data

▢️ Run

python manage.py runserver

πŸš€ Live Demo

β†’ Live Demo

β†’ Credentials

Demo data is non-persistent


πŸ” Admin Access

Navigate to /admin and log in with your superuser credentials.

Role-based access is enforced automatically:

Role Access
πŸ›οΈ Institution Admin Full access to everything
🏫 School Admin Own school's departments, students, lecturers
🏒 Dept Admin Own department's students and lecturers
πŸ‘¨β€πŸ« Lecturer View-only access to students

πŸ’‘ Key Design Decisions

  • πŸ”‘ UUID primary keys on all models for security and portability

  • πŸ—“οΈ Session is institution-wide β€” one active session at a time, referenced by all academic and financial records

  • πŸͺŸ Proxy models β€” DeferredStudent, ResidentStudent, and GraduatedStudent provide filtered admin views of the same student table without duplicating data

  • ⚑ Signal-driven enrollment β€” students are automatically enrolled in core and common unit courses when created


πŸ—ΊοΈ Roadmap

  • πŸ“… Attendance tracking (per timetable slot)
  • πŸ“ Exam scheduling and invigilation assignment
  • πŸ“± SMS notifications via Africa's Talking API
  • 🌐 REST API (Django REST Framework)
  • 🌾 IoT sensor integration for smart campus monitoring

Everything you need to understand how this system is built and why.

πŸ—ΊοΈ Where to Start

Document What's inside
πŸ—ΊοΈ System Overview High-level sketch of the whole system β€” read this first
πŸ—οΈ Architecture Big picture β€” how the layers fit together
πŸ—ƒοΈ Database Schema Every model and their relationships
πŸ“‹ Models Reference Field-by-field model breakdown
πŸ” Admin & Permissions Who can see and do what

πŸ“¦ Module Breakdown

Module Description
πŸ“§ Email Generation Automated email creation and delivery
🏒 ERP Enterprise resource planning integration
πŸ“… Events Event scheduling and management
πŸ“° News News publishing and feed management
πŸ”” Notifications Email and SMS delivery via pluggable backends
πŸ’³ Payments Payment processing and transaction logic
πŸ“Š Results Academic results and grade management
πŸ• Timetabling Schedule management and clash detection

πŸ‘¨β€πŸ’» Author

Built by Emmanuel Bett . πŸ‡°πŸ‡ͺ

GitHub Β·


πŸ“„ License

Apache 2.0

βš–οΈ Data Protection & Privacy

This system collects and processes sensitive personal data including national ID numbers, financial records, family information, and special category data (religion, ethnicity) under the Kenya Data Protection Act, 2019.

Any institution deploying this system must:

  • Register as a data controller with the ODPC at odpc.go.ke
  • Appoint a Data Protection Officer
  • Display a privacy notice at registration
  • Enable HTTPS β€” no exceptions

Full details in DATA_PROTECTION.md πŸ”

πŸ“œ Other Legal Obligations

Beyond data protection, institutions deploying this system have obligations under:

Law Relevance
Computer Misuse and Cybercrimes Act, 2018 Unauthorized access, credential security
Universities Act, 2012 (CUE) Academic records retention, CUE audit readiness
Kenya Revenue Authority 7-year financial record retention, fee receipting
HELB Semester enrollment verification exports
Persons with Disabilities Act Portal accessibility β€” WCAG 2.1 AA

Full details in LEGAL.md βš–οΈ

πŸ”„ ERP Integration

Generic, event-driven synchronisation of any model to any external ERP system.

Architecture

Something happens anywhere in the system
└── dispatch_erp_event(instance, event)
    └── transaction.on_commit β†’ erp_sync.delay()

Celery task
└── resolves instance from DB
└── looks up event in ERPRegistry
└── runs each registered handler independently
└── logs every attempt to ERPSyncLog

Retry schedule (exponential backoff, per handler)
β”œβ”€β”€ attempt 1 β†’ 60s
β”œβ”€β”€ attempt 2 β†’ 120s
β”œβ”€β”€ attempt 3 β†’ 240s
β”œβ”€β”€ attempt 4 β†’ 480s
└── attempt 5 β†’ exhausted β†’ notify admin

Event naming convention

model.action

payment.confirmed       enrollment.approved
payment.failed          deferment.created
reporting.submitted     result.published
student.graduated

Adding a new ERP system

Implement AbstractERPTask, register it β€” nothing else changes:

class MyTask(AbstractERPTask):
    event         = 'payment.confirmed'
    model         = 'Payment'
    max_retries   = 5
    retry_backoff = 120

    def sync(self, instance) -> ERPSyncResult:
        # instance is a Payment object
        ...

Dispatching from anywhere

from erp.dispatch import dispatch_erp_event

dispatch_erp_event(payment,    'payment.confirmed')
dispatch_erp_event(enrollment, 'enrollment.approved')
dispatch_erp_event(reporting,  'reporting.submitted')
dispatch_erp_event(deferment,  'deferment.created')

Full details β†’ docs/modules/erp/index.md

πŸ”— Performance & Technical Decisions

πŸ‡°πŸ‡ͺ Built for the Kenyan institutional context β€” by someone who suffered through the alternative

Is it finished? No. Is it better than what you're currently using? Almost certainly yes.

About

🏫 A full-featured institutional management system built with Django for Kenyan higher education. Handles role-based access, academic rollovers, automated enrollments, smart timetabling, and automated M-Pesa/fee ledgers. Built out of genuine frustration with broken university portals. πŸ‡°πŸ‡ͺ

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages