How mhnobakht/github-view-counter-project works
This PHP application provides user registration and login, then lets authenticated users create and view tracked links; visiting a link’s UUID increments its view count and returns a PNG counter badge. The principal flow runs from login through the protected dashboard to link management and tracking. Database.php centralizes MySQL access. The README is empty, and unsampled dashboard routing and page handlers limit certainty about some connections; the graph shows only relationships supported by excerpts or the source index.
Main entry points: Link.php Link operations · Database.php MySQL access · Login.php Authenticate users · dashboard.php Protected dashboard
Components 13
Account access
- Registration form
register.php - Register users
Classes/Register.php - Login form
login.php - Authenticate users
Classes/Login.php - Auth token library
Link tracking
- Link listing
pages/Default.php - Create link form
pages/New.php - Link operations
Classes/Link.php - View badge endpoint
show.php
Dashboard runtime
- Protected dashboard
dashboard.php - MySQL access
Classes/Database.php
Other components
- Browser user
- MySQL server
Connections 15
- Browser user → Registration form: submits registration
register.php - Registration form → Register users: creates user
register.php - Browser user → Login form: submits credentials
login.php - Login form → Authenticate users: invokes login
login.php - Authenticate users → MySQL access: checks credentials
Classes/Login.php - Authenticate users → Auth token library: generates token
Classes/Login.php - Protected dashboard → Auth token library: checks or deletes token
dashboard.php - Protected dashboard → Link listing: references page
dashboard.php - Link listing → Link operations: loads links
pages/Default.php - Create link form → Link operations: creates link
pages/New.php - Link operations → MySQL access: reads and writes
Classes/Link.php - Register users → MySQL access: inserts user
Classes/Register.php - Browser user → View badge endpoint: requests UUID badge
show.php - View badge endpoint → Link operations: increments counter
show.php - MySQL access → MySQL server: connects via PDO
Classes/Database.php