|
|
| [Home](Home) | [**Escopo**](Escopo) | [Processo](Processo) | [Sprints](Sprints) | [Design](Design) | [Arquitetura](Arquitetura) | [Repositórios](Repositórios) | [Banco de Dados](Banco de Dados) |
|
|
|
| :----------: | :-------------------------------: | :------------------: | :--------------: | :--------------------------: | :--------------------: | :------------------------: | :--------------: |
|
|
|
# Repositórios do Projeto
|
|
|
|
|
|
## Repositório Front-End
|
|
|
https://tools.ages.pucrs.br/pro-mata/frontend
|
|
|
| [Home](Home) | [Escopo](Escopo) | [Processo](Processo) | [Sprints](Sprints) | [Design](Design) | [Arquitetura](Arquitetura) | [**Repositorios**](Repositorios) | [Gerencia](Gerencia) | [Banco de Dados](Banco-de-Dados) |
|
|
|
| :----------: | :-------------------------------: | :------------------: | :--------------: | :--------------------: | :--------------------------: | :------------------------: | :---------------: | :--------------: |
|
|
|
|
|
|
## Repositório Back-End
|
|
|
https://tools.ages.pucrs.br/pro-mata/backend
|
|
|
> Última atualização: 19 de Outubro 2025
|
|
|
|
|
|
## Repositório de Infraestrutura
|
|
|
https://tools.ages.pucrs.br/pro-mata/infrastructure |
|
|
\ No newline at end of file |
|
|
## Estrutura de Repositórios
|
|
|
|
|
|
O projeto Pró-Mata utiliza uma estrutura **híbrida GitLab (oficial) + GitHub (desenvolvimento)**:
|
|
|
|
|
|
- **GitLab**: Repositórios oficiais (requisito institucional AGES)
|
|
|
- **GitHub**: Desenvolvimento ativo (familiaridade da equipe, ferramentas)
|
|
|
- **Sincronização**: Automática GitHub → GitLab
|
|
|
|
|
|
---
|
|
|
|
|
|
## Repositórios Oficiais (GitLab)
|
|
|
|
|
|
### Frontend
|
|
|
|
|
|
**URL**: <https://tools.ages.pucrs.br/pro-mata/frontend>
|
|
|
|
|
|
**Descrição**: Interface Web do usuário (React 19 + TypeScript)
|
|
|
|
|
|
**Tecnologias Principais**:
|
|
|
|
|
|
- React 19
|
|
|
- Vite 6
|
|
|
- TanStack Router (file-based routing)
|
|
|
- TanStack Query (server state)
|
|
|
- Tailwind CSS 4
|
|
|
- Shadcn/UI + Radix UI
|
|
|
- Vitest (unit/integration) + Playwright (E2E)
|
|
|
|
|
|
**Estrutura**:
|
|
|
|
|
|
```plain
|
|
|
src/
|
|
|
├── components/ui/ # Shadcn/UI components
|
|
|
├── features/ # Feature modules
|
|
|
├── lib/ # Utilities
|
|
|
├── routes/ # TanStack Router (file-based)
|
|
|
├── styles/ # Tailwind + tokens
|
|
|
└── main.tsx # App bootstrap
|
|
|
```
|
|
|
|
|
|
**Scripts Principais**:
|
|
|
|
|
|
- `npm run dev`: Dev server (hot reload)
|
|
|
- `npm run build`: Build produção
|
|
|
- `npm run test`: Testes unitários (Vitest)
|
|
|
- `npm run test:e2e`: Testes E2E (Playwright)
|
|
|
|
|
|
**Deploy**: AWS S3 static hosting (via GitHub Actions)
|
|
|
|
|
|
### Backend
|
|
|
|
|
|
**URL**: <https://tools.ages.pucrs.br/pro-mata/backend>
|
|
|
|
|
|
**Descrição**: API REST (NestJS + Node.js 22)
|
|
|
|
|
|
**Tecnologias Principais**:
|
|
|
|
|
|
- NestJS (framework)
|
|
|
- Node.js 22
|
|
|
- TypeScript (strict mode)
|
|
|
- Prisma ORM + PostgreSQL 15
|
|
|
- JWT (autenticação)
|
|
|
- Zod (validação)
|
|
|
- Swagger (documentação API)
|
|
|
- Jest (testes)
|
|
|
|
|
|
**Estrutura**:
|
|
|
|
|
|
```plain
|
|
|
src/
|
|
|
├── analytics/ # Umami integration
|
|
|
├── auth/ # JWT auth + roles
|
|
|
├── database/ # Prisma client
|
|
|
├── user/ # User management
|
|
|
├── experience/ # Experiences CRUD
|
|
|
└── main.ts # App bootstrap
|
|
|
|
|
|
prisma/
|
|
|
├── schema.prisma # Database schema
|
|
|
└── migrations/ # Database migrations
|
|
|
```
|
|
|
|
|
|
**Scripts Principais**:
|
|
|
|
|
|
- `npm run dev`: Dev server (hot reload)
|
|
|
- `npm run build`: Build produção
|
|
|
- `npm run test`: Testes unitários (Jest)
|
|
|
- `npm run prisma:migrate`: Rodar migrations
|
|
|
- `npm run prisma:generate`: Gerar Prisma Client
|
|
|
|
|
|
**Deploy**: AWS EC2 (Docker container via GitHub Actions)
|
|
|
|
|
|
**Documentação API**: <https://api.pro-mata.exemplo.com/api> (Swagger)
|
|
|
|
|
|
### Infraestrutura
|
|
|
|
|
|
**URL**: <https://tools.ages.pucrs.br/pro-mata/infrastructure>
|
|
|
|
|
|
**Descrição**: Configuração de infraestrutura (scripts, configs)
|
|
|
|
|
|
**Conteúdo**:
|
|
|
|
|
|
- Scripts de deploy
|
|
|
- Configurações AWS
|
|
|
- Docker Compose files
|
|
|
- Documentação de infraestrutura
|
|
|
|
|
|
**Nota**: Infraestrutura atual simplificada (AWS S3 + EC2). Ver repositório de backup para stack completa.
|
|
|
|
|
|
---
|
|
|
|
|
|
## Repositórios Desenvolvimento (GitHub)
|
|
|
|
|
|
### Frontend (GitHub)
|
|
|
|
|
|
**URL**: <https://github.com/AGES-Pro-Mata/frontend>
|
|
|
|
|
|
**Status**: Desenvolvimento ativo (mirror → GitLab)
|
|
|
|
|
|
**Acesso**: Privado (membros org AGES-Pro-Mata)
|
|
|
|
|
|
**CI/CD**:
|
|
|
|
|
|
- **Trigger**: Push em `main`
|
|
|
- **Pipeline**: Lint → Test → Build → Deploy S3
|
|
|
- **Ferramentas**: GitHub Actions
|
|
|
|
|
|
### Backend (GitHub)
|
|
|
|
|
|
**URL**: <https://github.com/AGES-Pro-Mata/backend>
|
|
|
|
|
|
**Status**: Desenvolvimento ativo (mirror → GitLab)
|
|
|
|
|
|
**Acesso**: Privado (membros org AGES-Pro-Mata)
|
|
|
|
|
|
**CI/CD**:
|
|
|
|
|
|
- **Trigger**: Push em `main`
|
|
|
- **Pipeline**: Lint → Test → Build → Docker → Deploy EC2
|
|
|
- **Registry**: Docker Hub (imagens públicas)
|
|
|
|
|
|
### Issues e Projects
|
|
|
|
|
|
**GitHub Projects**: <https://github.com/orgs/AGES-Pro-Mata/projects/1>
|
|
|
|
|
|
**Acesso**: Privado (membros org)
|
|
|
|
|
|
**Kanban**: Backlog → To Do → In Progress → Review → Done
|
|
|
|
|
|
**Sincronização Issues**: GitHub Issues → GitLab Issues (automatizada, simplificada)
|
|
|
|
|
|
---
|
|
|
|
|
|
## Repositório de Backup (Infraestrutura Multi-Cloud)
|
|
|
|
|
|
### Infra Multi-Cloud (Azure + AWS)
|
|
|
|
|
|
**URL**: <https://github.com/Saccilotto/pro-mata-infra>
|
|
|
|
|
|
**Owner**: André Sacilotto Santos (AGES IV - pessoal)
|
|
|
|
|
|
**Status**: Standby (não utilizado em produção atual)
|
|
|
|
|
|
**Descrição**: Infraestrutura completa multi-cloud com Terraform + Ansible + Docker Swarm
|
|
|
|
|
|
**Stack**:
|
|
|
|
|
|
- **IaC**: Terraform (Azure VMs / AWS EC2)
|
|
|
- **CaC**: Ansible (Docker Swarm config)
|
|
|
- **Orquestração**: Docker Swarm
|
|
|
- **Proxy/LB**: Traefik v3
|
|
|
- **Observabilidade**: Prometheus + Grafana
|
|
|
- **CDN/WAF**: Cloudflare
|
|
|
- **Domínio**: registro.br
|
|
|
|
|
|
**Estrutura**:
|
|
|
|
|
|
```plain
|
|
|
iac/ # Terraform (Infrastructure as Code)
|
|
|
cac/ # Ansible (Configuration as Code)
|
|
|
docker/ # Dockerfiles e Compose
|
|
|
envs/ # Environment configs
|
|
|
scripts/ # Deployment scripts
|
|
|
docs/ # Documentation
|
|
|
```
|
|
|
|
|
|
**Propósito**: Redundância geográfica, backup, tolerância a falhas (RTO < 4h)
|
|
|
|
|
|
---
|
|
|
|
|
|
## Sincronização Automatizada
|
|
|
|
|
|
### GitHub → GitLab (Código)
|
|
|
|
|
|
**Ferramenta**: GitHub Actions (mirror workflow)
|
|
|
|
|
|
**Frequência**: A cada push em `main` ou `develop`
|
|
|
|
|
|
**Conteúdo Sincronizado**:
|
|
|
|
|
|
- Código-fonte (todos os arquivos)
|
|
|
- Branches (`main`, `develop`, `feature/*`)
|
|
|
- Commits (histórico completo)
|
|
|
- Tags (releases)
|
|
|
|
|
|
### GitHub Issues → GitLab Issues
|
|
|
|
|
|
**Ferramenta**: GitHub Actions (custom script)
|
|
|
|
|
|
**Frequência**: A cada criação/atualização de issue
|
|
|
|
|
|
**Conteúdo Sincronizado**:
|
|
|
|
|
|
- Título e descrição
|
|
|
- Labels (mapeamento básico)
|
|
|
- Status (aberta/fechada)
|
|
|
|
|
|
**Nota**: Sincronização simplificada (não inclui comentários completos ou assignees)
|
|
|
|
|
|
---
|
|
|
|
|
|
## Workflow de Desenvolvimento
|
|
|
|
|
|
### 1. Desenvolvimento (GitHub)
|
|
|
|
|
|
```bash
|
|
|
# 1. Criar branch feature
|
|
|
git checkout -b feature/42-login-jwt
|
|
|
|
|
|
# 2. Desenvolver + commits semânticos
|
|
|
git commit -m "feat: adiciona autenticação JWT"
|
|
|
|
|
|
# 3. Push para GitHub
|
|
|
git push origin feature/42-login-jwt
|
|
|
|
|
|
# 4. Abrir Pull Request (GitHub)
|
|
|
# - Target: develop
|
|
|
# - Reviewers: AGES III/IV (mín. 2)
|
|
|
|
|
|
# 5. CI/CD valida automaticamente
|
|
|
# - Lint (ESLint + Prettier)
|
|
|
# - Test (Vitest/Jest)
|
|
|
# - Build (TypeScript)
|
|
|
|
|
|
# 6. Merge após aprovação
|
|
|
# - GitHub: merge PR
|
|
|
# - GitLab: mirror automático
|
|
|
```
|
|
|
|
|
|
### 2. Deploy (Automático)
|
|
|
|
|
|
```bash
|
|
|
# Após merge em main (GitHub):
|
|
|
# 1. CI/CD build produção
|
|
|
# 2. Frontend → AWS S3
|
|
|
# 3. Backend → Docker Hub → AWS EC2
|
|
|
# 4. Mirror → GitLab
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
## Convenções
|
|
|
|
|
|
### Branches
|
|
|
|
|
|
**Nomenclatura**: `feature/[numero-issue]-[descricao]`
|
|
|
|
|
|
**Exemplos**:
|
|
|
|
|
|
- `feature/42-login-jwt`
|
|
|
- `feature/15-reservas-crud`
|
|
|
- `feature/8-admin-dashboard`
|
|
|
|
|
|
### Commits
|
|
|
|
|
|
**Padrão**: Conventional Commits
|
|
|
|
|
|
**Formato**: `tipo: descrição`
|
|
|
|
|
|
**Tipos**:
|
|
|
|
|
|
- `feat`: Nova funcionalidade
|
|
|
- `fix`: Correção de bug
|
|
|
- `docs`: Documentação
|
|
|
- `style`: Formatação (sem lógica)
|
|
|
- `refactor`: Refatoração
|
|
|
- `test`: Testes
|
|
|
- `chore`: Manutenção (deps, config)
|
|
|
|
|
|
**Exemplos**:
|
|
|
|
|
|
```bash
|
|
|
git commit -m "feat: adiciona autenticação JWT no backend"
|
|
|
git commit -m "fix: corrige validação de datas em reservas (#15)"
|
|
|
git commit -m "docs: atualiza README com instruções de setup"
|
|
|
```
|
|
|
|
|
|
### Pull Requests
|
|
|
|
|
|
**Template**:
|
|
|
|
|
|
```markdown
|
|
|
## Descrição
|
|
|
[O que foi implementado]
|
|
|
|
|
|
## Issue Relacionada
|
|
|
Closes #42
|
|
|
|
|
|
## Tipo de Mudança
|
|
|
- [ ] Nova funcionalidade
|
|
|
- [ ] Correção de bug
|
|
|
- [ ] Breaking change
|
|
|
- [ ] Documentação
|
|
|
|
|
|
## Checklist
|
|
|
- [ ] Testes passando
|
|
|
- [ ] Code review feito
|
|
|
- [ ] Documentação atualizada
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
## Acesso aos Repositórios
|
|
|
|
|
|
### GitLab (Oficial)
|
|
|
|
|
|
**Acesso**: Público (leitura) / Privado (escrita - membros AGES)
|
|
|
|
|
|
**Login**: Credenciais institucional PUCRS
|
|
|
|
|
|
**URL Base**: <https://tools.ages.pucrs.br>
|
|
|
|
|
|
### GitHub (Desenvolvimento)
|
|
|
|
|
|
**Acesso**: Privado (apenas membros org AGES-Pro-Mata)
|
|
|
|
|
|
**Convite**: Solicitar a AGES IV
|
|
|
|
|
|
**URL Base**: <https://github.com/AGES-Pro-Mata>
|
|
|
|
|
|
### Backup (Pessoal)
|
|
|
|
|
|
**Acesso**: Público (leitura)
|
|
|
|
|
|
**Owner**: André Sacilotto Santos
|
|
|
|
|
|
**URL**: <https://github.com/Saccilotto/pro-mata-infra>
|
|
|
|
|
|
---
|
|
|
|
|
|
## Links Rápidos
|
|
|
|
|
|
### Repositórios
|
|
|
|
|
|
- **Frontend GitLab**: <https://tools.ages.pucrs.br/pro-mata/frontend>
|
|
|
- **Backend GitLab**: <https://tools.ages.pucrs.br/pro-mata/backend>
|
|
|
- **Infraestrutura GitLab**: <https://tools.ages.pucrs.br/pro-mata/infrastructure>
|
|
|
- **Frontend GitHub**: <https://github.com/AGES-Pro-Mata/frontend> (privado)
|
|
|
- **Backend GitHub**: <https://github.com/AGES-Pro-Mata/backend> (privado)
|
|
|
- **Backup Infra**: <https://github.com/Saccilotto/pro-mata-infra>
|
|
|
|
|
|
### Gestão
|
|
|
|
|
|
- **GitHub Projects**: <https://github.com/orgs/AGES-Pro-Mata/projects/1> (privado)
|
|
|
- **GitLab Issues**: <https://tools.ages.pucrs.br/groups/pro-mata/-/issues>
|
|
|
- **Wiki**: <https://tools.ages.pucrs.br/pro-mata/wiki/-/wikis/home>
|
|
|
|
|
|
### Documentação
|
|
|
|
|
|
- **Swagger API**: TODO (adicionar URL de produção)
|
|
|
- **Figma Design**: [Link Figma](https://www.figma.com/design/JWCBFx52pKQVs4FmzDjEXW/Pr%C3%B3-mata-Main-Design?node-id=0-1&t=yFXQcgjDZCbv9gtF-1)
|
|
|
- **Processo**: [Processo](Processo)
|
|
|
- **Arquitetura**: [Arquitetura](Arquitetura)
|
|
|
|
|
|
---
|
|
|
|
|
|
## Troubleshooting
|
|
|
|
|
|
### Problemas Comuns
|
|
|
|
|
|
#### 1. Erro ao clonar repositório GitLab
|
|
|
|
|
|
```bash
|
|
|
# Solução: Verificar credenciais PUCRS
|
|
|
git config --global credential.helper store
|
|
|
git clone https://tools.ages.pucrs.br/pro-mata/frontend.git
|
|
|
```
|
|
|
|
|
|
#### 2. CI/CD falhando
|
|
|
|
|
|
- Verificar linter: `npm run lint`
|
|
|
- Verificar testes: `npm run test`
|
|
|
- Verificar build: `npm run build`
|
|
|
|
|
|
#### 3. Docker build falhando (backend)
|
|
|
|
|
|
```bash
|
|
|
# Rebuild containers
|
|
|
docker-compose down
|
|
|
docker-compose build --no-cache
|
|
|
docker-compose up
|
|
|
```
|
|
|
|
|
|
#### 4. Prisma migrations out of sync
|
|
|
|
|
|
```bash
|
|
|
# Backend: sincronizar schema
|
|
|
npm run prisma:migrate deploy
|
|
|
npm run prisma:generate
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
**Última Revisão**: 19 de Outubro 2025
|
|
|
**Responsável**: AGES III (Arquitetura) + AGES IV (Gerência) |