Arthur Duarte
Backend and systems architecture
I design systems and take part in implementing them. Linux and infrastructure enthusiast.
Porto Alegre, Brazil
About
Student at Colégio Militar de Porto Alegre (military high school), graduating in 2027.
My focus is backend and systems architecture: I want to design systems and also take part in implementing them.
Linux and infrastructure enthusiast.
Languages
- Portuguese
- Native
- English
- C1
- German
- A1, learning
Stack
Languages
- Python
- JavaScript
- TypeScript
- SQL
- Rust
- C
Backend
- Node.js
- Fastify
- FastAPI
- Prisma
- SQLAlchemy
- Zod
- PostgreSQL
- MySQL
Frontend
- React
- Vite
- React Router
- TanStack Query
- React Hook Form
- Tailwind CSS
- shadcn/ui
Infra
- Debian
- Ubuntu Server
- Rocky Linux
- Docker
- nginx
- SSH
- Oracle Cloud
- AWS
- GitHub Actions
Studying
- Java
- Kotlin
- Go
Projects
Event ticketing system
Event ticketing API, a study project focused on business rules and concurrency. The MVP has user sign-up and login, creating, editing, publishing and canceling events, a public event listing and ticket purchase.
- Fastify with Zod validation, OpenAPI documentation at /docs and argon2 password hashing.
- Login with JWT and refresh tokens in an httpOnly cookie, with rotation and reuse detection: reusing an already-used token revokes all of the user's sessions. Rate limit of 5 attempts per minute on login.
- Each user can only create a limited number of active events (draft or published) depending on their tier (free, verified, pro): 2, 5 and 8. The count runs in a transaction that locks the user.
- The creator edits, publishes and cancels their own events. The public listing shows only published events that have not started yet, with city and state filters and pagination.
- Ticket purchase is limited to one per CPF (Brazilian taxpayer ID) per event, with a lock on the event (SELECT ... FOR UPDATE) to respect capacity. Simultaneous purchases queue up. It checks the minimum age (in the São Paulo time zone) and whether the event has already started. The ticket price is recorded on the order at purchase time. Rate limit of 10 orders per minute. A user's tickets are available at /tickets/mine.
- Data model in Prisma 8 (contract-first) and PostgreSQL, with users, events, orders and tickets.
- Database constraints, such as sold_tickets <= capacity, protect event capacity.
- CORS enabled for the frontend origin.
- Integration tests with Vitest, including concurrent purchases (10 simultaneous purchases for 5 seats).
- Known limitations: the access token (JWT) cannot be revoked and stays valid until it expires, at most 15 minutes after logout; the refresh token is revoked immediately. PATCH on an event does not yet block changes to events with tickets already sold.
- Out of scope: payment (PIX), check-in and ticket transfer. The web interface is in the frontend-ticketeira repository.
- TypeScript
- Fastify
- PostgreSQL
- Prisma
- Zod
- OpenAPI
- JWT
- Vitest
- Biome
- Docker Compose
dev-tool-cli
CLI that sets up development environments in one command, the same way on every machine.
- Installs the Python (uv) and Rust (rustup) toolchains, creates the project and records the versions in dev.toml. dev doctor checks what is missing on the machine and dev config reads and writes preferences.
- Single binary for macOS and Linux, with a shell installer that verifies the SHA-256 checksum and never uses sudo. The --dry-run option prints the commands that would modify the system instead of running them.
- Modular architecture (cli, config, core, errors, os, providers) based on a Provider trait and a Registry.
- Tests using fakes. Automated releases via GitHub Actions.
- Rust
- Shell
- GitHub Actions
HTTP server in C
- C
- POSIX sockets
- pthreads
- SQLite
- cJSON
- Make
HTTP server with a users CRUD written in C, directly on top of POSIX sockets, no framework. Persistence in SQLite.
- Hand-written HTTP/1.1 parser: reads until the end of the headers, honors Content-Length and builds the response.
- Fixed thread pool with 8 workers and a circular queue of 128 connections, guarded by a mutex and a condition variable. A full queue answers 503.
- SQLite in WAL mode with a busy timeout and prepared statements; each request opens its own connection.
- 5 s read timeout, SIGPIPE ignored and a SIGINT shutdown that waits for the workers to drain the queue.
- Default build with ASan and UBSan, a separate ThreadSanitizer target and an assert-based test of the database layer.
multi-llm-cli
- Python
- uv
Terminal CLI for chatting with several LLMs, built to make free models from different providers easier to access.
- Supports OpenRouter, Groq and Google. Multi-turn history, markdown in the terminal, switching model and provider mid-conversation and importing files into the context.
- Optional tool calling (bash, read_file, write_file) on OpenRouter and Groq. Every execution asks for confirmation, defaulting to no.
Discord welcome bot
- JavaScript
- discord.js
- Docker
- Oracle Cloud
Automatically welcomes new members and assigns them a role. Containerized deployment on an Oracle Cloud VM.
View codeYouTube notification bot for Discord
- JavaScript
- discord.js
- Docker
Announces on the server when a new video is published on the YouTube channel or a livestream starts. Uses the RSS feed, no Google API key.
- The RSS feed only shows a stream after it ends. So the bot also checks the channel's /live page on every cycle.
- Stores already-announced IDs in data/state.json so it does not repeat announcements after a restart.
Homelab
- Ubuntu Server
- Netplan
- SSH
- Docker
Ubuntu Server machine built from an old computer, with a static IP via Netplan and key-based SSH access.
- Used as a lab for backend, databases and Docker.
Personal portfolio
- TypeScript
- Next.js
- nginx
- Oracle Cloud
- Cloudflare
- GitHub Actions
This site: Next.js with static export in three languages, served by nginx on an Oracle Cloud VM.
- Deployed via GitHub Actions. The project list is updated weekly by Claude.
- The frontend was delegated to Claude Code. Most of the infrastructure (VM, nginx, rate limit, deploy, Cloudflare) was done by hand; AI only helped with occasional tweaks to config files.
How this site reaches you
No hosting platform: this is the path from a commit to your browser, built and run by me.
git push
Commit to the main branch on GitHub.
GitHub Actions
npm ci and next build produce the static site in out/.
rsync over SSH
Sends only what changed, as a deploy user without sudo.
nginx
Ubuntu VM on Oracle Cloud, with gzip and long caching for assets.
Cloudflare
Proxy and CDN in front of the VM. HTTPS all the way to the origin, with a Let's Encrypt certificate renewed by certbot.
You
The root redirects to /pt/, /en/ or /de/ based on your browser language.
Every Monday, a workflow with Claude reads my repositories tagged portfolio and opens a PR updating the projects in all three languages. I review and merge; the deploy runs by itself.
Technical YouTube channel
Explanations of data structures and LeetCode problems.
- subscribers
- 1,000+
- views on one video
- 40K+