Skip to content

WEB application to field journals submission and interventions monitoring from E-Terapias project

Notifications You must be signed in to change notification settings

isaac-allef/e-terapias

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation



📌 Table of Contents

👷 Installation

To clone and run this application, you'll need Git, [Node.js v12.20.0][nodejs] or higher + [Yarn 1.22.5][yarn] or higher installed on your computer. From your command line:

Create postgres docker

$ sudo docker run --name e-terapias-docker -e POSTGRES_PASSWORD=1234 -p 5433:5432 -d postgres

Create 'e-terapias' database

CREATE DATABASE "e-terapias";

Feel free to create the database however you want, but remember to change the ormconfig.json file in the backend folder

Clone this repository

$ git clone https://github.com/isaac-allef/e-terapias.git

Go into the repository

$ cd e-terapias

Install backend dependencies

$ cd back-end
$ yarn install

Run migrations

$ yarn typeorm migration:run

Run backend

$ yarn dev:server

Install and configurate microservice to read google sheets information

  • Create your own ".env.local" file based on ".env.local.example" in front-end root folder
  • Instale and run cms-sheets

Install frontend dependencies and run it

$ cd front-end
$ yarn install
$ yarn dev or yarn build && yarn start

🏃 Getting started

After starting the back-end create a administrator to access application through route described below

  • Method: POST
  • URL: http://localhost:3333/administrators
  • Data body:
{
	"email": "administrator@uesc.com",
	"password": "123456"
}

💼 Business rules

  • A aplicação só pode ser acessada pelos administrators ou pelos moderators
  • O moderator tem os recursos de criação e manipulação de seus field journals
  • O administrator não pode criar ou alterar field journals
  • O administrator pode criar e manipular os demais recursos da aplicação
  • Um field journal é criado seguindo um field journal template
  • Para que um field journal seja criado é preciso:
    • Um moderator
    • Uma eterapia
    • Que ambos moderador e eterapia estejam previamente relacionados entre se
    • Que a eterapia tenha um field journal template
  • Os templates de diários de campo não podem ser alterados, só criados, lidos e excluídos. Caso precise fazer alguma alteração, deverá ser criado um novo template e utiliza-lo
  • Cada field journal é composto por fields podem ser do tipo string, int, date e boolean
  • Cada eterapia deve ter apenas um field journal template, sendo livre para troca-lo

📋 Documentation front-end

🚀 User Journey

📋 Documentation back-end

🚀 Features

  • Create, list, show, update and delete (administrators, moderators, eterapias and field journals)
  • Create, list, show and delete (field journals templates)
  • List with relations (administrators, moderators, eterapias, field journals and field journals templates)
  • List with pagination, ordenation and search (moderators, eterapias, field journals and field journals templates)
  • Link and unlink moderators with eterapias (many to many)
  • Link and unlink eterapias with field journals templates (many to one, one to many)
  • Login to administrators and moderators
  • Authentication and authorization with JWT (JSON WEB TOKEN)

💾 Database schema

About

WEB application to field journals submission and interventions monitoring from E-Terapias project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published