docs: Details in README
Signed-off-by: Tibo De Peuter <tibo.depeuter@ugent.be>
This commit is contained in:
		
							parent
							
								
									9bd7696c7b
								
							
						
					
					
						commit
						2030b97c21
					
				
					 9 changed files with 129 additions and 9 deletions
				
			
		
							
								
								
									
										21
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								README.md
									
										
									
									
									
								
							|  | @ -23,28 +23,31 @@ en lessen kunnen samenstellen hun leerlingen en hun vooruitgang kunnen opvolgen. | ||||||
| 
 | 
 | ||||||
| ### Quick start | ### Quick start | ||||||
| 
 | 
 | ||||||
| 1. Installeer Docker en Docker Compose op je systeem (zie [Docker](https://docs.docker.com/get-docker/)). | 1. Installeer Docker en Docker Compose op je systeem (zie [Docker](https://docs.docker.com/get-docker/) en [Docker Compose](https://docs.docker.com/compose/)). | ||||||
| 2. Clone de repository. | 2. Clone deze repository. | ||||||
| 3. Voer `docker-compose up` uit in de root van de repository. | 3. Voer `docker compose up` uit in de root van de repository. | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| docker compose version | docker compose version | ||||||
| git clone https://github.com/SELab-2/Dwengo-1.git | git clone https://github.com/SELab-2/Dwengo-1.git | ||||||
| cd Dwengo-1 | cd Dwengo-1 | ||||||
| docker-compose up | docker compose up | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ### Handmatige installatie | ### Handmatige installatie | ||||||
| 
 | 
 | ||||||
| Zie de submappen voor de installatie-instructies van de verschillende services. | Zie de submappen voor de installatie-instructies van de [frontend](./frontend/README.md) en [backend](./backend/README.md). | ||||||
| 
 | 
 | ||||||
| ## Architectuur | ## Architectuur | ||||||
| 
 | 
 | ||||||
| ``` |  | ||||||
| hier overzichtsdiagram invoegen |  | ||||||
| ``` |  | ||||||
| 
 | 
 | ||||||
| We maken gebruik van ... Meer informatie over deze ontwerpsbeslissingen kan je vinden in de [architectuurdocumentatie](./architectuur). | De tech-stack bestaat uit: | ||||||
|  | 
 | ||||||
|  | - **Frontend**: TypeScript + Vue.js + Vuetify | ||||||
|  | - **Backend**: TypeScript + Node.js + Express.js + TypeORM + PostgreSQL | ||||||
|  | 
 | ||||||
|  | Voor meer informatie over de keuze van deze tech-stack, zie [designkeuzes](https://github.com/SELab-2/Dwengo-1/wiki/Design-keuzes). | ||||||
| 
 | 
 | ||||||
| ## Bijdragen aan Dwengo-1 | ## Bijdragen aan Dwengo-1 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								assets/img/dwengo-groen-zwart.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/img/dwengo-groen-zwart.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 50 KiB | 
							
								
								
									
										61
									
								
								assets/img/dwengo-groen-zwart.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								assets/img/dwengo-groen-zwart.svg
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| After Width: | Height: | Size: 9 KiB | 
							
								
								
									
										22
									
								
								backend/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								backend/README.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | ||||||
|  | # dwengo-1-backend | ||||||
|  | 
 | ||||||
|  | ## Project setup | ||||||
|  | 
 | ||||||
|  | ```shell | ||||||
|  | npm install | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | Setup the environment variables in a `.env` file in the root of the project. You can use the `.env.example` file as a template. | ||||||
|  | 
 | ||||||
|  | ### Development | ||||||
|  | 
 | ||||||
|  | ```shell | ||||||
|  | npm run dev | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | ### Production | ||||||
|  | 
 | ||||||
|  | ```shell | ||||||
|  | npm run build | ||||||
|  | npm run start | ||||||
|  | ``` | ||||||
							
								
								
									
										
											BIN
										
									
								
								docs/architecture/schema.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/architecture/schema.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 105 KiB | 
							
								
								
									
										30
									
								
								docs/architecture/schema.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								docs/architecture/schema.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | ||||||
|  | from diagrams import Cluster, Diagram | ||||||
|  | from diagrams.custom import Custom | ||||||
|  | from diagrams.onprem.certificates import LetsEncrypt | ||||||
|  | from diagrams.onprem.container import Docker | ||||||
|  | from diagrams.onprem.database import PostgreSQL | ||||||
|  | from diagrams.onprem.logging import Loki | ||||||
|  | from diagrams.onprem.monitoring import Grafana | ||||||
|  | from diagrams.onprem.network import Nginx | ||||||
|  | from diagrams.programming.framework import Vue | ||||||
|  | from diagrams.programming.language import Nodejs | ||||||
|  | from diagrams.programming.flowchart import InputOutput | ||||||
|  | 
 | ||||||
|  | with Diagram("Dwengo-1 architectuur", filename="docs/architecture/schema", show=False): | ||||||
|  |     reverse_proxy = Nginx("reverse proxy") | ||||||
|  |     reverse_proxy >> LetsEncrypt("SSL") | ||||||
|  | 
 | ||||||
|  |     with Cluster("Docker"): | ||||||
|  |         Docker() | ||||||
|  | 
 | ||||||
|  |         frontend = Vue("/") | ||||||
|  |         backend = Nodejs("/api") | ||||||
|  |         reverse_proxy >> frontend | ||||||
|  |         frontend >> backend >> InputOutput("MikroORM") >> PostgreSQL() | ||||||
|  | 
 | ||||||
|  |         backend >> Loki("logging") >> Grafana("monitoring") | ||||||
|  | 
 | ||||||
|  |     with Cluster("Dwengo"): | ||||||
|  |         dwengo = Custom("Dwengo", "../../assets/img/dwengo-groen-zwart.png") | ||||||
|  | 
 | ||||||
|  |     backend >> dwengo | ||||||
							
								
								
									
										1
									
								
								docs/requirements.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								docs/requirements.txt
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | diagrams==0.24.1 | ||||||
|  | @ -6,6 +6,8 @@ This template should help get you started developing with Vue 3 in Vite. | ||||||
| 
 | 
 | ||||||
| [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). | ||||||
| 
 | 
 | ||||||
|  | Webstorm should work out of the box. | ||||||
|  | 
 | ||||||
| ## Type Support for `.vue` Imports in TS | ## Type Support for `.vue` Imports in TS | ||||||
| 
 | 
 | ||||||
| TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. | TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
|         "build": "npm run build --ws", |         "build": "npm run build --ws", | ||||||
|         "format": "npm run format --ws", |         "format": "npm run format --ws", | ||||||
|         "format-check": "npm run format-check --ws", |         "format-check": "npm run format-check --ws", | ||||||
|  |         "generate-docs": "python3 -m venv .venv && source .venv/bin/activate && pip install -r docs/requirements.txt && python docs/architecture/schema.py", | ||||||
|         "lint": "npm run lint --ws", |         "lint": "npm run lint --ws", | ||||||
|         "test:unit": "npm run test:unit --ws" |         "test:unit": "npm run test:unit --ws" | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
		Reference in a new issue