Skip to content

pacome35220/AREA

Repository files navigation

AREA

Build Status

Automation platform of his digital life

Project structure

Each subfolders contains its own README.md

.
├── server - Back-end server with business logic of AREA
├── webapp - Front-end Angular web application
├── mobile - Front-end Xamarin mobile application

Development workflow

If you want to develop on the server or the webapp, here is how to get started.

1. Prepare your environment

Here comes a little surprise: You need Node.JS and docker-compose.

2. Install the dependencies

$ npm install
$ cd server && npm install
$ cd webapp && npm install

3. Expose the default database port

In the docker-compose.yml, in the db service, add a field ports to expose the default database port.

For PostgreSQL, the default port is 5432.

ports:
    - '8081:5432'

4. Load environment variables

First, load environment variables used in docker-compose.yml with this command :

$ source .travis/.env

5. Run database service

$ docker-compose up --build db

6. Add .env in server directory

We use the well-known dotenv to pre-load environment variables in the server.

ENV=            # actually usused
DB=             # must be postgres
DB_USER=        # must be the same as POSTGRES_USER in docker-compose.yml
DB_PASSWORD=    # must be the same as POSTGRES_PASSWORD in docker-compose.yml
DB_HOST=        # must be localhost
DB_PORT=        # must be the same as in 3. chapter

7. Running server

$ cd server
$ npm run dev

8. Running Angular webapp

$ cd webapp
$ npm start

Contributing rules

  • npm run commit, prompt you to fill out any required commit fields at commit time, to format your commits messages. With husky and lint-staged, it also run linters on git staged files.
  • npm run prettify, lint all files following rules wrote in .prettierrc.
  • npm run release, automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org.

Schema of AREA

Schema of AREA