ThreadIT is a discussion forum web application built with plain PHP to demonstrate a self-written MVC architecture. Users can register, log in, create threads, write comments, vote on content, search the site, and manage their profile.
This project is a compact example of a custom MVC structure without a framework. The application is split into clear layers so that each part has a specific responsibility:
- The entry point in code/index.php receives the request and routes it to the correct controller.
- Controllers in code/controller handle user input, enforce basic validation, and decide which action to perform.
- Models in code/model contain the database access logic and business rules for users, threads, comments, and votes.
- Views in code/view and assets in code/resources handle the presentation layer and frontend behavior.
This separation makes the project easier to follow and extend while still staying lightweight and educational.
- User registration, login, logout, and profile management
- Creating, viewing, and deleting discussion threads
- Adding comments and voting on threads/comments
- Search functionality for threads and users
- AJAX-based interactions for comments and voting
- PHP for routing, controllers, and server-side logic
- MySQL with PDO for data storage
- HTML, CSS, and JavaScript for the frontend
- Session-based authentication
The application was tested locally with XAMPP. To run it locally:
- Move the folder named "code" into XAMPP's web root directory (htdocs).
- Import the database files into PhpMyAdmin or an equivalent tool:
- Combined database dump: db.sql
- Schema: code/sql/Threadit.sql
- Demo data: code/sql/demoData.sql
- Start Apache and MySQL, then open the application in your browser through the web root containing code/index.php.
All demo users use the same password: "Test123!"
Available usernames:
- tech_guru
- code_newbie
- alice_dev
- bob_coder
- database_boss
- charlie_brown
- web_weaver
- shadow_coder
- pixel_perfect
- stack_master
This project is intended as a practical example of a self-written MVC structure in PHP, focused on clarity, separation of concerns, and straightforward implementation.