Skip to content

Web API and Authoring System built with the Laravel Framework, to support CS Unipi mobile application

Notifications You must be signed in to change notification settings

kapposds/csunipi-author

Repository files navigation

CS Unipi API & Author

Part of Bachelors Thesis. Underlying back-end API and authoring platform (CRUD) with a simple user interface used by the University of Piraeus, Computer Science department administrators. Developed with Laravel Framework.

Through this application, admins can manage the contents (articles, pages, people, images) available to the department's hybrid mobile app (CS Unipi Mobile https://github.com/kapposds/csunipi-mobile). They can also edit their profile, and super admins can manage other admins.

The application is only in Greek.

System Requirements

You need to install a web server, such as Apache, and of course PHP. Also its required to install a database as well, such as MySQL.

Your system must meet the following requirements in order to build the app developed with Laravel 5.2 version:

  • PHP >= 5.5.9
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension

The above requirements are included in xampp package https://www.apachefriends.org/download.html

Laravel utilizes Composer as its dependency manager. So, make sure you have Composer (https://getcomposer.org/) installed on your machine.

For more info check the official documentation: https://laravel.com/docs/5.2/installation

Installation

Open a terminal and navigate to your projects directory by typing cd relative/path/to/projects/directory(i.e. xampp/htdocs , if you use apache as local webserver)

  • type git clone https://github.com/kapposds/csunipi-api yourprojectname to clone the repository
  • type cd projectname to go to cloned project directory
  • type composer install to install dependencies, if you encounter dependency problems try composer install --no-dev instead. Also make sure that you don't assign values with whitespaces outside of quotes in .env file (i.e. CS Unipi Author not valid, but "CS Unipi Author" is ok). If you still encounter errors try the composer dumpautoload command.
  • type composer update to get latest dependencies versions
  • copy .env.example to .env (if you are having trouble creating the file, try doing it in text editor i.e. sublime https://www.sublimetext.com/3)
  • type php artisan key:generateto regenerate secure key (make sure that a long string is assigned to the APP_KEY variable in .env file)

First step to get database ready: create an empty database (I used utf8_unicode_ci collation). I used MySQL and phpmyadmin (included in xampp installation) as my administration tool.

  • To configure database in .env file :

    • set DB_CONNECTION (i.e. mysql)
    • set DB_DATABASE (i.e. yourdb)
    • set DB_USERNAME (i.e. yourusername)
    • set DB_PASSWORD (i.e. yourpassword)
  • type php artisan migrate --seed to create and populate tables. For more migration commands visit https://laravel.com/docs/5.2/migrations#running-migrations *To configure mail server:

    • set MAIL_HOST (i.e. smtp.gmail.com)
    • set MAIL_PORT (i.e. 587 or 25)
    • set MAIL_USERNAME (i.e. [email protected])
    • set MAIL_PASSWORD (i.e. yourpassword)
    • set MAIL_FROM_ADDRESS (i.e. [email protected])
    • set MAIL_FROM_NAME (i.e.'CS Unipi Author' or whatever Name you want to appear when a user recieves a mail from the app)
  • Dont forget to allow less secure apps to use the mail, from your e-mail server settings (i.e. https://mail.google.com)

  • And also remember to run php artisan config:cache after making changes to your .env (environment variables).

Testing

  • type php artisan serve to serve the application on localhost:8000 address by default. In case you want to make the API available withitn your network use --host= or --port= parameters to specify address and port (its recommended to use your Private IP Address if you want to access the API from a mobile device i.e. 192.168.1.3:80)
  • open your browser and point it to http://localhost:8000 to use the application. Stop the server by pressing Ctrl + C in your command line.
  • use the following dummy administrator credentials to log in:
  • use the following dummy super administrator credentials to log in and be able to manage other users:

Bug Reports

If you discover bug within CS Unipi Api & Author, please send an e-mail to Alexandros Kappos at [email protected].

License

The current application is licensed under the MIT license.

About

Web API and Authoring System built with the Laravel Framework, to support CS Unipi mobile application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published