This a project I did for Software Engineering II course I took in college. For this project I used Laravel/PHP, which was good for me as Laravel supports (or include libraries that does support) many functionalities, like validation, Query builder/Object-Relational Mapper (ORM), generating fake data to seed the database, etc.

Directory Structure

Here is a brief description of the structure of the system:

  • Route definitions: all of the systems routes are define in routes/web.php and routes/api.php for use in web and AJAX respectively.
  • Controllers: the directory app/Http/Controllers/ contains all the controllers in our system.
  • View: the code for the interface of our system is stored in resources/views/. In that directory, view related to different models are placed in separate subdirectories, while code for custom components is placed in resources/views/components.
  • Models: the different models in our system are placed in app/Http/Models/, while the code for creating the database is placed in database/migrations/.
  • Randomly generated data: the directories database/seeders/ and database/factories/ contain code used for filling the database with random data.
  • Authentication middleware: the code used for authentication and access control is all placed in app/Http/Middlware/MyAuth.php.
  • Assets: CSS and JavaScript code are placed under public/assets/ so it can be access by the client.

Running the system

Installing requirements

In order to run the system, you have to first install the required frameworks. You can do so by running the following command:

$ composer update

Configuring database

You have to also change .env file so it contains the appropriate information of the MySQL server.

Seeding database

If you want to generate random data to fill the database, you will first also have to place poster images in storage/app/posters/ and make that storage publicly available with the following command:

$ php artisan storage:link

After doing so, you may create the database tables (schemas), and seed them with the following commands:

$ php artisan migrate
$ php artisan seed

Serving the system

When the system is ready you can start a local development server with the following command:

$ php artisan serve

Or you may otherwise deploy the system to production. See more