abschlussprojekt-device-man.../README.md

139 lines
4.0 KiB
Markdown
Raw Permalink Normal View History

2023-03-21 20:07:54 +01:00
# 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.
2023-03-17 09:44:20 +01:00
2023-04-04 20:12:37 +02:00
## Table of contents
1. Description
2. Instalation
- Requirements
- Getting Started
3. Usage
4. Testing
5.
## 1 Description (WIP)
2023-03-21 20:07:54 +01:00
- Device List
- Device Detail
- device add
- Device History
2023-03-17 09:44:20 +01:00
2023-04-04 20:12:37 +02:00
## 2 Installation
In this section, all requirements are defined first. This is followed by a step by step installation. Finally some general information
2023-04-02 09:47:07 +02:00
### 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'
```
2023-04-04 20:12:37 +02:00
## 3 Usage (WIP)
2023-03-21 20:07:54 +01:00
- User story
2023-03-17 09:44:20 +01:00
2023-04-04 20:12:37 +02:00
## 4 Testing
To test the application run the following code inside the project directory `device-app`:
```sh
php artisan test
```
## 5 Author
2023-04-02 09:47:07 +02:00
Timon Lorenz (lot17014)
2023-03-17 09:44:20 +01:00
2023-04-04 20:12:37 +02:00
## 6 License
2023-04-06 12:17:42 +02:00
This project is licensed with the MIT license. The used framework [Laravel](https://laravel.com/) and the imported [Log-Viewer](https://github.com/opcodesio/log-viewer/discussions) as well as the CSS framework [Bulma](https://bulma.io/) are also licensed with the MIT license.
2023-03-17 09:44:20 +01:00
2023-03-21 20:07:54 +01:00
## Releasedate
2023-03-23 21:50:31 +01:00
latest: 15.04.2023
## About
2023-03-24 13:49:09 +01:00
Laravel is a full feature framework
2023-03-26 12:17:43 +02:00
### security
2023-04-03 11:54:41 +02:00
- coss-side-scripting disabled
- SQL injection attacks
2023-03-26 12:17:43 +02:00
## ChatGPT
2023-03-29 22:32:49 +02:00
see ChatGPT folder
#### Challenges
Convention, due to given database. Could be easier