Skip to content

Commit 02246ec

Browse files
committed
docs: atualiza arquitetura, banco e roadmap
- Clean Architecture e estrutura de código - Modelagem do banco (players, matches, teams) - PlayerScore, worker e fluxo da Riot API - design/dashboard-design.json e logo-design.json
1 parent 0fa19ab commit 02246ec

46 files changed

Lines changed: 5215 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
backend:
11+
name: Backend (Python)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install dependencies
22+
run: |
23+
cd app/api
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt -r requirements-dev.txt 2>/dev/null || pip install -r requirements.txt
26+
27+
- name: Lint (Ruff)
28+
run: |
29+
cd app/api
30+
pip install ruff
31+
ruff check .
32+
continue-on-error: true
33+
34+
- name: Format check (Black)
35+
run: |
36+
cd app/api
37+
pip install black
38+
black --check .
39+
continue-on-error: true
40+
41+
- name: Test
42+
run: |
43+
cd app/api
44+
pip install pytest httpx
45+
pytest -v --tb=short
46+
47+
frontend:
48+
name: Frontend (Next.js)
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Set up pnpm
54+
uses: pnpm/action-setup@v4
55+
with:
56+
version: 9
57+
58+
- name: Set up Node.js
59+
uses: actions/setup-node@v4
60+
with:
61+
node-version: "20"
62+
cache: "pnpm"
63+
cache-dependency-path: app/web/pnpm-lock.yaml
64+
65+
- name: Install dependencies
66+
run: |
67+
cd app/web
68+
pnpm install
69+
70+
- name: Lint
71+
run: |
72+
cd app/web
73+
pnpm run lint 2>/dev/null || echo "Lint script not configured"
74+
75+
- name: Build
76+
run: |
77+
cd app/web
78+
pnpm run build

.github/workflows/lint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Python - Ruff
17+
uses: astral-sh/setup-ruff@v4
18+
with:
19+
ruff-version: latest
20+
- run: ruff check app/api
21+
continue-on-error: true
22+
23+
- name: Node - pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 9
27+
28+
- name: Node - ESLint
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: "20"
32+
cache: "pnpm"
33+
cache-dependency-path: app/web/pnpm-lock.yaml
34+
35+
- run: |
36+
cd app/web
37+
pnpm install
38+
pnpm run lint 2>/dev/null || true
39+
continue-on-error: true

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version tag (e.g. v0.1.0)"
8+
required: true
9+
10+
jobs:
11+
create-release:
12+
name: Create Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Create release tag
20+
run: |
21+
git config user.name "github-actions[bot]"
22+
git config user.email "github-actions[bot]@users.noreply.github.com"
23+
TAG="${{ github.event.inputs.version }}"
24+
git tag -a "$TAG" -m "Release $TAG"
25+
git push origin "$TAG"

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@ dist
134134
!.yarn/sdks
135135
!.yarn/versions
136136

137+
# Python
138+
.venv/
139+
venv/
140+
__pycache__/
141+
*.py[cod]
142+
*.pyo
143+
.Python
144+
*.so
145+
137146
# Vite logs files
138147
vite.config.js.timestamp-*
139148
vite.config.ts.timestamp-*

README.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# DraftVision
2+
3+
> Plataforma de análise estratégica de jogadores e times de League of Legends para organizações de esports, analistas e coaches profissionais.
4+
5+
[![CI](https://github.com/sthev/DraftVision/actions/workflows/ci.yml/badge.svg)](https://github.com/sthev/DraftVision/actions/workflows/ci.yml)
6+
7+
## Objetivo
8+
9+
Centralizar análise de performance que hoje é feita em várias ferramentas (OP.GG, Excel, anotações manuais) em uma única plataforma com **análise estratégica**, **scouting** e **visão de time**.
10+
11+
## Público-alvo
12+
13+
| Perfil | Uso |
14+
|--------|-----|
15+
| **Organizações de esports** | Gestão completa de rosters, scouting global |
16+
| **Analistas de times** | Análise de sinergia, comparação entre jogadores |
17+
| **Coaches profissionais** | Monitoramento de rosters competitivos |
18+
| **Coaches de SoloQ** | Acompanhamento de jogadores em treinamento |
19+
20+
## Diferencial
21+
22+
Enquanto ferramentas atuais entregam **dados crus**, o DraftVision entrega:
23+
24+
-**Análise estratégica** com insights automáticos
25+
-**Scouting** com Hidden Talent Detector
26+
-**Visão de time** e análise de sinergia
27+
-**Análise de draft** e champion pool coletiva
28+
29+
## Planos
30+
31+
| Plano | Jogadores | Foco |
32+
|-------|-----------|------|
33+
| **Solo Coach** | até 10 | Perfil de jogador, evolução de performance |
34+
| **Team Analyst** | até 50 | Múltiplos times, análise de sinergia |
35+
| **Organization** | ilimitado | Scouting global, API, relatórios avançados |
36+
37+
## Stack técnica
38+
39+
| Camada | Tecnologia |
40+
|--------|------------|
41+
| **Backend** | Python, FastAPI, pandas, Redis |
42+
| **Frontend** | Next.js, Tailwind CSS, Chart.js |
43+
| **Banco** | PostgreSQL |
44+
| **Cache** | Redis (obrigatório — API Riot tem rate limit) |
45+
46+
## Estrutura do projeto
47+
48+
```
49+
draftvision/
50+
├── app/
51+
│ ├── api/ # Backend FastAPI
52+
│ │ ├── api/
53+
│ │ │ ├── riot/ # Integração Riot API
54+
│ │ │ ├── players/ # Módulo de jogadores
55+
│ │ │ ├── matches/ # Processamento de partidas
56+
│ │ │ ├── teams/ # Sistema de times
57+
│ │ │ ├── analytics/ # Análise e insights
58+
│ │ │ └── scouting/ # Scouting e Hidden Talent
59+
│ │ └── tests/
60+
│ └── web/ # Frontend Next.js
61+
│ ├── app/
62+
│ │ ├── dashboard/ # Visão geral
63+
│ │ ├── players/ # Perfis de jogadores
64+
│ │ ├── teams/ # Gestão de times
65+
│ │ ├── draft/ # Análise de draft
66+
│ │ └── reports/ # Relatórios
67+
│ └── components/
68+
├── docs/ # Documentação
69+
└── .github/workflows/ # CI/CD
70+
```
71+
72+
## Começando
73+
74+
### Pré-requisitos
75+
76+
- Python 3.11+
77+
- Node.js 20+
78+
- pnpm
79+
- PostgreSQL 15+
80+
- Redis 7+
81+
- Chave da [Riot Developer API](https://developer.riotgames.com/)
82+
83+
### Instalação
84+
85+
```bash
86+
# Clone o repositório
87+
git clone https://github.com/sthev/DraftVision.git
88+
cd DraftVision
89+
90+
# Backend
91+
cd app/api
92+
python -m venv .venv
93+
.venv\Scripts\activate # Windows
94+
# source .venv/bin/activate # Linux/macOS
95+
pip install -r requirements.txt
96+
cp .env.example .env # Configure suas variáveis
97+
98+
# Frontend
99+
cd ../web
100+
pnpm install
101+
cp .env.example .env.local
102+
```
103+
104+
### Executando
105+
106+
```bash
107+
# Terminal 1 - Redis (obrigatório)
108+
redis-server
109+
110+
# Terminal 2 - Backend
111+
cd app/api && uvicorn main:app --reload --port 8000
112+
113+
# Terminal 3 - Frontend
114+
cd app/web && pnpm dev
115+
```
116+
117+
## Documentação
118+
119+
- [Visão do produto](./docs/PRODUCT_VISION.md)
120+
- [Arquitetura](./docs/ARCHITECTURE.md)
121+
- [Modelo de negócio](./docs/BUSINESS_MODEL.md)
122+
- [Banco de dados](./docs/DATABASE.md)
123+
- [API Riot](./docs/API_RIOT.md)
124+
- [Algoritmos](./docs/ALGORITHMS.md)
125+
- [Worker](./docs/WORKER.md)
126+
- [Roadmap](./docs/ROADMAP.md)
127+
- [Desenvolvimento](./docs/DEVELOPMENT.md)
128+
- [Contribuindo](./docs/CONTRIBUTING.md)
129+
130+
## Design
131+
132+
- [Dashboard](./design/dashboard-design.json) — cores, layout, widgets
133+
- [Logo](./design/logo-design.json) — identidade visual
134+
135+
## Licença
136+
137+
MIT © Sthevan Santos

app/api/.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# DraftVision API - Environment
2+
# Copy to .env and fill in values
3+
4+
DATABASE_URL=postgresql+asyncpg://user:pass@localhost:5432/draftvision
5+
REDIS_URL=redis://localhost:6379/0
6+
RIOT_API_KEY=your-riot-api-key-here
7+
RIOT_REGION=br1
8+
LOG_LEVEL=INFO

app/api/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# DraftVision API modules

app/api/api/analytics/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Analytics module

app/api/api/matches/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Matches module

app/api/api/players/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Players module

0 commit comments

Comments
 (0)