A Django-powered records and management system for the Philippine Leadership Development Program β
tracking partner schools, scholars, awardees, principals, activities, and professionals.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β LDP Portal π Admin User βΎ β
ββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β Dashboard β
β π Dash β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββ β
β π« Schoolsβ β π« Schoolsβ β π₯ People β β π
Eventsβ βπAwardsβ β
β π₯ People β β 24 β β 312 β β 18 β β 47 β β
β π
Events β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββ β
β π Awards β β
β β Settingsβ Recent Activities Pending Approvals β
β β βββββββββββββββββββββββββ ββββββββββββββββββββββββ β
β β βΊ Leadership Summit 2025 βΊ Profile change (J. Cruz) β
β β βΊ Science Congress βΊ Activity request (Annex) β
ββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β San Pedro National High School β
β βββββββββββββββββββββββββββ Hero Banner ββββββββββββββββββββββββββββ
β β π« Logo San Pedro NHS β
Active π Laguna, Region IV-A ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ββββββββ ββββββββ ββββββββ ββββββββ ββββββββ β
β β 12 β β 48 β β 6 β β 3 β β π 5 β β
β βPeopleβ βEventsβ βAwardsβ βAlumniβ βAwardeeβ β
β ββββββββ ββββββββ ββββββββ ββββββββ ββββββββ β
β β
β π Leadership Awardees β π₯ Members β
β ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ β
β β β Juan Dela Cruz 2024 ββ β Maria Santos Scholar β β
β β β Ana Reyes 2023 ββ β Jose Rizal Student β β
β ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Module | Capabilities |
|---|---|
| π« Partner Schools | School profiles with logo, banner, type (Kβ12/College/Tech-Voc), location, region/province filtering, active status |
| π₯ People Records | Students, Scholars, College members, Professionals, Principals β with profile photos and academic details |
| π Activities & Events | Trainings, seminars, conferences β with enrollment tracking and principal-level approval workflow |
| π Leadership Awards | Multi-level awards (School β National), awarding body, certificates, per-school filtering |
| π Change Management | Proposed profile edits held for admin approval before going live |
| π Reports & Exports | Excel exports via openpyxl, access-scoped data views |
| π Role-based Access | Granular permissions per role across every module |
| Action | Admin | Encoder | Principal | Scholar / Student | Viewer |
|---|---|---|---|---|---|
| Manage all schools | β | β | β | β | π |
| Manage own school | β | β | β | β | π |
| Create activities | β | β | β | β | β |
| Approve activities | β | β | β | β | β |
| Record awards | β | β | β | β | π |
| Approve profile changes | β | β | β | β | β |
| View own school's data | β | β | β | β | β |
| Export reports | β | β | β | β | β |
π = read-only access
erDiagram
USER {
string username
string role
bool must_change_password
}
SCHOOL {
string name
string school_type
string region
string province
bool is_active
}
PERSON {
string type
string student_id
string year_level
string course_program
bool is_pending_approval
}
ACTIVITY {
string name
date date
bool is_approved
}
LEADERSHIP_AWARD {
string award_title
string award_level
string year_awarded
string awarding_body
}
SCHOOL_PRINCIPAL_HISTORY {
string principal_name
date assigned_at
date removed_at
}
USER ||--o| PERSON : "has profile"
USER ||--o{ SCHOOL : "manages (principal)"
SCHOOL ||--o{ PERSON : "has members"
SCHOOL ||--o{ ACTIVITY : "hosts"
SCHOOL ||--o{ LEADERSHIP_AWARD : "associated with"
SCHOOL ||--o{ SCHOOL_PRINCIPAL_HISTORY : "tracks"
PERSON ||--o{ LEADERSHIP_AWARD : "receives"
PERSON }o--o{ ACTIVITY : "participates in"
flowchart TD
A([User Login]) --> B{Role?}
B -->|Admin / Encoder| C[Full Dashboard]
B -->|Principal| D[School Dashboard]
B -->|Scholar / Student| E[Personal Profile]
B -->|Viewer| F[Read-only Views]
C --> G[Manage Schools]
C --> H[Manage People]
C --> I[Approve Changes]
C --> J[Export Reports]
D --> K[View Own School]
D --> L[Create Activities]
D --> M[Approve Activities]
D --> N[Record Awards]
E --> O[View Own School]
E --> P[View Activities]
E --> Q[View Awardees]
E --> R[Request Profile Change]
R --> S{Admin Review}
S -->|Approve| T[Profile Updated]
S -->|Reject| U[Change Discarded]
| Layer | Technology |
|---|---|
| Backend | Python 3.11 Β· Django 4.2 Β· Django REST Framework 3.14 |
| Frontend | Tailwind CSS v3 (CDN) Β· Font Awesome 6 Free |
| Database | SQLite (dev) Β· PostgreSQL via psycopg2 (prod) |
| Server | Gunicorn (WSGI) Β· WhiteNoise (static files) |
| Storage | Pillow (images) Β· Azure Blob Storage (prod media) |
| Exports | openpyxl (Excel reports) |
| Config | django-environ (.env based settings) |
| Container | Docker Β· Docker Compose |
| Deployment | Azure App Service / Azure Web App |
1. Clone and start containers (Windows PowerShell)
git clone https://github.com/lloydismael/LDP.git
cd LDP
./start.ps1The application exclusively uses 127.0.0.1:8001. The startup script stops
with the owning process details if port 8001 is already occupied. Docker's
socket binding is the final exclusive reservation; a Windows excluded-port
range is intentionally not used because it would also block this application.
To run Django directly from the virtual environment, use
python manage.py runserver. The project automatically binds it to
127.0.0.1:8001 and rejects alternate ports or non-local interfaces.
2. Apply migrations and create a superuser (in a second terminal)
docker-compose exec web python manage.py makemigrations
docker-compose exec web python manage.py migrate
docker-compose exec web python manage.py createsuperuser3. (Optional) Seed demo data
docker-compose exec web python manage.py seed_data4. Open the app
| URL | Description |
|---|---|
http://127.0.0.1:8001/ |
Main portal |
http://127.0.0.1:8001/dashboard/ |
App dashboard |
http://127.0.0.1:8001/admin/ |
Django admin panel |
/dashboard/ β Overview stats
/schools/ β Partner schools list
/schools/<id>/ β School detail (stats, members, awards)
/people/ β Members directory
/people/<id>/ β Individual profile + Quick Actions
/activities/ β Events & trainings
/activities/<id>/ β Activity detail
/awards/ β Leadership awardees (school-scoped)
/change-management/ β Pending profile approval queue
/profile/ β My profile settings
/change-password/ β Password change
/admin/ β Django admin (superuser only)
Required environment variables (App Service β Configuration β Application Settings):
| Variable | Description |
|---|---|
SECRET_KEY |
Django secret key |
DJANGO_ALLOWED_HOSTS |
Comma-separated hostnames |
DATABASE_URL |
PostgreSQL connection string |
AZURE_ACCOUNT_NAME |
Azure Storage account name |
AZURE_ACCOUNT_KEY |
Azure Storage account key |
AZURE_MEDIA_CONTAINER |
Blob container for media files |
DEBUG |
Set to False in production |
Deployment steps:
# Build image and push to registry
docker build -t ldp-portal .
# Or deploy directly via Azure CLI
az webapp up --name ldp-portal --resource-group <rg> --runtime "PYTHON|3.11"Static files are served by WhiteNoise. Media files in production should use Azure Blob Storage via django-storages.
GRF/
βββ config/ # Django settings, URLs, WSGI
βββ ldp_core/ # Main application
β βββ models.py # User, School, Person, Activity, Award
β βββ views.py # Class-based & function views
β βββ urls.py # URL routing
β βββ forms.py # ModelForms
β βββ admin.py # Django admin registrations
β βββ management/ # Custom management commands (seed_data)
βββ templates/
β βββ ldp_core/ # All HTML templates
β βββ base_app.html # Base layout (sidebar, topbar)
β βββ dashboard.html
β βββ school_detail.html
β βββ person_detail.html
β βββ activity_list.html
β βββ award_list.html
β βββ ...
βββ media/ # Uploaded files (dev only)
βββ Dockerfile
βββ docker-compose.yml
βββ requirements.txt
| Token | Value | Usage |
|---|---|---|
primary |
#4F46E5 (Indigo) |
Buttons, active states, links |
secondary |
#10B981 (Emerald) |
Success badges, active pills |
navy |
#1E293B |
Sidebar background |
lightbg |
#F8FAFC |
Page backgrounds |
.glass-card |
White bg + shadow + rounded-2xl | All content cards |
| Bouncy spring | cubic-bezier(0.34, 1.56, 0.64, 1) |
Sidebar links, stat cards |
Built for the Philippine Leadership Development Program Β· Powered by Django & Docker