Skip to content
lloydismaelPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

32 Commits

Folders and files

Repository files navigation

🏫 Leadership Development Program Portal

A Django-powered records and management system for the Philippine Leadership Development Program β€”
tracking partner schools, scholars, awardees, principals, activities, and professionals.

Python Django Docker Tailwind CSS Azure


πŸ“Έ UI Preview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  β–Œ 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   β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

✨ Features

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

πŸ” Role Permissions

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


πŸ—‚οΈ Data Model

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"
Loading

πŸ—οΈ Application Flow

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]
Loading

πŸ› οΈ Tech Stack

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

πŸš€ Local Development

Prerequisites

Setup

1. Clone and start containers (Windows PowerShell)

git clone https://github.com/lloydismael/LDP.git
cd LDP
./start.ps1

The 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 createsuperuser

3. (Optional) Seed demo data

docker-compose exec web python manage.py seed_data

4. 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

πŸ—ΊοΈ URL Structure

/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)

☁️ Azure Deployment

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.


πŸ“ Project Structure

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

🎨 Design System

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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages