| Name | Size | |
|---|---|---|
| .gitignore | 1.6 KiB | log stats plain blame |
| LICENSE | 1.0 KiB | log stats plain blame |
| README.md | 5.5 KiB | log stats plain blame |
| configs | 49 B | log stats plain |
| db-export | 96 B | log stats plain |
| screenshots | 228 B | log stats plain |
| src | 170 B | log stats plain |
| tools | 90 B | log 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
-
As previously mentioned, the project uses the LAMP stack. Links on setting it up: Ubuntu 20.04, Debian 8 or CentOS 8.
-
You'll need to update the source code with your
MySQLcredentials. In the filesrc/models/DB.php, on lines 6 to 9 you'll find the connection information. You'll need to change the values of$usernameand$passwordwith 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$dbnameis completely up to preference. - Don't worry if the database or tables don't exist, when the app starts it automatically create them. -
Currently this repo provides an Apache configuration file (
configs/devrix-job-board.conf) with the localhost domaindjb.local. - To use that domain, you'll also need to open your/etc/hostsfile 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 ofServerNameandServerAliaswith your desired domain and subdomain. -
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 themove-to-www.shscript: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.
move-to-www.sh- moves the source code (located insrc) to the/var/www/devrix-job-board/folderwatch-move-to-www.sh- does the same thing asmove-to-www.sh, but does it automatically every time you update a file inside thesrcfolder. 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
