TG Ops
- Java
- Spring Boot
- Angular
- TypeScript
- PostgreSQL
- Redis
- Node.js
- Electron
- Docker
- GitHub Actions
A platform that moved the administration of a military training unit off loose spreadsheets and documents. It has three projects: a Spring Boot API, an Angular front-end that runs in the browser and on the desktop, and a microservice that generates PDFs in bulk. Security and personal data protection were requirements from day one.
- Timeline
- 2024 → present
- Context
- Team project, in production
- My role
- Main front-end contributor, a lead back-end contributor and author of the PDF microservice
- Scope
- 3 repositories · 40+ migrations · web and desktop

The problem
The unit's administration relied on loose spreadsheets, word processors and documents filled in by hand, one per person. That meant rework and inconsistent records, made audits hard and created a real risk of leaking sensitive personal data.
The answer was a single platform with role-based access. It centralizes personnel records and operational history, imports the legacy spreadsheets, consolidates indicators in a dashboard and generates the official documents in one click. Work that took hours of manual filling now takes a few clicks.
Because the system stores personal data, security was not left for later: 2FA, revocable sessions, an IP allowlist, field-level encryption and an audit trail of who accessed what are part of the foundation.
Screenshots
Login, the dashboard in both themes, the record form with address lookup by postal code, and the admin panel with users, sessions, IP allowlist and settings.
Access and dashboard(2)
Login (the 2FA code arrives by email) Indicators dashboard (light theme)
Themes and personalization(2)
Indicators dashboard (dark theme) Settings: theme, menu and favorite routes
Records and users(2)
Record with address filled in from the postal code User and role management
Security in the panel(2)
Active sessions with revocation IP allowlist managed from the panel
All screenshots use fictional data generated by the local environment's seed. The unit's emblem was blurred. The interface is in Portuguese.
Features
Each role sees only what it needs, and each module replaces a step that used to be manual.
Indicators dashboard
KPIs and Chart.js charts fed by aggregate API endpoints, showing the unit's status in real time.
One-click documents
Existing records become print-ready PDFs, hundreds of pages in a single request, following the official layout.
Spreadsheet import
Legacy .xls spreadsheets become structured data with Apache POI, through a reader refactored with the Strategy pattern to support new formats.
Bulk image upload
Photos sent in a .zip, including subfolders, with server-side validation against zip bombs.
2FA login
An emailed code with short expiry and limited attempts, password reset by link and a strong password policy.
Revocable sessions
Each device has its own session in Redis. Users and administrators can end sessions remotely.
IP allowlist
Allowed IPs are managed from the panel, with caching and reverse proxy support.
Web and desktop
The same Angular code runs in the browser, served by Nginx, and as an Electron app for Windows, Linux and macOS.
Architecture
The front-end talks to two services: the main API, over REST with HttpOnly cookies and CSRF, and the PDF microservice, sending the same JWT the API issued. PDF rendering is CPU and memory heavy, so it lives in a separate service that scales on its own.
- Hexagonal architecture: domain and use cases with no framework dependency
- Short-lived JWT and an opaque refresh token in Redis, logout blacklist and per-IP rate limiting
- Personal fields encrypted with AES-256-GCM and an HMAC blind index for search
- Flyway with 40+ migrations, JasperReports and JUnit 5 tests
- Interceptor with single-flight refresh: one token renewal for many 401s
- Role-based guards and a side menu built from the API's permissions
- Electron with contextIsolation, sandbox and Electron Fuses
- Web build in a multi-stage Docker image with Nginx
- JSON → Handlebars → HTML/CSS → headless Chromium → PDF
- Validates the API's JWT (algorithm and issuer) with no user database of its own
- Helmet, CORS allowlist, rate limiting and fail-fast without a strong secret
- CI/CD: GitHub Actions pushes to Docker Hub and deploys to Render
Technical decisions
| Decision | Reason | Consideration |
|---|---|---|
| Tokens in HttpOnly cookies | The token is never reachable from JavaScript, which lowers the risk of theft through XSS. | Requires CSRF protection and an interceptor that renews the CSRF token transparently. |
| Field-level encryption with a blind index | Personal data is encrypted at rest, and the HMAC lets the system search by document without decrypting the database. | Search only works by exact match, and legacy data needed a phased migration. |
| PDF in a separate microservice | One Chromium per request is heavy. Isolated, the service scales on its own and a template changes without rebuilding the API. | One more service to deploy, with a JWT secret shared between the two. |
| Hexagonal architecture in the API | Business rules stay isolated, so swapping the database, authentication or output format doesn't touch the use cases. | More layers and files per feature than a plain CRUD. |
| One Angular codebase for web and desktop | The same front-end serves browser users and those who need an installed app, with no duplicated screens. | Electron needs its own security settings and builds for each operating system. |
What I delivered
- integrated repositories
- 3
- Flyway migrations
- 40+
- desktop platforms
- 3
On the back-end, I built the security architecture (2FA, Redis sessions, IP allowlist, rate limiting and account lockout) and personal data protection with AES-256-GCM, a blind index and access auditing. On the front-end, I built the authentication flow, the admin panel, the Electron app, the light and dark themes and automatic reloading of stale chunks after each deploy. I designed and built the PDF microservice on my own, from the architecture to the CI/CD pipeline.
About the project
- The repositories are private because the system runs in production at a military unit and stores personal data.
- This is a team project. This page highlights the parts I built.
- The screenshots come from the local environment with fictional data. No real information from the unit appears here.
- The interface is in Portuguese.
Want to know more?
The code is private, but I'm happy to walk through the architecture and security decisions in detail.