~/gribeiro.dev
Back to projects

Pira Turismo · own product

From an agency website to a SaaS tourism platform

Role
Creator and fullstack developer
Period
2023 — present

The problem

Regional travel agencies still sell packages through WhatsApp and spreadsheets: no online catalog, no booking management, no professional digital presence. For travelers, comparing itineraries and booking safely is hard; for agencies, every sale is a manual process.

What started as a website for an agency in Piracicaba evolved into a marketplace platform connecting travel agencies (B2B) to end customers (B2C).

The solution

The platform is a monorepo with NestJS on the backend (around 40 modules: bookings, subscriptions, campaigns, blog, push, audit) and two Next.js 15 frontends — the B2C site and the B2B admin panel — with Prisma over PostgreSQL, React Query and shared components. Turborepo, lint, type-check and pre-commit/pre-push hooks keep the workflow disciplined.

JWT authentication with refresh tokens and a guard chain covers roles, per-agency multi-tenancy and feature gating by subscription plan. Ten scheduled jobs (reminders, campaigns, billing) run with their own audit trail.

Full self-hosted production observability: structured Pino logs — with automatic secret redaction and request-id correlation — flow through Promtail into Loki and feed Grafana dashboards provisioned as code: logs by level, recent errors, 4xx/5xx responses and volume per service, with 30-day retention.

The infrastructure runs on a VPS with Docker Compose and a Caddy proxy (automatic HTTPS, security headers, scanner blocking). The GitHub Actions deploy only completes after the API health check responds — and healthchecks on every service detect and restart anything that goes down.

Pira Turismo platform home page

Stack & practices

Frontend

Next.js 15 (web + admin)React QueryZustandZod

Backend

NestJS 11PrismaPostgreSQLJWT + guardsCron jobs

Observability

GrafanaLokiPromtailPinoHealthchecks

Infra & CI/CD

Docker ComposeCaddyGitHub ActionsVPSTurborepo

Results

Live

in production at piraturismo.com.br

B2B + B2C

agencies and travelers on the same platform

100% observable

Grafana, Loki and healthchecks in production