g360-cli 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -12
- package/package.json +1 -1
- package/src/assets/brand/brand.json +1 -3
- package/src/assets/templates/ARCHITECTURE.md +50 -0
- package/src/assets/templates/lit-web/README.md +47 -0
- package/src/assets/templates/python-cli/README.md +47 -0
- package/src/assets/templates/python-customtkinter/README.md +45 -34
- package/src/assets/templates/python-flet/README.md +46 -66
- package/src/assets/templates/python-flet-migrate/README.md +35 -55
- package/src/assets/templates/solid-web/README.md +47 -0
- package/src/assets/templates/svelte-web/README.md +47 -0
- package/src/assets/templates/web-pwa/README.md +47 -0
- package/src/cli.js +16 -0
- package/src/commands/clean.js +2 -23
- package/src/commands/convert.js +1 -23
- package/src/commands/docs.js +815 -0
- package/src/commands/init.js +46 -4
- package/src/commands/lint.js +578 -0
- package/src/lib/file-utils.js +27 -0
- package/src/assets/brand/g360/logotypes/logo_g360_dark_b64.txt +0 -1
- package/src/assets/brand/g360/logotypes/logo_g360_light_b64.txt +0 -1
- package/src/lib/global-config.js +0 -260
- package/src/lib/i18n.js +0 -238
- package/src/lib/python_runner.js +0 -89
package/README.md
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
# g360-cli
|
|
2
2
|
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="src/assets/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="src/assets/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
3
8
|
> CLI tool for bootstrapping G360 projects with standardized structure, assets, and identity
|
|
4
9
|
|
|
5
10
|
[](https://www.npmjs.com/package/g360-cli)
|
|
6
11
|
[](https://opensource.org/licenses/MIT)
|
|
7
12
|
[](https://www.npmjs.com/package/g360-cli)
|
|
8
13
|
|
|
14
|
+
## ¿Cómo está organizado el proyecto?
|
|
15
|
+
|
|
16
|
+
```mermaid
|
|
17
|
+
flowchart TD
|
|
18
|
+
CLI["g360 CLI<br/>cli.js"]
|
|
19
|
+
CMD["Comandos<br/>init · bring · audit · ingest · scan · validate"]
|
|
20
|
+
LIB["Librerías<br/>manifest · auditor · validator · logger"]
|
|
21
|
+
ASSETS["Assets<br/>templates · brand · signature · ingestion"]
|
|
22
|
+
PY["g360-core (PyPI)<br/>commercial_engine · pipeline · batch_processor"]
|
|
23
|
+
ERP["Datos ERP<br/>.xls · .xlsx · .csv"]
|
|
24
|
+
|
|
25
|
+
CLI --> CMD
|
|
26
|
+
CMD --> LIB
|
|
27
|
+
CMD --> ASSETS
|
|
28
|
+
CMD --> PY
|
|
29
|
+
PY --> ERP
|
|
30
|
+
```
|
|
31
|
+
|
|
9
32
|
## Tabla de Contenidos
|
|
10
33
|
|
|
11
34
|
- [Descripción](#descripción)
|
|
@@ -20,6 +43,7 @@
|
|
|
20
43
|
- [Configuración](#configuración)
|
|
21
44
|
- [API](#api)
|
|
22
45
|
- [Estructura](#estructura)
|
|
46
|
+
- [Reglas de negocio](#reglas-de-negocio)
|
|
23
47
|
- [Scripts](#scripts)
|
|
24
48
|
- [Testing](#testing)
|
|
25
49
|
- [Contribución](#contribución)
|
|
@@ -71,7 +95,7 @@ CLI tool para el ecosistema G360 que permite inicializar proyectos con estructur
|
|
|
71
95
|
|
|
72
96
|
## Versión
|
|
73
97
|
|
|
74
|
-
**Current: v1.
|
|
98
|
+
**Current: v1.13.0** — [Ver en npm](https://www.npmjs.com/package/g360-cli)
|
|
75
99
|
|
|
76
100
|
---
|
|
77
101
|
|
|
@@ -92,7 +116,7 @@ npm install -g g360-cli
|
|
|
92
116
|
|
|
93
117
|
```bash
|
|
94
118
|
g360 --version
|
|
95
|
-
# → 1.
|
|
119
|
+
# → 1.13.0
|
|
96
120
|
|
|
97
121
|
g360 health
|
|
98
122
|
```
|
|
@@ -150,6 +174,7 @@ g360 init <nombre> [opciones]
|
|
|
150
174
|
| `-d, --dir <ruta>` | Directorio destino | `.` |
|
|
151
175
|
| `--dry-run` | Previsualizar sin crear | `false` |
|
|
152
176
|
| `--force` | Sobrescribir existente | `false` |
|
|
177
|
+
| `--brand` | Aplicar marca G360 (logo, colores, firma) después de init | `false` |
|
|
153
178
|
|
|
154
179
|
**Ejemplos:**
|
|
155
180
|
|
|
@@ -165,6 +190,9 @@ g360 init mi-script --template svelte-web --skill minimalista
|
|
|
165
190
|
|
|
166
191
|
# Preview sin crear
|
|
167
192
|
g360 init mi-proyecto --dry-run
|
|
193
|
+
|
|
194
|
+
# Crear proyecto con marca G360 aplicada automáticamente
|
|
195
|
+
g360 init mi-proyecto --brand
|
|
168
196
|
```
|
|
169
197
|
|
|
170
198
|
---
|
|
@@ -343,14 +371,25 @@ Motor de lógica de negocio para clasificación documental. Única fuente de ver
|
|
|
343
371
|
| `calculate_prices()` | PRECIO_BASE, RECARGO_UNITARIO, PRECIO_EFECTIVO |
|
|
344
372
|
| `parse_referencia()` | Descompone REFERENCIA "F01/204-56287" en tipo/serie/número |
|
|
345
373
|
|
|
346
|
-
**Clasificación de documentos
|
|
374
|
+
**Clasificación de documentos** (`classify_base` → primero, `resolve_document_relationships` → después para AJUSTE):
|
|
375
|
+
```
|
|
376
|
+
TPO_DOC CANTIDAD → CATEGORIA_OP SUBTIPO_AJUSTE (cruce vs índice)
|
|
377
|
+
F01/BDI/F03/... cualquiera → VENTA —
|
|
378
|
+
NC* ≠ 0 → DEVOLUCION —
|
|
379
|
+
NC* = 0 → AJUSTE (ver reglas de cruce abajo)
|
|
380
|
+
ND* cualquiera → AJUSTE (ver reglas de cruce abajo)
|
|
347
381
|
```
|
|
348
|
-
|
|
349
|
-
F01/BDI ≠0 = VENTA —
|
|
350
|
-
NCR ≠0 = DEVOLUCION —
|
|
351
|
-
NCR 0 ≠0 AJUSTE PRECIO_LINEA / SIN_BASE
|
|
352
|
-
NDB 0 ≠0 AJUSTE CARGO_FIJO / SIN_BASE
|
|
382
|
+
Subtipos de AJUSTE (`resolve_document_relationships` cruza `REFERENCIA` contra `build_invoice_index`):
|
|
353
383
|
```
|
|
384
|
+
Clave con SKU coincide CANTIDAD_FAE = 0 → CARGO_FIJO
|
|
385
|
+
Clave con SKU coincide CANTIDAD_FAE ≈ CANT_FACT → PRECIO_LINEA
|
|
386
|
+
Clave con SKU coincide CANTIDAD_FAE < CANT_FACT → PRECIO_PARCIAL
|
|
387
|
+
Clave con SKU coincide CANTIDAD_FAE > CANT_FACT → SIN_BASE
|
|
388
|
+
Clave no coincide CANTIDAD_FAE = 1 → CARGO_FIJO
|
|
389
|
+
Clave no coincide CANTIDAD_FAE ≠ 1 → SIN_BASE
|
|
390
|
+
Sin facturas en dataset — → SIN_BASE (todo AJUSTE)
|
|
391
|
+
```
|
|
392
|
+
> Ver detalle completo en [`BUSINESS_RULES.md`](./BUSINESS_RULES.md).
|
|
354
393
|
|
|
355
394
|
#### `batch_processor.py`
|
|
356
395
|
|
|
@@ -1091,6 +1130,94 @@ g360 addon remove @google/design.md
|
|
|
1091
1130
|
|
|
1092
1131
|
---
|
|
1093
1132
|
|
|
1133
|
+
### `g360 docs`
|
|
1134
|
+
|
|
1135
|
+
Genera o actualiza la documentación del proyecto.
|
|
1136
|
+
|
|
1137
|
+
```bash
|
|
1138
|
+
g360 docs [level] [opciones]
|
|
1139
|
+
```
|
|
1140
|
+
|
|
1141
|
+
**Niveles:**
|
|
1142
|
+
|
|
1143
|
+
| Nivel | Archivo generado | Descripción |
|
|
1144
|
+
|---|---|---|
|
|
1145
|
+
| `readme` (default) | `README.md` | Logo, diagrama Mermaid, quick start, identidad, firma |
|
|
1146
|
+
| `architecture` | `ARCHITECTURE.md` | Diagrama de arquitectura general + flujo de datos |
|
|
1147
|
+
| `business-rules` | `BUSINESS_RULES.md` | Reglas de negocio (solo Python con commercial_engine) |
|
|
1148
|
+
| `dependencies` | `docs/generated/dependencies.mmd` | Dependencias entre módulos |
|
|
1149
|
+
| `classes` | `docs/generated/classes.mmd` | Relaciones entre clases e interfaces |
|
|
1150
|
+
| `code-graph` | `docs/generated/code_graph.mmd` | Grafo de código (proyectos grandes) |
|
|
1151
|
+
| `all` | Todos los anteriores | Todos los niveles aplicables |
|
|
1152
|
+
|
|
1153
|
+
**Opciones:**
|
|
1154
|
+
|
|
1155
|
+
| Opción | Descripción | Valor por defecto |
|
|
1156
|
+
|--------|-------------|-------------------|
|
|
1157
|
+
| `--level <nivel>` | Nivel de documentación | `readme` |
|
|
1158
|
+
| `--project <ruta>` | Ruta del proyecto | `.` |
|
|
1159
|
+
| `--dry-run` | Previsualizar sin escribir | `false` |
|
|
1160
|
+
|
|
1161
|
+
**Ejemplos:**
|
|
1162
|
+
|
|
1163
|
+
```bash
|
|
1164
|
+
# Generar README con diagrama
|
|
1165
|
+
g360 docs
|
|
1166
|
+
|
|
1167
|
+
# Generar toda la documentación
|
|
1168
|
+
g360 docs --level all
|
|
1169
|
+
|
|
1170
|
+
# Generar BUSINESS_RULES para un proyecto Python
|
|
1171
|
+
g360 docs --level business-rules --project ./mi-proyecto
|
|
1172
|
+
|
|
1173
|
+
# Previsualizar sin escribir
|
|
1174
|
+
g360 docs --level all --dry-run
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1177
|
+
---
|
|
1178
|
+
|
|
1179
|
+
### `g360 lint`
|
|
1180
|
+
|
|
1181
|
+
Revisa la consistencia de nomenclatura, detecta funciones duplicadas y verifica la sintaxis del proyecto.
|
|
1182
|
+
|
|
1183
|
+
```bash
|
|
1184
|
+
g360 lint [level] [opciones]
|
|
1185
|
+
```
|
|
1186
|
+
|
|
1187
|
+
**Niveles:**
|
|
1188
|
+
|
|
1189
|
+
| Nivel | Qué revisa |
|
|
1190
|
+
|---|---|
|
|
1191
|
+
| `naming` | Nomenclatura de funciones, clases, variables y archivos |
|
|
1192
|
+
| `duplicates` | Funciones duplicadas con nombres iguales o diferentes |
|
|
1193
|
+
| `syntax` | Errores de sintaxis en archivos JS y Python |
|
|
1194
|
+
| `structure` | Archivos faltantes (README.md, skill.json, manifest) |
|
|
1195
|
+
| `all` (default) | Todas las anteriores |
|
|
1196
|
+
|
|
1197
|
+
**Opciones:**
|
|
1198
|
+
|
|
1199
|
+
| Opción | Descripción | Valor por defecto |
|
|
1200
|
+
|--------|-------------|-------------------|
|
|
1201
|
+
| `--level <nivel>` | Nivel de lint | `all` |
|
|
1202
|
+
| `--project <ruta>` | Ruta del proyecto | `.` |
|
|
1203
|
+
|
|
1204
|
+
**Ejemplos:**
|
|
1205
|
+
|
|
1206
|
+
```bash
|
|
1207
|
+
# Revisar todo el proyecto
|
|
1208
|
+
g360 lint
|
|
1209
|
+
|
|
1210
|
+
# Solo revisar nomenclatura
|
|
1211
|
+
g360 lint --level naming
|
|
1212
|
+
|
|
1213
|
+
# Revisar un proyecto específico
|
|
1214
|
+
g360 lint --project ./mi-proyecto
|
|
1215
|
+
```
|
|
1216
|
+
|
|
1217
|
+
**Puntaje:** `g360 lint` asigna un puntaje de 0 a 100 basado en la cantidad de hallazgos.
|
|
1218
|
+
|
|
1219
|
+
---
|
|
1220
|
+
|
|
1094
1221
|
## Integración con OpenCode
|
|
1095
1222
|
|
|
1096
1223
|
g360-cli incluye integración con **OpenCode** para desarrollo asistido por IA. Esta integración permite que los agentes de IA tengan acceso a los recursos de g360-cli durante el desarrollo.
|
|
@@ -1220,10 +1347,12 @@ Para mantener la integración con OpenCode actualizada:
|
|
|
1220
1347
|
- [GitHub](https://github.com/carloscus/g360-cli)
|
|
1221
1348
|
- [Documentación](#)
|
|
1222
1349
|
- [Reportar Issue](https://github.com/carloscus/g360-cli/issues)
|
|
1223
|
-
|
|
1224
1350
|
---
|
|
1225
|
-
|
|
1351
|
+
|
|
1352
|
+
**Marca**: G360 · Microherramientas para apoyo CRM y datos en escritorio
|
|
1226
1353
|
**Isotipo**: 3 puntos verticales paralelos (gris-verde-gris) + chevron `>`
|
|
1227
|
-
**
|
|
1228
|
-
**Desarrollo**: Con asistencia de herramientas de código IA (Vibe Code)
|
|
1354
|
+
**Signature**: G360 by ccusi (`mode: own`, definido en `brand/g360/signature`)
|
|
1229
1355
|
**Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
1356
|
+
|
|
1357
|
+
> Identidad generada desde `src/assets/brand/brand.json` (Brand System v2.0.0).
|
|
1358
|
+
> El logo arriba usa `<picture>` con `prefers-color-scheme` para light/dark.
|
package/package.json
CHANGED
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
"assets": {
|
|
11
11
|
"logotypes": [
|
|
12
12
|
"logotypes/logo-g360-dark.svg",
|
|
13
|
-
"logotypes/logo-g360-light.svg"
|
|
14
|
-
"logotypes/logo_g360_dark_b64.txt",
|
|
15
|
-
"logotypes/logo_g360_light_b64.txt"
|
|
13
|
+
"logotypes/logo-g360-light.svg"
|
|
16
14
|
],
|
|
17
15
|
"favicons": {
|
|
18
16
|
"svg": "favicons/favicon.svg",
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# ARCHITECTURE.md
|
|
2
|
+
|
|
3
|
+
> Arquitectura del proyecto. Generado automaticamente por `g360 docs --level architecture`.
|
|
4
|
+
|
|
5
|
+
## Arquitectura General
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
flowchart TD
|
|
9
|
+
subgraph Frontend["Frontend"]
|
|
10
|
+
Index["index.html / App"]
|
|
11
|
+
Main["Main entry"]
|
|
12
|
+
Components["Components"]
|
|
13
|
+
Styles["Styles"]
|
|
14
|
+
end
|
|
15
|
+
subgraph Assets["Assets"]
|
|
16
|
+
Brand["Brand / logo"]
|
|
17
|
+
Signature["Signature"]
|
|
18
|
+
Favicon["Favicon"]
|
|
19
|
+
end
|
|
20
|
+
subgraph Config["Config"]
|
|
21
|
+
Skill["skill.json"]
|
|
22
|
+
Manifest["manifest"]
|
|
23
|
+
end
|
|
24
|
+
Frontend --> Assets
|
|
25
|
+
Frontend --> Config
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Flujo de Datos
|
|
29
|
+
|
|
30
|
+
```mermaid
|
|
31
|
+
flowchart LR
|
|
32
|
+
INPUT["Entrada del usuario"] --> PROCESS["Procesamiento"]
|
|
33
|
+
PROCESS --> VALIDATE["Validacion"]
|
|
34
|
+
VALIDATE --> OUTPUT["Resultado"]
|
|
35
|
+
OUTPUT --> PERSIST["Persistencia"]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Componentes
|
|
39
|
+
|
|
40
|
+
| Componente | Responsabilidad |
|
|
41
|
+
|---|---|
|
|
42
|
+
| Entry point | Punto de inicio de la aplicacion |
|
|
43
|
+
| Core | Logica de negocio y configuracion |
|
|
44
|
+
| UI | Presentacion e interaccion con el usuario |
|
|
45
|
+
| Assets | Recursos estaticos (imagenes, iconos, marca) |
|
|
46
|
+
| Config | Archivos de configuracion (skill.json, manifest) |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
*Generado por `g360 docs --level architecture`*
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Mi Proyecto G360
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
> Aplicacion web G360 con Lit Web Components
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install
|
|
14
|
+
npm run dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Estructura del Proyecto
|
|
18
|
+
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart TD
|
|
21
|
+
Frontend["Frontend<br/>Lit Web Components"]
|
|
22
|
+
Assets["Assets<br/>brand · signature · favicon"]
|
|
23
|
+
Config["Config<br/>skill.json"]
|
|
24
|
+
|
|
25
|
+
Frontend --> Assets
|
|
26
|
+
Frontend --> Config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Identidad de Marca
|
|
30
|
+
|
|
31
|
+
| Elemento | Valor |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Marca | G360 |
|
|
34
|
+
| Color primario | `#00d084` |
|
|
35
|
+
| Signature mode | `powered` |
|
|
36
|
+
| Signature text | "powered by G360" |
|
|
37
|
+
|
|
38
|
+
## Footer
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<g360-signature mode="powered"></g360-signature>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
47
|
+
**Signature**: powered by G360 · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Mi Proyecto G360 CLI
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
> Aplicacion CLI G360 con Python y argparse
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
uv sync
|
|
14
|
+
uv run python src/main.py --help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Estructura del Proyecto
|
|
18
|
+
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart TD
|
|
21
|
+
CLI["CLI<br/>argparse"]
|
|
22
|
+
Core["Core<br/>business logic"]
|
|
23
|
+
Config["Config<br/>skill.json"]
|
|
24
|
+
|
|
25
|
+
CLI --> Core
|
|
26
|
+
CLI --> Config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Identidad de Marca
|
|
30
|
+
|
|
31
|
+
| Elemento | Valor |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Marca | G360 |
|
|
34
|
+
| Color primario | `#00d084` |
|
|
35
|
+
| Signature mode | `powered` |
|
|
36
|
+
| Signature text | "powered by G360" |
|
|
37
|
+
|
|
38
|
+
## Footer
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
G360 by ccusi
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
47
|
+
**Signature**: powered by G360 · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
@@ -1,48 +1,59 @@
|
|
|
1
|
-
# G360
|
|
1
|
+
# Mi Proyecto G360 CustomTkinter
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
mi-proyecto/
|
|
7
|
-
├── src/
|
|
8
|
-
│ ├── main.py # Entry point
|
|
9
|
-
│ └── core/
|
|
10
|
-
│ ├── skill.json # Configuracion G360
|
|
11
|
-
│ └── g360_theme.py # Theme engine
|
|
12
|
-
├── assets/images/
|
|
13
|
-
├── skill.json
|
|
14
|
-
├── pyproject.toml
|
|
15
|
-
├── run.bat # Ejecutar app
|
|
16
|
-
├── build.bat # Build EXE (PyInstaller)
|
|
17
|
-
└── README.md
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Requisitos
|
|
8
|
+
> Aplicacion de escritorio G360 con CustomTkinter (tema oscuro)
|
|
21
9
|
|
|
22
|
-
|
|
23
|
-
- **uv**: https://docs.astral.sh/uv/
|
|
24
|
-
|
|
25
|
-
## Ejecucion
|
|
10
|
+
## Quick Start
|
|
26
11
|
|
|
27
12
|
```bash
|
|
28
|
-
|
|
13
|
+
uv sync
|
|
14
|
+
uv run python src/main.py
|
|
29
15
|
```
|
|
30
16
|
|
|
31
|
-
##
|
|
17
|
+
## Estructura del Proyecto
|
|
32
18
|
|
|
33
|
-
```
|
|
34
|
-
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart TD
|
|
21
|
+
UI["UI<br/>CustomTkinter"]
|
|
22
|
+
Core["Core<br/>business logic"]
|
|
23
|
+
Theme["Theme<br/>G360Theme"]
|
|
24
|
+
|
|
25
|
+
UI --> Core
|
|
26
|
+
UI --> Theme
|
|
35
27
|
```
|
|
36
28
|
|
|
37
|
-
|
|
29
|
+
## Theme y Colores
|
|
38
30
|
|
|
39
|
-
|
|
31
|
+
| Token | Color | Uso |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `bg` | `#0b1220` | Fondo principal |
|
|
34
|
+
| `surface` | `#1a2332` | Cards, contenedores |
|
|
35
|
+
| `accent` | `#00d084` | Verde G360 primary |
|
|
36
|
+
| `text` | `#f0f4f8` | Texto principal |
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
## Identidad de Marca
|
|
42
39
|
|
|
43
|
-
|
|
|
40
|
+
| Elemento | Valor |
|
|
44
41
|
|---|---|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
42
|
+
| Marca | G360 |
|
|
43
|
+
| Color primario | `#00d084` |
|
|
44
|
+
| Signature mode | `powered` |
|
|
45
|
+
| Signature text | "powered by G360" |
|
|
46
|
+
|
|
47
|
+
## Footer
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
# Logo embebido como base64 (sin archivos externos)
|
|
51
|
+
from core.g360_theme import G360Theme
|
|
52
|
+
theme = G360Theme()
|
|
53
|
+
logo = theme.logo_base64()
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
59
|
+
**Signature**: powered by G360 · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
@@ -1,61 +1,37 @@
|
|
|
1
|
-
# G360
|
|
1
|
+
# Mi Proyecto G360 Flet
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
├── src/
|
|
8
|
-
│ ├── main.py # Entry point: ft.run(main)
|
|
9
|
-
│ ├── core/
|
|
10
|
-
│ │ ├── skill.json # Configuracion del skill G360
|
|
11
|
-
│ │ └── g360_theme.py # Theme engine (lee colores de skill.json)
|
|
12
|
-
│ ├── ui/
|
|
13
|
-
│ │ └── __init__.py # Componentes Flet (PascalCase)
|
|
14
|
-
│ └── export/
|
|
15
|
-
│ └── __init__.py # Reportes Excel (openpyxl)
|
|
16
|
-
├── assets/
|
|
17
|
-
│ └── images/
|
|
18
|
-
│ └── app.ico # Icono de la app
|
|
19
|
-
├── skill.json # Skill G360 aplicado
|
|
20
|
-
├── pyproject.toml # Dependencias (uv sync)
|
|
21
|
-
├── run.bat # Ejecutar app
|
|
22
|
-
├── build.bat # Build EXE standalone
|
|
23
|
-
└── README.md
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Requisitos
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
27
7
|
|
|
28
|
-
|
|
29
|
-
- **uv**: Gestor de paquetes Python (https://docs.astral.sh/uv/)
|
|
30
|
-
- **Windows**: 10/11 x64
|
|
8
|
+
> Aplicacion de escritorio G360 con Flet (ERP)
|
|
31
9
|
|
|
32
|
-
##
|
|
10
|
+
## Quick Start
|
|
33
11
|
|
|
34
|
-
### Con uv (recomendado)
|
|
35
|
-
```bash
|
|
36
|
-
run.bat
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Manual
|
|
40
12
|
```bash
|
|
13
|
+
uv sync
|
|
41
14
|
uv run python src/main.py
|
|
42
15
|
```
|
|
43
16
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## Build Windows (EXE standalone)
|
|
17
|
+
## Estructura del Proyecto
|
|
47
18
|
|
|
48
|
-
```
|
|
49
|
-
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart TD
|
|
21
|
+
UI["UI<br/>Flet widgets"]
|
|
22
|
+
Core["Core<br/>business logic"]
|
|
23
|
+
Theme["Theme<br/>G360Theme"]
|
|
24
|
+
Export["Export<br/>openpyxl"]
|
|
25
|
+
Signature["Signature<br/>g360_signature"]
|
|
26
|
+
|
|
27
|
+
UI --> Core
|
|
28
|
+
UI --> Theme
|
|
29
|
+
Core --> Export
|
|
30
|
+
UI --> Signature
|
|
50
31
|
```
|
|
51
32
|
|
|
52
|
-
Genera ejecutable en `build/windows/` usando `flet build`.
|
|
53
|
-
|
|
54
33
|
## Theme y Colores
|
|
55
34
|
|
|
56
|
-
Los colores se definen en `src/core/skill.json` y se cargan via `G360Theme`.
|
|
57
|
-
|
|
58
|
-
### Paleta G360
|
|
59
35
|
| Token | Color | Uso |
|
|
60
36
|
|---|---|---|
|
|
61
37
|
| `bg` | `#0b1220` | Fondo principal |
|
|
@@ -63,27 +39,31 @@ Los colores se definen en `src/core/skill.json` y se cargan via `G360Theme`.
|
|
|
63
39
|
| `accent` | `#00d084` | Verde G360 primary |
|
|
64
40
|
| `text` | `#f0f4f8` | Texto principal |
|
|
65
41
|
| `muted` | `#94a3b8` | Texto secundario |
|
|
66
|
-
| `success` | `#22c55e` | Exito/positivo |
|
|
67
|
-
| `warning` | `#f59e0b` | Advertencia |
|
|
68
|
-
| `error` | `#ef4444` | Error/peligro |
|
|
69
|
-
|
|
70
|
-
## Snippets Flet
|
|
71
|
-
|
|
72
|
-
- `flet-page` - Configuracion de pagina con tema
|
|
73
|
-
- `flet-card` - Tarjetas con estilo G360
|
|
74
|
-
- `flet-button` - Botones G360
|
|
75
|
-
- `flet-kpi-card` - Card de KPI para dashboards
|
|
76
|
-
- `flet-drop-zone` - Zona de carga de archivos
|
|
77
|
-
- `flet-datatable` - Tablas de datos
|
|
78
|
-
- `flet-dialog` - Dialogos modales
|
|
79
|
-
- `flet-loading-overlay` - Overlay de carga
|
|
80
|
-
- `flet-footer-signature` - Footer con branding G360
|
|
81
42
|
|
|
82
43
|
## Lineamientos de Arquitectura
|
|
83
44
|
|
|
84
|
-
1. **src/core/**:
|
|
85
|
-
2. **src/ui/**: Importa
|
|
86
|
-
3. **src/export/**: Importa
|
|
87
|
-
4. **
|
|
88
|
-
|
|
89
|
-
|
|
45
|
+
1. **src/core/**: Solo logica de negocio, sin importar flet
|
|
46
|
+
2. **src/ui/**: Importa flet y core. Solo presentacion
|
|
47
|
+
3. **src/export/**: Importa openpyxl y core. Solo reportes
|
|
48
|
+
4. **Colores**: Siempre via G360Theme. Nunca hardcodear
|
|
49
|
+
|
|
50
|
+
## Identidad de Marca
|
|
51
|
+
|
|
52
|
+
| Elemento | Valor |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Marca | G360 |
|
|
55
|
+
| Color primario | `#00d084` |
|
|
56
|
+
| Signature mode | `own` |
|
|
57
|
+
| Signature text | "G360 Desktop" |
|
|
58
|
+
|
|
59
|
+
## Footer
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from core.components.g360_signature import g360_footer
|
|
63
|
+
page.add(g360_footer())
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
69
|
+
**Signature**: G360 Desktop · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|