How dineshrepostry/post-chat works
Purpose and Entry Points
POST-chat is a PHP/MySQL chat site for global room chat and one-to-one private chat. Apache serves the static/PHP pages; MySQL is initialized from postdb.sql. The public landing page is index.html; authentication begins at loginpage/loginpage.php, and account registration at createaccount/createaccount.html.
Authentication and Account Lifecycle
Account creation and login are handled by PHP endpoints under php/, backed by the shared database configuration in php/config.php. Core flows are registration through php/createacc.php, credential processing through php/login.php, and account/database validation through php/tablevalidate.php.
Global Chat Room
The primary global-chat UI is chat/chat.php, styled by chat/chat3.css. Its server-side chat data boundary is the root PHP API layer: message submission/storage uses php/insert.php and php/store.php, while retrieval uses php/get.php. This separates the rendered chat page from persistence operations.
Private Messaging
Private conversation functionality is served from privatechat/privatechat.php with presentation in privatechat/privatechat.css. It shares the application’s PHP/MySQL backend model but remains a distinct UI/control boundary from the global room in chat/chat.php.
Rooms and User-Managed State
Room assignment/creation is represented by roomassign/roomassign.php and php/createroom.php; deletion is handled by php/delete.php. User preferences include theme persistence via php/settheme.php. These endpoints form the mutable user/room state layer around the chat experience.
Feedback and Supporting Content
Feedback is collected through feedback/feedback.html, written via php/writefeed.php, and retrieved through php/getfeed.php. Documentation, policies, and static informational pages are independent content surfaces: documentation/documentation.html, policies/Policies.html, and post-documentation.pdf.
Separate End-Semester Scheduling Module
The repository also contains an instructor slot-management subsystem, separate from chat: endsem/instructor-slot.html, endsem/php/instructor-slot.php, and endsem/php/slot.php. It has its own connection configuration and schema artifacts in endsem/php/config.php and endsem/it5211.sql, indicating an independent scheduling database/domain boundary.
Runtime and Infrastructure
The application requires an Apache-compatible PHP runtime and MySQL. Main chat schema/data is imported from postdb.sql; the scheduling module provides endsem/it5211.sql. No client-side framework, build system, or external hosted service is represented; interaction is page/PHP-endpoint driven, with local assets including images/ and songs/.
Main entry points: postdb.sql Main chat database · loginpage.php Login and registration · createacc.php Registration endpoint · chat.php Global chat room
Components 18
Chat application
- Public landing page
index.html - Login and registration
loginpage/loginpage.php - Registration endpoint
php/createacc.php - Login endpoint
php/login.php - Account validation
php/tablevalidate.php - Global chat room
chat/chat.php - Message write APIs · Submission and storage endpoints.
php/insert.php - Message retrieval API
php/get.php - Private chat · Separate one-to-one conversation surface.
privatechat/privatechat.php - Room and user state APIs · Room creation, deletion, assignment, and theme persistence.
roomassign/roomassign.php - Feedback flow · Feedback is written and retrieved through PHP endpoints.
feedback/feedback.html - Documentation and policies
documentation/documentation.html
Scheduling module
- Instructor slot page
endsem/instructor-slot.html - Slot management service · Instructor and slot processing layer.
endsem/php/instructor-slot.php - Scheduling database · Independent scheduling schema.
endsem/it5211.sql - Scheduling DB config · Separate database connection configuration.
endsem/php/config.php
Runtime and data
- Apache + PHP runtime
- Main chat database · Initialized from the primary chat schema.
postdb.sql
Connections 19
- Apache + PHP runtime → Public landing page: serves
- Apache + PHP runtime → Login and registration: serves
- Apache + PHP runtime → Global chat room: serves
- Login and registration → Registration endpoint: registers via
- Login and registration → Login endpoint: authenticates via
- Registration endpoint → Account validation: validates
- Registration endpoint → Main chat database: creates account
- Login endpoint → Main chat database: checks credentials
- Global chat room → Message write APIs: submits messages
- Global chat room → Message retrieval API: loads messages
- Message write APIs → Main chat database: persists
- Message retrieval API → Main chat database: queries
- Private chat → Main chat database: uses shared backend data
- Room and user state APIs → Main chat database: updates rooms and preferences
- Feedback flow → Main chat database: stores feedback
- Apache + PHP runtime → Instructor slot page: serves
- Instructor slot page → Slot management service: manages slots
- Slot management service → Scheduling DB config: uses connection
- Slot management service → Scheduling database: reads and writes slots