Projects / Engineering Works / PRJ-003
Tribuna Sicura
A secure platform for law firms to create, sign, store and share sensitive legal documents — early stage
Tribuna Sicura is a platform for law firms and corporate legal departments to create, sign, store and share sensitive legal documents with strict access control. The intended flow starts in Microsoft Word and ends in an encrypted PDF, signed with an ICP-Brasil certificate (PAdES) and opened only inside the platform's secure reader.
It is an early-stage personal project. Only the domain core exists so far, and everything else is planned. I keep that status explicit instead of describing the product as if it were finished.
My role
Author and maintainer. I design the domain, write the specifications and implement the code.
Status
| Area | State |
|---|---|
| Domain core and tenant isolation (organization, user, membership, document) | Implemented, with tests |
| Authentication, 2FA and sessions | Planned |
| Word add-in and secure PDF export | Planned |
| Key and certificate vault, PAdES signing | Planned |
| Secure web reader | Planned |
| Internal sharing and temporary links | Planned |
| Audit trail | Planned |
Security principles
Confidentiality, integrity, explicit authorization, isolation between organizations and auditability. Cryptographic secrets never go to the client, to logs or inside the PDF.
What exists today: tenant isolation in the domain
Every use case receives a tenant context made of an organization, a user and a membership. Repository lookups are scoped by organization. Creating a document, for example, first checks that the membership exists, is active and belongs to both the organization and the user in the context, and that the organization itself is active.
Architecture
The code follows ports and adapters. The domain is split into model, port and usecase; repositories are interfaces, and the tests use in-memory fakes together with shared contract tests, so a future real repository can be checked against the same rules. The stack is Kotlin 2.4 on the JVM with Maven and JUnit 5. There are no application or persistence frameworks yet, because those decisions are still open.
Engineering practices
- Specification first. Changes are proposed with OpenSpec (proposal, design, tasks and spec deltas) before they are implemented. The first one is
01-core-domain-tenant. - Tests. Seven test files cover entity invariants, use cases and repository contracts.
- Rules for AI coding agents. The repository has an
AGENTS.mdwith security, workflow and Kotlin conventions. - Licensing. AGPL-3.0 with a contributor license agreement; a commercial license is available on request.