2026-05-08 · DATA ROOM
Veritas Agent Api
Ship Spring Boot APIs at the speed of thought
ELEVATOR PITCH
AI-powered code generation platform that transforms natural language into production-ready Spring Boot microservices in seconds.
VALUE PROPOSITION
10x faster backend development by eliminating boilerplate and automating architecture decisions.
EXPLAINER.md
Veritas Agent API
AI-powered compliance auditing platform for Fintech and Healthtech teams.
Concepto
Los equipos de cumplimiento se ahogan en regulaciones (HIPAA, GDPR, PCI-DSS). Veritas Agent automatiza la auditoría de documentos empresariales contra un corpus regulatorio usando RAG + LLM. El resultado: un puntaje de riesgo [0–100] con hallazgos específicos por cláusula y referencias exactas a artículos regulatorios.
Arquitectura
┌─────────────┐ JWT ┌────────────────────────────────────────────┐
│ Cliente │──────────►│ Spring Boot 4 / Java 25 │
│ (HTTP/REST)│◄──────────│ │
└─────────────┘ │ AuthController FrameworkController │
│ DocumentController AuditController │
│ DashboardController │
│ ↓ Services │
│ UserService FrameworkService │
│ DocumentService ComplianceAuditService │
│ EmbeddingService DashboardService │
│ ↓ │
│ ┌─────────────┐ ┌────────────────────┐ │
│ │ H2 / PG DB │ │ OpenAI API (opt) │ │
│ │ JPA/Hibern. │ │ Embeddings + Chat │ │
│ └─────────────┘ └────────────────────┘ │
└────────────────────────────────────────────────┘
Flujo RAG
- Ingest — usuario sube texto de documento regulatorio → se divide en chunks de 500 chars (solapamiento 50).
- Embed — cada chunk se vectoriza via OpenAI embeddings (mock determinístico si no hay clave).
- Store — vector JSON almacenado en
regulatory_chunks.embedding_json. - Audit — documento empresarial entra → se vectoriza → cosine similarity contra todos los chunks del framework → top-5 chunks forman el contexto.
- LLM — prompt estructurado (system + user) enviado a GPT-4o → respuesta JSON con %%INLINE1%%, %%INLINE2%%, %%INLINE3%%, %%INLINE4%%.
- Score — CRITICAL=25pts, HIGH=15pts, MEDIUM=8pts, LOW=3pts → capped at 100.
- Persist — %%INLINE5%% + %%INLINE6%% guardados en DB.
Endpoints
Auth (público)
| Método | Path | Descripción |
|---|---|---|
| POST | /api/auth/register | Registro + devuelve JWT |
| POST | /api/auth/login | Login + devuelve JWT |
Frameworks (requiere JWT)
| Método | Path | Descripción |
|---|---|---|
| POST | /api/v1/frameworks | Crear framework (ej. "HIPAA USA") |
| GET | /api/v1/frameworks | Listar frameworks del usuario |
| GET | /api/v1/frameworks/{id} | Obtener por ID |
| PUT | /api/v1/frameworks/{id} | Actualizar metadata |
| DELETE | /api/v1/frameworks/{id} | Eliminar framework y sus documentos |
Documents (requiere JWT)
| Método | Path | Descripción |
|---|---|---|
| POST | /api/v1/frameworks/{fwId}/documents | Ingestar documento regulatorio (202) |
| GET | /api/v1/frameworks/{fwId}/documents | Listar documentos del framework |
| GET | /api/v1/documents/{id} | Obtener documento por ID |
| DELETE | /api/v1/documents/{id} | Eliminar documento y sus chunks |
Audits (requiere JWT)
| Método | Path | Descripción |
|---|---|---|
| POST | /api/v1/audits | Ejecutar auditoría de cumplimiento (RAG + LLM) |
| GET | /api/v1/audits | Listar auditorías del usuario |
| GET | /api/v1/audits/{id} | Obtener auditoría con hallazgos detallados |
Dashboard (requiere JWT)
| Método | Path | Descripción |
|---|---|---|
| GET | /api/v1/dashboard | Métricas de riesgo agregadas + historial |
Cómo Ejecutar
Requisitos
- Java 25+
- Maven 3.9+
Dev (H2 en memoria, mock embeddings)
cd solutions/2026-05-08-veritas-agent-api
mvn spring-boot:run
La aplicación arranca en http://localhost:8080 con H2 en memoria. Sin clave OpenAI, los embeddings son mocks determinísticos y el análisis usa reglas keyword-based.
Con OpenAI real
mvn spring-boot:run \
-Dspring-boot.run.jvmArguments="-Dveritas.ai.openai-api-key=sk-..."
O en application.yml:
veritas:
ai:
openai-api-key: sk-your-key-here
llm-model: gpt-4o
embedding-model: text-embedding-3-small
jwt:
secret: your-256-bit-secret-here
expiration: 86400000
Con PostgreSQL
spring:
datasource:
url: jdbc:postgresql://localhost:5432/veritas
username: veritas
password: veritas
jpa:
hibernate:
ddl-auto: update
Ejemplo rápido
# 1. Registrar usuario
curl -s -X POST http://localhost:8080/api/auth/register \
-H "Content-Type: application/json" \
-d '{"username":"alice","email":"alice@corp.com","password":"secret123"}' | jq .
# 2. Login → guardar token
TOKEN=$(curl -s -X POST http://localhost:8080/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"alice","password":"secret123"}' | jq -r .token)
# 3. Crear framework GDPR
FW=$(curl -s -X POST http://localhost:8080/api/v1/frameworks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"GDPR Europe","description":"EU General Data Protection Regulation","jurisdiction":"European Union","sector":"Fintech"}' | jq -r .id)
# 4. Ingestar documento regulatorio
curl -s -X POST "http://localhost:8080/api/v1/frameworks/$FW/documents" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"filename":"gdpr_core.txt","contentType":"text/plain","content":"Article 6 - Lawfulness of processing. Processing shall be lawful only if and to the extent that at least one of the following applies: the data subject has given consent. Article 17 - Right to erasure. The data subject shall have the right to obtain from the controller the erasure of personal data."}'
# 5. Auditar documento empresarial
curl -s -X POST http://localhost:8080/api/v1/audits \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"documentName\":\"Privacy Policy v2\",\"documentContent\":\"We collect personal data without consent and retain data indefinitely. We may sell user data to advertising partners.\",\"frameworkId\":$FW}" | jq .
# 6. Dashboard
curl -s http://localhost:8080/api/v1/dashboard \
-H "Authorization: Bearer $TOKEN" | jq .
Análisis de Negocio
Propuesta de Valor
- ROI inmediato: automatiza semanas de auditoría manual en segundos.
- Reducción de riesgo: multas GDPR pueden alcanzar €20M o 4% del revenue global.
- Mercado (TAM): $50B+ en compliance software globalmente, creciendo 13% CAGR.
Modelo de Monetización (B2B SaaS)
| Tier | Precio/mes | Documentos/mes | Frameworks activos |
|---|---|---|---|
| Starter | $299 | 50 | 2 |
| Growth | $999 | 300 | 10 |
| Scale | $3,499 | Unlimited | Unlimited |
Target
- Compliance Officers en startups Fintech/Healthtech (Series A–C).
- Equipos legales con 2–10 personas gestionando múltiples jurisdicciones.
Ventaja Competitiva
- RAG sobre corpus propio → respuestas fundamentadas, no alucinaciones genéricas.
- Multi-framework por tenant → un cliente puede gestionar HIPAA + GDPR + PCI-DSS simultáneamente.
- Audit trail completo con hallazgos por cláusula → defensible ante reguladores.
Referencias
MVP FEATURES
- 01Natural language to REST endpoint generator
- 02JPA entity scaffolding
- 03OpenAPI spec auto-generation
- 04Docker Compose export
“The AI that speaks fluent Java”
Start Building Free
Flowforge Ai
82AI-powered code generation platform that transforms natural language into production-ready Spring Boot microservices in seconds.
Insight Pilot Api
82AI-powered code generation platform that transforms natural language into production-ready Spring Boot microservices in seconds.
Finshield Ai Api
82AI-powered code generation platform that transforms natural language into production-ready Spring Boot microservices in seconds.