Kevin Leiva
es · Leer en español← Projects
04Case studyPlatform · Government

San Joaquín.

Classes, events and court rentals for the San Joaquín Municipal Sports Corporation, with a staff dashboard, a transparency module and an institutional website.

Role

Architecture and full-stack development

Year

2026

Live

talleres.deportesanjoaquin.cl ↗
San Joaquín

The problem

It started from a mature platform built for another municipality, with two APIs validating different tokens, three diverging shapes of the same object and four formulas for the same total.

The solution

01

One API, one contract

A single TypeScript API. Everything that crosses HTTP is declared once with zod, and the backend is the only price calculator.

02

Permissions on the server

14 modules with roles. A test walks every route and fails the build if any is left without a guard.

03

Complete portal

Classes, events, court rentals, Tarjeta Vecino with document review, and a transparency repository with expiring links.

Stack

Frontend

React 19ViteTailwind 4shadcn/ui

Backend

ExpressTypeScriptMongoosezod

Website

Next.jsPayload CMSMongoDBS3

Quality

VitestPlaywrightWCAG AApnpm workspaces
React 19ViteTailwind 4shadcn/uiExpressTypeScriptReact 19ViteTailwind 4shadcn/uiExpressTypeScriptReact 19ViteTailwind 4shadcn/uiExpressTypeScriptReact 19ViteTailwind 4shadcn/uiExpressTypeScript

Architecture

Every external provider sits behind a port: identity, files, payments, receipts and email. Moving from local to the cloud means changing environment variables, not code.

1

Resident

Web portal

React 19 + Vite; the staff dashboard loads separately.

2

API

Single Express API

zod contracts and roles shared with the frontend.

Quality gates

Types, lint, secrets, contrast and tests before every deploy.

3

Data

MongoDB

Classes, spots, sales and documents.

S3

Transparency files with 15-minute signed URLs.

4

Ports

Payments and receipts

Swappable adapter per provider.

Resend

Emails for the portal and the website.

Screens

01 / 04
Classes portal
01 Classes portaltalleres.deportesanjoaquin.cl
Institutional website
02 Institutional websitedeportesanjoaquin.cl
Venues
03 VenuesPayload CMS
News
04 NewsPayload CMS

Next project · 05

Cultura Constitución→

Kevin Leiva · kilp.dev03@gmail.com
LinkedIn
© 2026