Initial commit: Horux Strategy Platform

- Laravel 11 backend with API REST
- React 18 + TypeScript + Vite frontend
- Multi-parser architecture for accounting systems (CONTPAQi, Aspel, SAP)
- 27+ financial metrics calculation
- PDF report generation with Browsershot
- Complete documentation (10 documents)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 22:24:00 -06:00
commit 4c3dc94ff2
107 changed files with 10701 additions and 0 deletions

107
backend/README.md Normal file
View File

@@ -0,0 +1,107 @@
# Horux Strategy Platform - Backend
API REST con Laravel 11 para la plataforma de reportes financieros.
## Requisitos
- PHP 8.2+
- Composer
- MySQL 8.0+ o PostgreSQL 14+
- Node.js 18+ (para Browsershot/PDF)
## Instalación
```bash
# Instalar dependencias
composer install
# Copiar configuración
cp .env.example .env
# Generar key
php artisan key:generate
# Configurar base de datos en .env
# DB_DATABASE=horux_strategy
# DB_USERNAME=root
# DB_PASSWORD=
# Ejecutar migraciones y seeders
php artisan migrate --seed
# Crear link storage
php artisan storage:link
# Iniciar servidor
php artisan serve
```
## Credenciales por defecto
- **Admin**: admin@horux360.com / password
## Endpoints principales
### Autenticación
- `POST /api/login` - Iniciar sesión
- `POST /api/logout` - Cerrar sesión
- `GET /api/user` - Usuario actual
### Clientes
- `GET /api/clientes` - Listar clientes
- `POST /api/clientes` - Crear cliente
- `GET /api/clientes/{id}` - Ver cliente
- `PUT /api/clientes/{id}` - Actualizar cliente
- `DELETE /api/clientes/{id}` - Eliminar cliente
### Balanzas
- `GET /api/clientes/{id}/balanzas` - Listar balanzas
- `POST /api/clientes/{id}/balanzas` - Subir balanza
- `GET /api/balanzas/{id}/cuentas` - Ver cuentas
- `PUT /api/balanzas/{id}/exclusiones` - Actualizar exclusiones
### Reportes
- `GET /api/clientes/{id}/reportes` - Listar reportes
- `POST /api/clientes/{id}/reportes` - Generar reporte
- `GET /api/reportes/{id}` - Ver reporte
- `GET /api/reportes/{id}/pdf` - Descargar PDF
### Administración (solo admin)
- `GET/POST/PUT/DELETE /api/admin/usuarios`
- `GET/POST/PUT/DELETE /api/admin/giros`
- `GET/POST/PUT/DELETE /api/admin/umbrales`
- `GET/POST/PUT/DELETE /api/admin/reglas-mapeo`
## Estructura de carpetas
```
app/
├── Http/Controllers/
│ ├── AuthController.php
│ ├── ClienteController.php
│ ├── BalanzaController.php
│ ├── CuentaController.php
│ ├── ReporteController.php
│ └── Admin/
├── Models/
├── Services/
│ ├── Parsers/
│ │ ├── ParserInterface.php
│ │ ├── ContpaqiParser.php
│ │ ├── GenericoParser.php
│ │ └── DetectorFormato.php
│ ├── ClasificadorCuentas.php
│ ├── CalculadorMetricas.php
│ └── GeneradorPdf.php
└── ...
```
## Agregar nuevo parser
1. Crear clase en `app/Services/Parsers/` implementando `ParserInterface`
2. Registrar en `DetectorFormato::__construct()`
3. Agregar reglas de mapeo en seeder
## Licencia
Propietario - Horux 360