Skip to content

Commit

Permalink
Merge pull request #29 from MauAgendar/feature/mobile
Browse files Browse the repository at this point in the history
Feature/mobile
  • Loading branch information
luisgmunhoz authored Oct 26, 2023
2 parents 9b6bad4 + 4412725 commit 7c89504
Show file tree
Hide file tree
Showing 174 changed files with 26,418 additions and 20,010 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: Automated Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build and run Docker containers
run: docker compose -f docker-compose.test.yml up -d

- name: Wait for services to start
run: docker compose -f docker-compose.test.yml ps

- name: Install dependencies
run: cd ./auth/src && npm install

- name: Run tests
run: cd ./auth/src && npm run test

- name: Stop and remove Docker containers
run: docker-compose -f docker-compose.test.yml down
name: Automated Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build and run Docker containers
run: docker compose -f docker-compose.test.yml up -d

- name: Wait for services to start
run: docker compose -f docker-compose.test.yml ps

- name: Install dependencies
run: cd ./auth/src && npm install

- name: Run tests
run: cd ./auth/src && npm run test

- name: Stop and remove Docker containers
run: docker-compose -f docker-compose.test.yml down
80 changes: 40 additions & 40 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Build and Push Docker Images

on:
push:
branches:
- main

env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

jobs:
build-and-push:
name: Build and Push Docker Images
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Create env file"
run: |
echo "${{ secrets.DOCKER_ENV_FILE }}" > .env
- name: Build
run: |
docker compose build auth calendar
- name: Push Auth Image
env:
DOCKER_BUILDKIT: 1
run: |
docker tag mauagendar-auth luisgmunhoz/mauagendar-auth
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker push luisgmunhoz/mauagendar-auth
- name: Push Calendar Image
env:
DOCKER_BUILDKIT: 1
run: |
docker tag mauagendar-calendar luisgmunhoz/mauagendar-calendar
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker push luisgmunhoz/mauagendar-calendar
name: Build and Push Docker Images

on:
push:
branches:
- main

env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

jobs:
build-and-push:
name: Build and Push Docker Images
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Create env file"
run: |
echo "${{ secrets.DOCKER_ENV_FILE }}" > .env
- name: Build
run: |
docker compose build auth calendar
- name: Push Auth Image
env:
DOCKER_BUILDKIT: 1
run: |
docker tag mauagendar-auth luisgmunhoz/mauagendar-auth
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker push luisgmunhoz/mauagendar-auth
- name: Push Calendar Image
env:
DOCKER_BUILDKIT: 1
run: |
docker tag mauagendar-calendar luisgmunhoz/mauagendar-calendar
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker push luisgmunhoz/mauagendar-calendar
46 changes: 23 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
.env
node_modules
dist
dist-ssr
*.local

# Editor directories and files
.env
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
.env
node_modules
dist
dist-ssr
*.local

# Editor directories and files
.env
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
22 changes: 11 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"configurations": [
{
"command": "cd ./auth/src && npm run test",
"name": "Run npm start",
"request": "launch",
"type": "node-terminal"
},

]
}
{
"configurations": [
{
"command": "cd ./auth/src && npm run test",
"name": "Run npm start",
"request": "launch",
"type": "node-terminal"
},

]
}
28 changes: 14 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"editor.formatOnSave": true,
"[typescript]": {
"editor.formatOnSave": true
},
"[javascript]": {
"editor.formatOnSave": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"jest.autoRevealOutput": "on-run",
}
{
"editor.formatOnSave": true,
"[typescript]": {
"editor.formatOnSave": true
},
"[javascript]": {
"editor.formatOnSave": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"jest.autoRevealOutput": "on-run",
}
92 changes: 46 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
# MauAgendar

## Projeto de Eng de Software/Empreendedorismo/Arquitetura/LP2

- Ana Helena Marcacini RA: 20.01305-0
- Enrico Giannobile RA: 19.00610-0
- Ettore Padula Dalben RA: 20.00387-0
- Guilherme de Campos - RA: 20.00089-8
- Laura Caroline Pinto Correia RA: 20.00171-0
- Luis Guilherme de Souza Munhoz RA: 20.01937-8

![](https://avatars.githubusercontent.com/u/129552822?s=400&u=48a7f16b037ad21fe054d0aee8e59fb70a155a35&v)

### Tecnologias utilizadas

- Node
- Express
- bcrypt
- jsonwebtoken
- Docker
- Kubernetes
- RabbitMQ
- PostgreSQL
- Typescript
- SwaggerUI

### Como rodar o projeto

- Clone o repositório
- Altere os arquivos .env.example na raíz e no diretório frontend para .env e preencha as variáveis de ambiente
- Instale o docker, caso já não o tenha instalado, é possível encontrar o tutorial de instalação no site oficial do docker em : <https://docs.docker.com/engine/install/>
- Execute o comando `docker compose up --build -d` para subir o projeto
- Acesse o localhost:${API_PORT} para acessar o swagger e testar as rotas
- Acesse o localhost:${CLIENT_PORT} para acessar o frontend


### Como rodar o Kubernetes
- Clone o repositório
- Altere o arquivo .env.example na raíz para .env e preencha as variáveis de ambiente
- Instale o docker, caso já não o tenha instalado, é possível encontrar o tutorial de instalação no site oficial do docker em : <https://docs.docker.com/engine/install/>
- Habilite o kubernetes no docker desktop
- Digite ```kubectl apply -f ./kubernetes``` em um terminal na raíz do projeto

### Link do vídeo

<https://youtu.be/U6bmKo-6JgA>
# MauAgendar

## Projeto de Eng de Software/Empreendedorismo/Arquitetura/LP2

- Ana Helena Marcacini RA: 20.01305-0
- Enrico Giannobile RA: 19.00610-0
- Ettore Padula Dalben RA: 20.00387-0
- Guilherme de Campos - RA: 20.00089-8
- Laura Caroline Pinto Correia RA: 20.00171-0
- Luis Guilherme de Souza Munhoz RA: 20.01937-8

![](https://avatars.githubusercontent.com/u/129552822?s=400&u=48a7f16b037ad21fe054d0aee8e59fb70a155a35&v)

### Tecnologias utilizadas

- Node
- Express
- bcrypt
- jsonwebtoken
- Docker
- Kubernetes
- RabbitMQ
- PostgreSQL
- Typescript
- SwaggerUI

### Como rodar o projeto

- Clone o repositório
- Altere os arquivos .env.example na raíz e no diretório frontend para .env e preencha as variáveis de ambiente
- Instale o docker, caso já não o tenha instalado, é possível encontrar o tutorial de instalação no site oficial do docker em : <https://docs.docker.com/engine/install/>
- Execute o comando `docker compose up --build -d` para subir o projeto
- Acesse o localhost:${API_PORT} para acessar o swagger e testar as rotas
- Acesse o localhost:${CLIENT_PORT} para acessar o frontend


### Como rodar o Kubernetes
- Clone o repositório
- Altere o arquivo .env.example na raíz para .env e preencha as variáveis de ambiente
- Instale o docker, caso já não o tenha instalado, é possível encontrar o tutorial de instalação no site oficial do docker em : <https://docs.docker.com/engine/install/>
- Habilite o kubernetes no docker desktop
- Digite ```kubectl apply -f ./kubernetes``` em um terminal na raíz do projeto

### Link do vídeo

<https://youtu.be/U6bmKo-6JgA>
12 changes: 6 additions & 6 deletions auth/src/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
presets: [
["@babel/preset-env", { targets: { node: "current" } }],
"@babel/preset-typescript",
],
};
module.exports = {
presets: [
["@babel/preset-env", { targets: { node: "current" } }],
"@babel/preset-typescript",
],
};
38 changes: 19 additions & 19 deletions auth/src/configs/database.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Sequelize } from "sequelize";
import dotenv from "dotenv";
dotenv.config();
const pgHost: string = process.env.PG_HOST as string;
const pgPort: number = parseInt(process.env.PG_PORT as string);
const pgUser: string = process.env.PG_USER as string;
const pgPassword: string = process.env.PG_PASSWORD as string;
const pgDatabase: string = process.env.PG_DATABASE as string;

const sequelize = new Sequelize({
dialect: "postgres",
host: pgHost,
port: pgPort,
username: pgUser,
password: pgPassword,
database: pgDatabase,
});

export default sequelize;
import { Sequelize } from "sequelize";
import dotenv from "dotenv";
dotenv.config();
const pgHost: string = process.env.PG_HOST as string;
const pgPort: number = parseInt(process.env.PG_PORT as string);
const pgUser: string = process.env.PG_USER as string;
const pgPassword: string = process.env.PG_PASSWORD as string;
const pgDatabase: string = process.env.PG_DATABASE as string;

const sequelize = new Sequelize({
dialect: "postgres",
host: pgHost,
port: pgPort,
username: pgUser,
password: pgPassword,
database: pgDatabase,
});

export default sequelize;
Loading

1 comment on commit 7c89504

@vercel
Copy link

@vercel vercel bot commented on 7c89504 Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mauagendar – ./

mauagendar.vercel.app
mauagendar-mauagendar.vercel.app
mauagendar-git-main-mauagendar.vercel.app

Please sign in to comment.