Readme reorganisation [skip ci]
This commit is contained in:
		
							
								
								
									
										77
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										77
									
								
								README.md
									
									
									
									
									
								
							| @@ -2,20 +2,18 @@ | ||||
|  | ||||
| Backend Server | ||||
|  | ||||
| ## Quickstart 🐳 | ||||
| > Use this to run the backend with a postgresql db in docker | ||||
|  | ||||
| 1. Clone the repo or copy the docker-compose  | ||||
| 2. Run in toe folder that contains the docker-compose file: `docker-compose up -d` | ||||
| 3. Visit http://127.0.0.1:4010/api/docs to check if the server is running | ||||
| 4. You can now use the default admin user (`demo:demo`) | ||||
|  | ||||
| ## Dev Setup 🛠 | ||||
| > Local dev setup utilizing sqlite3 as the database. | ||||
|  | ||||
| ### Local w/ sqlite | ||||
|  | ||||
| 1. Create a .env file in the project root containing: | ||||
|    ``` | ||||
|     APP_PORT=4010 | ||||
|     DB_TYPE=sqlite | ||||
|     DB_HOST=bla | ||||
|     DB_PORT=bla | ||||
|     DB_USER=bla | ||||
|     DB_PASSWORD=bla | ||||
|     DB_NAME=./test.sqlite | ||||
|    ``` | ||||
| 1. Rename the .env.example file to .env (you can adjust app port and other settings, if needed) | ||||
| 2. Install Dependencies | ||||
|    ```bash | ||||
|    yarn | ||||
| @@ -25,15 +23,21 @@ Backend Server | ||||
|    yarn dev | ||||
|    ``` | ||||
|  | ||||
| ### Generate Docs | ||||
| ``` | ||||
| yarn docs | ||||
| ``` | ||||
|  | ||||
| ### Docker w/ postgres 🐳 | ||||
|  | ||||
| ### Run Tests | ||||
| ```bash | ||||
| docker-compose up --build | ||||
| # Run tests once (server has to run) | ||||
| yarn test | ||||
|  | ||||
| # Run test in watch mode (reruns on change) | ||||
| yarn test:watch | ||||
|  | ||||
| # Run test in ci mode (automaticly starts the dev server) | ||||
| yarn test:ci | ||||
| ``` | ||||
|  | ||||
| ### Generate Docs | ||||
| ```bash | ||||
| yarn docs | ||||
| ``` | ||||
|  | ||||
| ## Recommended Editor | ||||
| @@ -42,22 +46,19 @@ docker-compose up --build | ||||
|  | ||||
| ### Recommended Extensions | ||||
|  | ||||
| - will be automatically recommended via ./vscode/extensions.json | ||||
| * will be automatically recommended via ./vscode/extensions.json | ||||
|  | ||||
| ## Branches | ||||
| - main: Protected "release" branch | ||||
| - dev: Current dev branch for merging the different features - only push for merges or minor changes! | ||||
| - feature/xyz: Feature branches - `feature/issueid-title` | ||||
| - bugfix/xyz: Branches for bugfixes - `bugfix/issueid-title` (no id for readme changes needed) | ||||
|  | ||||
|  | ||||
| ## File Structure | ||||
|  | ||||
| - src/models/entities\* - database models (typeorm entities) | ||||
| - src/models/actions\* - actions models | ||||
| - src/models/responses\* - response models | ||||
| - src/controllers/\* - routing-controllers | ||||
| - src/loaders/\* - loaders for the different init steps of the api server | ||||
| - src/middlewares/\* - express middlewares (mainly auth r/n) | ||||
| - src/errors/* - our custom (http) errors | ||||
| - src/routes/\* - express routes for everything we don't do via routing-controllers (depreciated) | ||||
| ## Staging | ||||
| ### Branches & Tags | ||||
| * vX.Y.Z: Release tags created from the main branch | ||||
|    * The version numbers follow the semver standard | ||||
|    * A new release tag automaticly triggers the release ci pipeline | ||||
| * main: Protected "release" branch | ||||
|    * The latest tag of the docker image get's build from this | ||||
|    * New releases get created as tags from this    | ||||
| * dev: Current dev branch for merging the different feature branches and bugfixes | ||||
|    * The dev tag of the docker image get's build from this | ||||
|    * Only push minor changes to this branch! | ||||
|    * To merge a feature branch into this please create a pull request | ||||
| * feature/xyz: Feature branches - nameing scheme: `feature/issueid-title` | ||||
| * bugfix/xyz: Branches for bugfixes - nameing scheme:`bugfix/issueid-title` | ||||
		Reference in New Issue
	
	Block a user