4.0 KiB
Abschlussprojekt Device Manager Timon Lorenz (WIP)
The goal of this project is to develop a web application which manages the devices of the Univesity Regensburg. It is currently in devlopment.
Table of contents
- Description
- Instalation
- Requirements
- Getting Started
- Usage
- Testing
1 Description (WIP)
- Device List
- Device Detail
- device add
- Device History
2 Installation
In this section, all requirements are defined first. This is followed by a step by step installation. Finally some general information
Requirements
Docker
1. Download and install docker engine
Follow the instructions on the official docker website
2. Add docker to your startup
sudo systemctl enable docker --now
3. Add your current user to the docker group
sudo usermod -aG docker $USER
$USER
stands for the current logged in user
4. Restart your computer
Composer
Download and install composer
Follow the instructions on the official composer website or install it via apt package repository:
sudo apt-get install composer
Make sure you have these php extensions installed:
- php-curl
- php-xml
Geting started
1. Clone the repository
git clone https://git.uni-regensburg.de/ase22ws/abschlussprojekt-device-manager-timon-lorenz.git
2. Go in the project directory
cd device-app
3. Install dependencies
Install dependencies source
composer install
composer dumpautoload -o
If you are facing some issues try to update it first and run composer install
afterwards again
composer update
Make sure you have the mentioned php extensions installed
4. Setup the Environement
Copy the .env.example file and create .env file
cp .env.example .env
5. Start the project for the first time
This could take a few moments for the first time, later on it only takes a few seconds
vendor/bin/sail up
6. Generate a key
Open a new terminal in the project directory and enter the following command while project is still running:
vendor/bin/sail exec laravel.test php artisan key:generate
7. Setup the database
To migrate the database use following command:
sail exec laravel.test php artisan migrate
If you want to use some random generated sample as well as two users an admin and a test user you have to use the seed
function
sail exec laravel.test php artisan migrate:refresh --seed
8. View the project
Open your browser and go to http://localhost
and try it out. If you are finished you can stop the vendor/bin/sail up
terminal via 'strg' + 'C'.
General
Troubleshooting
If you followed the eight steps correctly the project should work. If you have any trouble installing the project, please let me know or make an issue.
Bash Alias
If you want save some time you can create a shortcut to vendor/bin/sail
and only use sail
1. Open bashrc
Go to your home directory and run
nano .bashrc
2. Add shortcut
Add following line:
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
3 Usage (WIP)
- User story
4 Testing
To test the application run the following code inside the project directory device-app
:
php artisan test
5 Author
Timon Lorenz (lot17014)
6 License
This project is licensed with the MIT license. The used framework Laravel and the imported Log-Viewer as well as the CSS framework Bulma are also licensed with the MIT license.
Releasedate
latest: 15.04.2023
About
Laravel is a full feature framework
security
- coss-side-scripting disabled
- SQL injection attacks
ChatGPT
see ChatGPT folder
Challenges
Convention, due to given database. Could be easier