Design - Ruchika06/Job_Posting GitHub Wiki
Design Document
Web Portal
The web portal uses PHP scripts hosted through the Apache HTTP server. It provides the following views to the users:
- Home Page: Displays all the posts created within the last 60 days. Also provides a feature to search for posts using keywords in title, creator's username, and creation date and the option to subscribe to the mailing service of the portal if logged in.
- Register/Login Pages: User registration/login pages for the users.
- Create Post and Edit post: Provides the feature to create a new post or edit one of the user's posts if the user is logged in.
- View Post: Displays a post. Also provides the feature to view and write comments on the post if the user is logged in. Also provides the feature to modify the post(requires admin approval) and delete comments on the post if the user is the creator of the post.
- Forgot password and Update password: Forgot password allows users to retrieve a code to rest their password while update password uses the existing password to update it.
- Profile page: Display features to create posts and update passwords. Also lists the posts that have been created by the user.
Apart from these features, admin(s) also has the following features:
- View the list of posts that have been modified by their creators and approve them by their choice.
- Delete posts and comments created by other users.
Database
MySQL has been used for implementing the database used in the web application. The following tables with the given schemas have been created:
users(stores information of all the registered users)
id | username | password | role | subscriber | created_at |
---|
posts(stores information of all the posts created by users)
id | user_id | title | description | contact | approved | created_at |
---|
comments(stores comments on the posts)
id | post_id | user_id | message | created_at |
---|
A Database.php class file has been created to define general functions for querying the database. Class files corresponding to each table in the database have also been created implementing the queries which are mostly related to the table corresponding to the class file.
Mailing Service
The mailing service has been implemented using the Sendmail MTA that needs to be configured on the machine on which the application is hosted. Currently, my local machine has been configured to use one of my personal E-mail for sending the emails on behalf of the application which will be changed once we get an email address within the IIT Mandi's domain. The mailer is used to notify the subscribers whenever a new post is created on the platform and to notify the admin(s) of the platform whenever a post is modified by its creator requires approval for becoming visible on the platform again.