Workopia is a job board web application built from the ground up using Vanilla PHP. It provides a structured, Laravel-like architecture while maintaining a lightweight and efficient codebase. The platform allows users to browse job listings, apply for positions, and employers to post and manage job openings.
- User Authentication: Secure registration, login, and logout functionality.
- CRUD Operations: Create, Read, Update, and Delete job listings.
- Validation: Server-side validation for user inputs.
- Database Integration: Uses MySQL for data storage and retrieval.
- Search Functionality: Users can search for jobs using keywords.
- Secure Sessions: Protects against session hijacking and unauthorized access.
- Tailwind CSS: Modern styling with utility-first CSS framework.
- PHP (Vanilla, no frameworks)
- MySQL (Database storage and interactions)
- Tailwind CSS (For styling and responsiveness)
- Composer (Dependency management)
-
Clone the repository:
git clone https://github.com/yourusername/workopia.git cd workopia -
Install dependencies:
composer install
-
Configure the database:
- Import the
database.sqlfile into MySQL. - Update
config/db.phpwith your database credentials.
- Import the
-
Start a local PHP server:
php -S localhost:8000 -t public
-
Open
http://localhost:8000in your browser.
.gitignore
App/
App/controllers/
ErrorController.php
HomeController.php
ListingController.php
UserController.php
App/views/
error.view.php
App/views/errors/
403.view.php
404.view.php
home.view.php
App/views/listings/
create.view.php
edit.view.php
index.view.php
show.view.php
App/views/partials/
bottom-banner.php
errors.php
footer.php
head.php
message.php
navbar.php
showcase-search.php
top-banner.php
App/views/users/
create.view.php
login.view.php
Framework/
Authorization.php
Database.php
Router.php
Session.php
Validation.php
Framework/middleware/
Authorize.php
composer.json
composer.lock
config/
db.php
helpers.php
public/
public/css/
style.css
public/images/
showcase.jpg
index.php
routes.php
vendor/
autoload.php
vendor/composer/
ClassLoader.php
InstalledVersions.php
LICENSE
autoload_classmap.php
autoload_namespaces.php
autoload_psr4.php
autoload_real.php
autoload_static.php
installed.json
installed.php
CREATE TABLE `users` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`city` varchar(45) DEFAULT NULL,
`state` varchar(45) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `listings` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`title` varchar(255) NOT NULL,
`description` text,
`salary` varchar(45) DEFAULT NULL,
`tags` varchar(255) DEFAULT NULL,
`company` varchar(45) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`city` varchar(45) DEFAULT NULL,
`state` varchar(45) DEFAULT NULL,
`phone` varchar(45) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
`requirements` longtext,
`benefits` longtext,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `fk_listings_users_idx` (`user_id`),
CONSTRAINT `fk_listings_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;- Password Hashing: Uses
password_hash()for secure password storage. - Prepared Statements: Prevents SQL Injection in database queries.
- Session Handling: Ensures proper user authentication and logout.
- Admin Panel for managing job postings and users.
- Email Notifications for job applications.
- File Uploads for resumes.
This project is open-source and available under the MIT License.