more on documentation

This commit is contained in:
lesion
2019-07-26 23:53:02 +02:00
parent 4da5e6dca5
commit 10921a072f
22 changed files with 1302 additions and 32 deletions

34
docs/dev/dev.md Normal file
View File

@@ -0,0 +1,34 @@
---
layout: default
title: Hacking
permalink: /dev
nav_order: 5
---
### Development Stack
**Gancio** is built with following technologies:
- [Nuxt.js](https://nuxtjs.org/)
- Vue.js
- Express
- Node.js
- Sequelize
- Element.ui
### Testing on your own machine
2. Download source
```bash
git clone https://git.lattuga.net/cisti/gancio
```
3. Install dependencies
```bash
yarn
```
4. Hacking
```bash
yarn dev
```

18
docs/dev/migration.md Normal file
View File

@@ -0,0 +1,18 @@
---
layout: default
title: Migration
permalink: /dev/migration
parent: Hacking
---
### Migration
If you need to modify the db's structure while hacking, it's super easy,
just change `server/api/models/`.
If you then decide that your changes are good for production, a
sequelize migration is needed:
#### Create a migration:
`./node_modules/.bin/sequelize migration:generate --name your_migration`

36
docs/dev/structure.md Normal file
View File

@@ -0,0 +1,36 @@
---
layout: default
title: Project Structure
permalink: /dev/structure
parent: Hacking
---
### Structure
### API / backend
Source code inside `server/api/`.
`index.js` is basically a routing table pointing each PATH with specified
HTTP VERB to a method of a controller.
jwt is used to authenticate api request.
Express is based on middleware, passing each request to a chain of methods.
If you come from a PHP background, note that the main difference with
Node.js is that the server process is always running and able to manage
multiple requests and tasks together (asyncronically) while each php
process is tied to a single request.
Sequelize is used as ORM. Take a look in `/server/api/models`.
### Client / frontend
Nuxt.js is used here!
Nuxt is basically Vue plus SSR (Server Side Rendering).
Client routing in nuxt is automatic (if you don't need something special),
just put your page inside `pages` and that's it!