Technical documentation of the Barangay e-Services Portal as delivered by the original developer. Use it to understand how the system is built before you test it. ### It describes how the system works, not where it is weak.

5.1 System Overview

  • Purpose: online portal for Barangay San Isidro residents to view their records, request barangay documents, read and post announcements, and upload requirements.
  • Users: Residents (view own profile, request documents, post, upload) and Admins (all resident features plus the resident records list).
  • Technology stack (table):

LayerTechnology
Web serverApache (XAMPP)
LanguagePHP 8 (procedural, no framework)
DatabaseMySQL / MariaDB via mysqli
SessionsPHP native sessions
Front endServer-rendered HTML + one CSS file

Diagram: System architecture

Interactive diagram
Loading diagram…

5.2 Site Map and Navigation

Diagram: Site map

Interactive diagram
Loading diagram…

Features by role

FeatureResidentAdmin
Log in / log outYesYes
DashboardYesYes
My RecordYes-
Resident Records list-Yes
Request a documentYesYes (sees all requests)
Message boardYesYes
Upload requirementsYesYes

5.3 Database

Diagram: Entity relationship diagram

Interactive diagram
Loading diagram…

Data dictionary

residents
ColumnTypeDescription
idINT, PK, auto-incrementResident ID
full_nameVARCHAR(100)Full name
addressVARCHAR(200)Purok and barangay
birthdateDATEDate of birth
contactVARCHAR(20)Mobile number
national_idVARCHAR(255)National ID number
users
ColumnTypeDescription
idINT, PK, auto-incrementUser ID
usernameVARCHAR(50), uniqueLogin name
passwordVARCHAR(255)Account password
roleENUM('admin','resident')Access level
resident_idINT, nullableLinked resident record (NULL for admin)
requests
ColumnTypeDescription
idINT, PK, auto-incrementRequest ID
user_idINTWho submitted it
doc_typeVARCHAR(50)Barangay Clearance, Certificate of Indigency, or Certificate of Residency
purposeVARCHAR(255)Purpose stated by the resident
statusVARCHAR(20)Pending by default
created_atTIMESTAMPDate submitted
posts
ColumnTypeDescription
idINT, PK, auto-incrementPost ID
user_idINTAuthor
messageTEXTPost content
created_atTIMESTAMPDate posted

5.4 Page Reference

PagePurposeUser inputTables used
index.phpLogin form; starts the sessionusername, password (POST)users
dashboard.phpWelcome page and menu by rolenoneresidents
record.phpShows one resident's profileid (URL)residents
residents.phpAdmin list of all residentsnoneresidents
request.phpSubmit and list document requestsdoc_type, purpose (POST)requests, users
board.phpPost and read community messagesmessage (POST)posts, users
upload.phpUpload and list requirement filesdocument (file upload)uploads/ folder
logout.phpEnds the sessionnonenone
setup.phpCreates and resets the database with sample datanoneall

5.5 File Structure

Plain text
barangay-portal/
├── index.php          Login
├── dashboard.php      Dashboard
├── record.php         Resident record
├── residents.php      Resident list (admin)
├── request.php        Document requests
├── board.php          Message board
├── upload.php         File uploads
├── logout.php         Logout
├── setup.php          Database setup / reset
├── config.php         Database connection settings
├── auth.php           Session start and login helpers
├── header.php         Shared page header and navigation
├── footer.php         Shared page footer
├── style.css          Stylesheet
├── uploads/           Uploaded files
└── README_STUDENTS.md Project instructions

5.6 Request Lifecycle

  1. The browser sends a request to Apache, e.g. GET /barangay-portal/record.php?id=1.
  2. Apache runs the PHP page.
  3. The page loads config.php (database connection) and auth.php (session).
  4. If the page needs a login and there is no session, the user is redirected to index.php.
  5. The page reads its input, queries MySQL, and builds the HTML response.
  6. header.php and footer.php wrap the page content.

tip: Compare what this documentation says the system should do with what it actually does when you try unexpected input. Differences are where flaws hide.

Next pageTools Guide
Batangas State University ARASOF-Nasugbu · College of Informatics and Computing Sciences · AY 2026–2027
Instructors: Engr. Engelbert P. Marcos, Mr. Oliver M. Hernandez