Summary Files Commits Branches @commit @diff @stats
NameSize
.gitignore1.6 KiBlog stats plain blame
LICENSE1.0 KiBlog stats plain blame
README.md5.5 KiBlog stats plain blame
TASK-DESCRIPTION.md2.9 KiBlog stats plain blame
configs49 Blog stats plain
db-export96 Blog stats plain
screenshots228 Blog stats plain
src170 Blog stats plain
tools90 Blog stats plain

devrix-job-board

The repository for my solution of DevriX's exam for their internship program.

It's an oversimplified job offer website, (roughly) following the MVC design pattern and using the LAMP stack (with MySQL). In src you can find the source code and in db-export you can find the export of a very small demo database.

CREDENTIALS FOR DASHBOARD

Username: admin
Password: admin
Screenshorts of site

Contents

Getting started

  1. As previously mentioned, the project uses the LAMP stack. Links on setting it up: Ubuntu 20.04, Debian 8 or CentOS 8.

  2. You'll need to update the source code with your MySQL credentials. In the file src/models/DB.php, on lines 6 to 9 you'll find the connection information. You'll need to change the values of $username and $password with your own. - If you're connecting to a remote database or have your database at a non-standart port, you'll also need to change $servername. Changing the value of $dbname is completely up to preference. - Don't worry if the database or tables don't exist, when the app starts it automatically create them.

  3. Currently this repo provides an Apache configuration file (configs/devrix-job-board.conf) with the localhost domain djb.local. - To use that domain, you'll also need to open your /etc/hosts file and add, on a new line, 127.0.0.1 djb.local. Beware, it will break any other localhost domains you've setup. - If you wanna use it in a server environment, update the values of ServerName and ServerAlias with your desired domain and subdomain.

  4. Finally, we'll need to move the source code to the /var/www/devrix-job-board/ folder. - This (and creating the folder if it doesn't exist) can be done automatically, just run with sudo the move-to-www.sh script: sudo ./tools/move-to-www.sh

Structure

This section serves as a mini-documentation of the overall project.

Back-end

For the back-end, it uses pure PHP, without any libraries what so ever. Database access is done with automatically generated queries (see DB.php) and URI routing is done, using the $_SERVER's request URI (see index.php, Line 44).

The database has two tables: companies and job_offers. Inside companies is stored the different company name. job_offers contains the actual job offers, where the company is referenced with a foreign key to the comapnies table.

Front-end

The front-end is a modified version of the given template. I took the CSS and the structure of the HTML files and applied it to my structure, trying to leave behind as little as possible.

There are also a few custom stylings I had to make, all located in prog.css. These are mainly: - a navigation bar - form and input styling - pages that have only a form inside them (for example, the create offer page)

Tools

This repo contains some tools that could be useful during setup and development of the app. They're all located in the tools folder.

  1. move-to-www.sh - moves the source code (located in src) to the /var/www/devrix-job-board/ folder
  2. watch-move-to-www.sh - does the same thing as move-to-www.sh, but does it automatically every time you update a file inside the src folder. Especially useful while developing the application. - Dependencies: inotify-tools

Issues and Future

The project has the following issues, that the original task description didn't explicitly require to be fixed, but might be a good idea to explore: - There is no "404 Not-found" page - There is no system for user accounts (and by extension, no system for accepting/signing up to job offers) - There is no job offer page (a page for viewing a job offer; currently it only makes sense for sharing, as the landing page shows all job offer information) - There is no way to practical way to change the Dashboard page credentials or add multiple ones (e.g. they're hard coded)

These are the following things that might be a good idea to explore, post exam evaluation: - Actually using proper tools for the job (using an ORM for database queries, using a more fleshed out routing plugin, etc.) - Adding search functionalities (by words and by tags, like company, date, salary, etc.) - Either adding more info to job offers or updating the styling to better fit the current job offers - Have a proper way to add and remove companies