# eizzielmariebacoy/abisurepo architecture

> Architecture diagram of the GitHub repository eizzielmariebacoy/abisurepo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eizzielmariebacoy/abisurepo
- Repository: https://github.com/eizzielmariebacoy/abisurepo

## Overview

AbiSU is a web app for signing in and composing school advisories or class-suspension notices, then sending them by SMS to all students or a selected year. The main flow is account access, notice composition and confirmation, recipient lookup, provider delivery, and message-history display. The sampled code shows authentication and SMS persistence using MySQL, plus CloudSMS delivery. README provides no additional capability details; the standalone notice-saving endpoint and separate history connection helper have no demonstrated caller, so their wiring is left unspecified.

Main entry points: [`api.php`](https://github.com/eizzielmariebacoy/abisurepo/blob/main/api.php) (SMS API), [`index.php`](https://github.com/eizzielmariebacoy/abisurepo/blob/main/index.php) (Login and signup page), [`connect.php`](https://github.com/eizzielmariebacoy/abisurepo/blob/main/connect.php) (Database connection), [`login.php`](https://github.com/eizzielmariebacoy/abisurepo/blob/main/login.php) (Sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Account access"]
  node_entry["Login and signup page<br/>[index.php]"]
  node_signup["Account registration<br/>[signup.php]"]
  node_login["Sign-in<br/>[login.php]"]
  node_session["Session exit<br/>[logout.php]"]
end

subgraph group_compose["Notice composition"]
  node_dashboard["Dashboard and composer UI<br/>[homepage.php]"]
  node_composer["Advisory builder and validation<br/>[homepage.js]"]
end

subgraph group_delivery["SMS delivery"]
  node_smsapi["SMS API<br/>[api.php]"]
  node_cloudsms["CloudSMS"]
end

subgraph group_records["History and storage"]
  node_dbhelper["Database connection<br/>[connect.php]"]
  node_studentdb[("Student and history database")]
  node_settings["Message history view<br/>[settings.php]"]
  node_notice_save["Notice save endpoint<br/>[save_notice.php]"]
  node_history_helper["Separate history DB connection<br/>[history.php]"]
end

node_user(("User"))

node_user -->|"opens"| node_entry
node_entry -->|"submits registration"| node_signup
node_entry -->|"submits credentials"| node_login
node_signup -->|"queries and inserts"| node_dbhelper
node_login -->|"checks credentials"| node_dbhelper
node_login -->|"redirects after sign-in"| node_dashboard
node_dashboard -->|"loads user"| node_dbhelper
node_dashboard -->|"loads script"| node_composer
node_user -->|"composes notice"| node_composer
node_composer -->|"posts confirmed message"| node_smsapi
node_smsapi -->|"reads recipients"| node_studentdb
node_smsapi -->|"sends SMS"| node_cloudsms
node_smsapi -->|"writes message history"| node_studentdb
node_settings -->|"queries history"| node_dbhelper
node_user -->|"views history"| node_settings
node_settings -->|"submits sign-out"| node_session
node_session -->|"redirects"| node_entry

click node_entry "https://github.com/eizzielmariebacoy/abisurepo/blob/main/index.php"
click node_signup "https://github.com/eizzielmariebacoy/abisurepo/blob/main/signup.php"
click node_login "https://github.com/eizzielmariebacoy/abisurepo/blob/main/login.php"
click node_session "https://github.com/eizzielmariebacoy/abisurepo/blob/main/logout.php"
click node_dbhelper "https://github.com/eizzielmariebacoy/abisurepo/blob/main/connect.php"
click node_dashboard "https://github.com/eizzielmariebacoy/abisurepo/blob/main/homepage.php"
click node_composer "https://github.com/eizzielmariebacoy/abisurepo/blob/main/homepage.js"
click node_smsapi "https://github.com/eizzielmariebacoy/abisurepo/blob/main/api.php"
click node_settings "https://github.com/eizzielmariebacoy/abisurepo/blob/main/settings.php"
click node_notice_save "https://github.com/eizzielmariebacoy/abisurepo/blob/main/save_notice.php"
click node_history_helper "https://github.com/eizzielmariebacoy/abisurepo/blob/main/history.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_signup,node_login,node_session,node_user toneBlue
class node_dashboard,node_composer toneAmber
class node_smsapi,node_cloudsms toneMint
class node_dbhelper,node_studentdb,node_settings,node_notice_save,node_history_helper toneRose
```

## Components

### Account access

- [Login and signup page](https://github.com/eizzielmariebacoy/abisurepo/blob/main/index.php): `index.php`
- [Account registration](https://github.com/eizzielmariebacoy/abisurepo/blob/main/signup.php): `signup.php`
- [Sign-in](https://github.com/eizzielmariebacoy/abisurepo/blob/main/login.php): `login.php`
- [Session exit](https://github.com/eizzielmariebacoy/abisurepo/blob/main/logout.php): `logout.php`

### Notice composition

- [Dashboard and composer UI](https://github.com/eizzielmariebacoy/abisurepo/blob/main/homepage.php): `homepage.php`
- [Advisory builder and validation](https://github.com/eizzielmariebacoy/abisurepo/blob/main/homepage.js): `homepage.js`

### SMS delivery

- [SMS API](https://github.com/eizzielmariebacoy/abisurepo/blob/main/api.php): `api.php`
- **CloudSMS**

### History and storage

- [Database connection](https://github.com/eizzielmariebacoy/abisurepo/blob/main/connect.php): `connect.php`
- **Student and history database**
- [Message history view](https://github.com/eizzielmariebacoy/abisurepo/blob/main/settings.php): `settings.php`
- [Notice save endpoint](https://github.com/eizzielmariebacoy/abisurepo/blob/main/save_notice.php): `save_notice.php`
- [Separate history DB connection](https://github.com/eizzielmariebacoy/abisurepo/blob/main/history.php): `history.php`

### Other components

- **User**

## Connections

- User → Login and signup page: opens (evidence: `index.php`)
- Login and signup page → Account registration: submits registration (evidence: `index.php`)
- Login and signup page → Sign-in: submits credentials (evidence: `index.php`)
- Account registration → Database connection: queries and inserts (evidence: `signup.php`)
- Sign-in → Database connection: checks credentials (evidence: `login.php`)
- Sign-in → Dashboard and composer UI: redirects after sign-in (evidence: `login.php`)
- Dashboard and composer UI → Database connection: loads user (evidence: `homepage.php`)
- Dashboard and composer UI → Advisory builder and validation: loads script (evidence: `homepage.php`)
- User → Advisory builder and validation: composes notice (evidence: `homepage.js`)
- Advisory builder and validation → SMS API: posts confirmed message (evidence: `homepage.js`)
- SMS API → Student and history database: reads recipients (evidence: `api.php`)
- SMS API → CloudSMS: sends SMS (evidence: `api.php`)
- SMS API → Student and history database: writes message history (evidence: `api.php`)
- Message history view → Database connection: queries history (evidence: `settings.php`)
- User → Message history view: views history (evidence: `settings.php`)
- Message history view → Session exit: submits sign-out (evidence: `settings.php`)
- Session exit → Login and signup page: redirects (evidence: `logout.php`)
