> JavaScript is off here, or it didn't load, so this is the plain version. I recommend opening this portfolio with JavaScript enabled to enjoy the full experience ;)

Juan Esteban Sánchez

Software engineer and architect, for the specs most people skim.

I joined Meddyg as a full stack engineer in 2023 and now I'm its CTO, working mostly with FHIR, OAuth2 and OIDC. Right now I'm writing HIX, an open spec for clinical document exchange, and the services that run it.

Costa Rica · open to offers and good problems

work

NGDose

Moving a radiation-dosimetry platform off a 13-year-old CakePHP app without ever switching it off.

production · work · dec 2022 → now

problem
A CakePHP app from 2013 ran the dosimetry lab's daily work: dosimeters, readings, packing lists, dose reports. It could not stop for a big-bang rewrite.
what I decided
Strangle it instead of replacing it. I dockerized the legacy app, embedded new screens inside it, and pointed the new NestJS API and React app at the same database.
where it landed
About 95% of the daily work now happens in the new app: dosimeters, participants, reading uploads, dose validation and an audit log of who changed what. The old one is only opened for a few administrative processes. Uploading a batch of dose readings went from about 30 minutes to one, and the dosimeter list from 2.9 seconds to 300 milliseconds. An AI assistant answers admins' questions through typed tools instead of free-form SQL.

legacy: PHP, CakePHP, MariaDB, TCPDF, Docker, Nginx

rewrite: TypeScript, NestJS, Fastify, Prisma, MariaDB, Redis, Puppeteer, React 19, Vercel AI SDK, Anthropic API, Docker

Radiation Group

A certificate portal for a radiation-safety firm's hospital clients, with an AI assistant.

production · work · mar 2026 → now

problem
The firm keeps equipment certificates for a long list of clients, and every client needs a way to see its own and nobody else's. Admins upload them as PDFs by hand, so a wrong date, client or machine can slip through.
what I decided
Role-scoped access through Keycloak for admins, clients and suppliers. The assistant reads each PDF twice: deterministic rules pull the critical fields, a model on the Anthropic API reads the rest, and the rules win any disagreement. It can never write. It proposes a change, the server fingerprints the exact call and holds it for fifteen minutes, and it runs once, with the admin's own permissions, only after they click confirm.
where it landed
In production since April 2026. Each client signs in and sees only its own certificates, organized by facility, area and machine, and gets an email 60 days before one expires. Admins have been using the assistant since November 2026.

TypeScript, NestJS, Fastify, Prisma, PostgreSQL, Keycloak, React 19, TanStack Query, Anthropic SDK, Testcontainers

HIX

A FHIR R5 specification for a clinical document exchange in Costa Rica.

public draft · open source · work · sep 2026 → now

> Turns out writing a spec is harder than complaining about one.

problem
Hospitals, labs and patients need to find and fetch each other's clinical documents without every member integrating with every other one. In a peer mesh, the whole network is only as safe as its weakest member.
what I decided
A central mediator handles every lookup and every retrieval, while documents stay with the member that created them. I took IHE MHDS as the reference without claiming conformance, since it is FHIR R4 from 2023, and wrote down a cited reason for every place HIX departs from it.
where it landed
Volume 1, the architecture, published as v0.1.0 in September 2026 as a draft for review. Volume 2 is going up in parts: the authorization model and two HIX-specific transactions, a mediated token exchange and a patient-app launch, went live in October 2026. Identity, publication and retrieval are in draft, and the consent model comes next.

FHIR R5, SUSHI, HL7 IG Publisher, IHE MHD / PIXm / PDQm, GitHub Actions, Cloudflare Pages

HIX HIE

The services that run HIX: they check who's asking, find where a patient's records live, and fetch them.

first release · work · jun 2026 → now

problem
A spec doesn't move documents. Hospitals and labs needed to fetch each other's records without standing access to each other's systems.
what I decided
Every request goes through a service in the middle that never passes the caller's credentials along: it swaps them for a pass that opens one institution's records and expires within two minutes. Each institution knows a patient by a different ID (MRN), so I built the index that links them (MPI).
where it landed
First release, 0.0.1, in September 2026. Since then, a request can be traced end to end, and I've started building the patient index. It grew out of Kivu Conquest, the login server every participant used at a June 2026 connectathon.

TypeScript, NestJS, Fastify, oidc-provider, jose, PostgreSQL, Kysely, HAPI FHIR, OpenTelemetry, Turborepo

Nodecord

A TypeScript framework that brings NestJS-style modules and dependency injection to Discord bots.

released · open source · side project · jul 2022 → jul 2026

> Does a Discord bot need enterprise-grade dependency injection? Probably not. I built it anyway.

problem
Discord libraries hand you a client and leave the rest to you. Once commands share services or handlers need tests, you end up with one giant file of client.on(...) calls and global state.
what I decided
Real dependency injection over an Inversify container hierarchy, decorator-driven slash commands, interceptors and exception handlers, split into a Discord-free core and a discord.js adapter, plus a testing adapter that simulates interactions without Discord.
where it landed
Started in 2022 and rewritten in 2026; v0.2.1 of both packages published to npm in July 2026.

TypeScript, Inversify, discord.js, Vitest, Turborepo, Changesets

Mind & Body

A gym's mobile app and admin dashboard, with an AI coach that answers from each member's own routines.

paused · open source · side project · mar 2026 → aug 2026

problem
The coach was a generic chatbot. It couldn't see a member's routines, measurements or bookings, so "should I change today's workout?" got an answer that could have been for anyone. Trainers built routines by hand, one exercise at a time.
what I decided
Give the coach tools instead of a longer prompt: five per-member tools (routines, body progress, recent activity, bookings and upcoming classes) plus a search over the exercise catalog, each scoped to the caller's Keycloak token. The reply streams to the React Native app over SSE. For trainers I built Forge, an agent in the dashboard that drafts and edits a routine straight from the catalog, with its own tests for its tools and its prompt.
where it landed
Built between July 31 and August 5, 2026. The coach now answers through those five member tools: asked about a sore shoulder, it names the member's own routines and says which one to skip today. Forge drafts a routine from one sentence: six exercises with sets, reps and notes, picked from a catalog of 1,324. Around them the app has class booking with waitlists and four roles. It isn't deployed yet.

TypeScript, React Native, Expo Router, NestJS, Vercel AI SDK, PostgreSQL, Drizzle ORM, Keycloak, TanStack Query, pnpm Workspaces

Fidechat

The same Discord-style chat app, built three times as I learned: Spring, then NestJS on Oracle, now NestJS on Postgres.

wip · open source · side project · nov 2024 → now

> The live demo has no server: the first tab you open runs it.

problem
I built it twice at university, each time inside a single four-month term: first on Spring Boot, then on NestJS with the logic buried in Oracle PL/SQL packages and triggers. Both shipped against a deadline, rushed and full of holes I knew about.
what I decided
Rebuild it without a deadline instead of starting clean. I merged the two repos into one monorepo without losing a commit, moved every rule out of the database into TypeScript on Postgres, and made the API own the login: it runs the PKCE flow and keeps the tokens server-side, so the browser only ever holds an HttpOnly cookie. The AI bots stopped answering every message: an LLM router reads the channel and decides who, if anyone, should speak. Then I made the server optional: every call goes through one interface, so the web app can talk to the real API or to a copy of its rules running in a worker, with the data in IndexedDB.
where it landed
The third version is the one I'd defend in a review, and anyone can try it: the live demo runs with no server at all, each tab a different user. The bots are optional there, on a model you choose to download into the browser. The first two are kept as they were, tagged and runnable, as a record of how I got here rather than as examples to follow.

legacy: Java, Spring Boot, Oracle PL/SQL, Next.js, NextAuth

rewrite: TypeScript, NestJS, Fastify, PostgreSQL, Drizzle, Socket.IO, Keycloak, React 19, Vite, Tailwind v4, Vercel AI SDK, Transformers.js, Turborepo, Docker

about

I'm a full stack engineer focused on software architecture and the specs most people skim, like OAuth2 and its seven thousand RFCs, OIDC, SMART on FHIR and HL7. So far I've applied them mostly in healthcare, building an authorization server and FHIR platform, LLM agents embedded in real products, and leading the migration of a legacy lab system to NestJS and React, one screen at a time. I'm not tied to the domain though, I just like the kind of problems that fight back.

I wrote Nodecord, the first two versions of Fidechat and the bulk of NGDose by hand. Since mid-2026 I've used Claude Code heavily at work. I design the architecture and the type contracts between parts, the agent drafts the implementation, and I review every diff against integration tests before it merges. That's how HIX's research and Radiation Group's redesign got done without a large team. The decisions in these stories are mine.

I'm 20, and outside work I'm finishing a Software Engineering degree at Fidélitas, learning Rust, and collecting side projects slightly faster than I finish them. I've been coding since 2019 and running Linux for nearly half my life, so the logo isn't decoration.

Got a problem that takes some digging?

Remote roles or consulting, either works. Send me the system nobody wants to touch, the spec nobody read, or the AI feature nobody trusts yet.

Based in Costa Rica, UTC−6.