125 lines
3.3 KiB
Markdown
125 lines
3.3 KiB
Markdown
# 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.
|
|
|
|
## Description (WIP)
|
|
- Device List
|
|
- Device Detail
|
|
- device add
|
|
- Device History
|
|
|
|
## Installation
|
|
|
|
### Requirements
|
|
#### Docker
|
|
##### 1. Download and install docker engine
|
|
Follow the instructions on the official [docker website](https://docs.docker.com/engine/install/)
|
|
##### 2. Add docker to your startup
|
|
```sh
|
|
sudo systemctl enable docker --now
|
|
```
|
|
##### 3. Add your current user to the docker group
|
|
```sh
|
|
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](https://getcomposer.org/download/) or install it via apt package repository:
|
|
```sh
|
|
sudo apt-get install composer
|
|
```
|
|
Make sure you have these php extensions installed:
|
|
- php-curl
|
|
- php-xml
|
|
|
|
### Geting started
|
|
##### 1. Clone the repository
|
|
```sh
|
|
git clone https://git.uni-regensburg.de/ase22ws/abschlussprojekt-device-manager-timon-lorenz.git
|
|
```
|
|
##### 2. Go in the project directory
|
|
```sh
|
|
cd device-app
|
|
```
|
|
##### 3. Install dependencies
|
|
Install dependencies [source](https://medium.com/@colorfield/install-an-existing-laravel-project-c6e6bf28d5c6)
|
|
```sh
|
|
composer install
|
|
composer dumpautoload -o
|
|
```
|
|
If you are facing some issues try to update it first and run `composer install` afterwards again
|
|
```sh
|
|
composer update
|
|
```
|
|
Make sure you have the mentioned php extensions installed
|
|
|
|
##### 4. Setup the Environement
|
|
Copy the .env.example file and create .env file
|
|
```sh
|
|
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
|
|
```sh
|
|
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:
|
|
```sh
|
|
vendor/bin/sail exec laravel.test php artisan key:generate
|
|
```
|
|
##### 7. Setup the database
|
|
To migrate the database use following command:
|
|
```sh
|
|
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
|
|
```sh
|
|
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
|
|
```sh
|
|
nano .bashrc
|
|
```
|
|
##### 2. Add shortcut
|
|
Add following line:
|
|
```sh
|
|
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
|
|
```
|
|
|
|
|
|
|
|
## Usage (WIP)
|
|
- User story
|
|
|
|
## Author (WIP)
|
|
Timon Lorenz (lot17014)
|
|
|
|
## License (WIP)
|
|
propably MIT
|
|
|
|
## Releasedate
|
|
latest: 15.04.2023
|
|
|
|
## About
|
|
Laravel is a full feature framework
|
|
|
|
### security
|
|
coss-side-scripting disabled
|
|
|
|
## ChatGPT
|
|
see ChatGPT folder
|
|
|
|
#### Challenges
|
|
Convention, due to given database. Could be easier |