1.6 KiB
1.6 KiB
AGENTS.md
Project
- Go 1.26.1
- No external dependencies yet
- Entry point:
main.go
Architecture
proyecto/
├── api/ → HTTP exposure, endpoints, routing
├── internal/ → business logic, validation, normalization
└── verifactu/ → AEAT communication, XML, signing, crypto chaining
VeriFactu Protocol
- Transport: SOAP 1.1 / HTTPS
- Format: XML (UTF-8), document/literal
- Auth: Qualified electronic certificate (.p12)
- Hash: SHA-256, hex uppercase, chained with previous record
- Max records per request: 1,000
- Environments: Testing (sandbox) / Production
- Current: Testing only
- Config: Change via config file or env var (not code)
- PDF generation: Handled by Dolibarr (not this API's responsibility)
VeriFactu Documentation
See Documentacion de Verifactu/ folder:
01_que_es_verifactu.md- Overview, legal framework02_como_funciona.md- Flow, operations, responses03_entornos_y_urls.md- URLs for test/prod, XSD, WSDL04_encadenamiento_hash.md- Crypto chaining, hash calculation05_estructura_xml.md- XML structure, fields06_operaciones.md- Alta, anulación, subsanación07_consultas.md- Query sent records08_errores_y_respuestas.md- Error codes09_control_de_flujo.md- Rate limits10_pasar_a_produccion.md- Prod migration steps
Dependencies
- Use Go modules (
go.mod), no vendoring
Pending Decisions (to discuss)
- Exact input JSON format
- Authentication mechanism
- Persistence (database, file, etc.)
- Documentation language