Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagahbond committed Apr 14, 2022
1 parent 2889401 commit fe9d80e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 17 deletions.
49 changes: 33 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
## Description
uni-verse-api
![](./doc/badges/coverage.svg)
# Uni-verse API
Uni-verse is a platform allowing music creators to share both their content and their resources.

## Installation
This API serves for business rules, and is used aas main API as opposed to a microservice architecture.

```bash
$ npm install
```
It communicates with another tinier API for fingerprinting purposes, and with 3 clients
## Documentation

## Running the app
### UML
![UML](doc/assets/UML.png)

```bash
# development
$ npm run start
### Routes
Routes are documented automatically using Swagger.

# watch mode
$ npm run start:dev
Documentation can be found at [https://uni-verse.api.vagahbond.com/api/v2/docs/](https://uni-verse.api.vagahbond.com/api/v2/docs/)
## Setup

# production mode
$ npm run start:prod
```
### Requirements
* Docker
* docker-compose

### Run
To setup locally:
* Clone this repository
* Fill env file according to your needs
* Run `docker-compose up`.


## Production
Production is automaticaly updated thanks to the CI pipeline.

It runs on a self hosted Kubernetes cluster. So far, we use a subdomain of vagahbond.com for money reasons.

The url is [uni-verse.api.vagahbond.com](uni-verse.api.vagahbond.com)

The pipeline builds a docker image that it sends to a private registry.
Then, production pods that are restarted will pull the latest version of the api.

## Test

Expand All @@ -29,6 +46,6 @@ $ npm run test
# e2e tests
$ npm run test:e2e

# test coverage
# test coverage and coverage badge generation
$ npm run test:cov
```
Binary file added doc/assets/UML.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest --runInBand --detectOpenHandles --forceExit",
"test:watch": "jest --watch",
"test:cov": "jest --coverage && make-coverage-badge",
"test:cov": "jest --coverage && make-coverage-badge --output-path=badges/coverage.svg",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
Expand Down

0 comments on commit fe9d80e

Please sign in to comment.