150 lines
3.8 KiB
Markdown
150 lines
3.8 KiB
Markdown
# Contribution
|
|
|
|
If you want to contribute, pull the branch `dev` and create a new branch from it. You are free to push the branch up to have a personal backup from your contributions.
|
|
|
|
we recommed three types of branches:
|
|
|
|
**Personal Branch**
|
|
This branches are used to experiment for your own on a specific task but always have a personal backup
|
|
Path Styling: `/yourname/task-or-feature-name`
|
|
|
|
**Tooling branches**
|
|
This branches are used to add team wide tooling features like eslint for better coding experience
|
|
Path Styling `/tooling/tool-beeing-applied`
|
|
|
|
**Feature branches**
|
|
This branches are used to develop features for the app
|
|
Path Styling `/feature/name-of-the-branch`
|
|
|
|
## Merging branches
|
|
The recommended way to merge is a pull request on the `dev` branch. This requires that eslint is free of issues and the application compiles successfully
|
|
|
|
Please commit all your changes in that branch and merge it (after another pull) into `dev` and push it. So everybody is up to date and we have no issues integrating different versions.
|
|
|
|
# Logging
|
|
|
|
This project used pino for logging on client and server side. Currently only client side is tested.
|
|
|
|
## How to use:
|
|
In pages and components, that are running in the client, you should use for Logging `this.$logger`
|
|
|
|
this.$logger.trace("Trace or Trance")
|
|
this.$logger.error("This is an error")
|
|
this.$logger.debug("This is a debugging log.")
|
|
this.$logger.info("This is a info log.")
|
|
this.$logger.warn("This is a warning log.")
|
|
this.$logger.fatal({...data, level: 'fatal'})
|
|
|
|
Please use this especially in catch blocks. It used pino as framework and can also provide logging.
|
|
|
|
## Setup
|
|
|
|
If you don't use Node 19 or lower than you need to work around with the node version manager.
|
|
|
|
install node version mananger, register it with that code in your terminal.
|
|
|
|
```sh
|
|
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
```
|
|
|
|
Make sure you install node 18/19 and then run nvm use 18/19 before you continue.
|
|
|
|
```bash
|
|
nvm install 19
|
|
````
|
|
```bash
|
|
nvm use 19
|
|
````
|
|
|
|
Make sure to install the dependencies:
|
|
|
|
```bash
|
|
# yarn
|
|
yarn install
|
|
|
|
# npm
|
|
npm install
|
|
|
|
# pnpm
|
|
pnpm install --shamefully-hoist
|
|
```
|
|
|
|
## Development Server
|
|
|
|
Start the development server:
|
|
|
|
```bash
|
|
npm run dev
|
|
```
|
|
## Linting
|
|
Start the linting
|
|
|
|
```bash
|
|
npm run lint
|
|
```
|
|
|
|
```bash
|
|
npm run lint:fix
|
|
```
|
|
|
|
## Production
|
|
|
|
Build the application for production:
|
|
|
|
```bash
|
|
npm run build
|
|
```
|
|
|
|
Locally preview production build:
|
|
|
|
```bash
|
|
npm run preview
|
|
```
|
|
|
|
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
|
|
## Container
|
|
|
|
You can build the app as an Docker Container with the existing Dockerfile. The image can be deployed via an docker compose file that is not part of the current frontend project but an composition of the docker frontend and backend container. It can be found at our current strato development server and on gitea.
|
|
|
|
## Mobile
|
|
|
|
You can build the app for android and iOS !but this project still uses the browser API for accessing media of the user. By this reason the app actually not running on android nor iOs.
|
|
|
|
Build the application for production:
|
|
|
|
```bash
|
|
npm run generate
|
|
```
|
|
|
|
Create with capacitor the android build:
|
|
Capacitor should be installed already as an npm package, but check this first if you run into issues.
|
|
|
|
```bash
|
|
npx cap add android
|
|
```
|
|
```bash
|
|
npx cap add ios
|
|
```
|
|
|
|
Update with capacitor the android/ios build (after you changed something)
|
|
|
|
```bash
|
|
npx cap sync android
|
|
```
|
|
```bash
|
|
npx cap sync android
|
|
```
|
|
|
|
Open the app in Android Studio or Apple'S XCode
|
|
|
|
```bash
|
|
npx cap open android
|
|
```
|
|
```bash
|
|
npx cap open ios
|
|
```
|
|
|
|
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
You can also checkout capacitor, vue 3. |