Lughion · Producto SaaS · App móvil + panel web · 2026 Lughion · SaaS product · Mobile app + web panel · 2026

App de gimnasioGym app

Una plataforma para que los socios vuelvan: entrenamiento, reservas y gamificación en el móvil, y un panel para el gimnasio. A platform that makes members come back: training, bookings and gamification on the phone, plus a panel for the gym.

App de gimnasio: ilustración de concepto del panel web y la app móvil

↑ Ilustración de concepto con datos ficticios — no son capturas del producto. Las capturas reales llegarán con la primera versión. ↑ Concept illustration with fictional data — not product captures. Real captures will come with the first version.

RolRole
Arquitectura, diseño y desarrollo full-stackArchitecture, design & full-stack dev
ContextoContext
Primer encargo de Lughion · gimnasio de LeónLughion's first commission · gym in León
PlataformaPlatform
iOS · Android · Web
Stack
TypeScript · React Native · Next.js · Supabase
EstadoStatus
En desarrolloIn development

Qué What it es is 01

Es una plataforma SaaS multi-tenant para gimnasios: una sola base de datos y un solo código sirven a N gimnasios, cada uno con sus socios, entrenadores y configuración, aislados entre sí. Nace como el primer encargo de Lughion, mi estudio de software, para un gimnasio de León. It's a multi-tenant SaaS platform for gyms: one database and one codebase serve N gyms, each with its own members, trainers and settings, isolated from one another. It was born as the first commission of Lughion, my software studio, for a gym in León.

El problema que ataca no es "gestionar un gimnasio", sino la retención: la mayoría de la gente que se apunta deja de ir a los pocos meses. Por eso el producto une en un mismo sistema al socio y al entrenador (entrenamientos, progresión, plan semanal, citas) y le añade una capa de gamificación diseñada desde por qué vuelve la gente, no desde qué botones tiene la pantalla. The problem it tackles isn't "managing a gym" but retention: most people who sign up stop going within a few months. So the product brings member and trainer into one system (workouts, progression, weekly plan, appointments) and adds a gamification layer designed around why people come back, not around what buttons the screen has.

Tiene dos caras: una app móvil (React Native + Expo) para socios y entrenadores, y un panel web (Next.js) para el dueño y el staff del gimnasio. Todo apoyado en Supabase / PostgreSQL, con la lógica crítica viviendo en el servidor. It has two faces: a mobile app (React Native + Expo) for members and trainers, and a web panel (Next.js) for the gym owner and staff. All of it backed by Supabase / PostgreSQL, with the critical logic living on the server.

Qué What it hace does 02

Para el socioFor the member
Sus entrenamientos y plantillas, la sesión de hoy ("hoy toca X"), el plan semanal, un catálogo de ejercicios con tres niveles y variantes, historial y mediciones corporales con evolución. Un tablón de anuncios y mensajes con el gimnasio, y una pantalla de gamificación con sus puntos, rachas y récords. Their workouts and templates, today's session ("today it's X"), the weekly plan, an exercise catalog with three levels and variants, history and body measurements over time. A notice board and messaging with the gym, and a gamification screen with their points, streaks and records.
Para el entrenadorFor the trainer
Lista de clientes, creación de plantillas de entrenamiento, planificación de la semana de cada cliente, agenda de citas y un semáforo de lesiones: a partir del perfil y las mediciones del socio, un motor de reglas marca en rojo, ámbar o verde qué ejercicios conviene evitar, adaptar o mantener. Client list, workout-template builder, weekly planning for each client, an appointments agenda and an injury traffic light: from the member's profile and measurements, a rules engine flags in red, amber or green which exercises to avoid, adapt or keep.
Para el gimnasioFor the gym
Calendario de clases y actividades con reservas y aforo, gestión de entrenadores y socios, registro por códigos de invitación, y un panel de administración con analítica de retención. Y un sistema de módulos activables: cada gimnasio enciende o apaga funcionalidades (tablón, gamificación, citas…) sin tocar código. Class and activity calendar with bookings and capacity, trainer and member management, sign-up by invitation codes, and an admin panel with retention analytics. Plus a system of switchable modules: each gym turns features on or off (board, gamification, appointments…) without touching code.
GamificaciónGamification
Puntos por sesión completada, por récord de peso o repeticiones, por racha semanal y por asistir a clases. Los valores se afinan por gimnasio desde su configuración. Los récords y las rachas los detecta el servidor, no la app, para que nadie pueda inflarse los puntos. Points for completed sessions, for weight or rep records, for weekly streaks and for attending classes. Values are tuned per gym from its settings. Records and streaks are detected by the server, not the app, so nobody can inflate their points.

Decisiones de Architecture arquitecturadecisions 03

Lo que más me interesa de este proyecto no son las pantallas, sino lo que hay debajo. Estas son las decisiones que lo sostienen: What interests me most about this project isn't the screens but what's underneath. These are the decisions holding it up:

01

Multi-tenant con Multi-tenant with RLS

Cada fila lleva su gym_id y las políticas de Row Level Security de PostgreSQL garantizan que un gimnasio nunca vea datos de otro, aunque el cliente lo intente. El aislamiento está en la base de datos, no en el código de la app. Every row carries its gym_id and PostgreSQL's Row Level Security policies guarantee one gym never sees another's data, even if the client tries. Isolation lives in the database, not in app code.

02

Lógica crítica Critical logic en el servidoron the server

Aforos, puntos, privacidad y permisos se resuelven en funciones security definer de PostgreSQL y triggers de negocio. La app solo pide; el servidor decide. Así el mismo comportamiento vale para móvil y panel, y no se puede saltar desde el cliente. Capacity, points, privacy and permissions are resolved in PostgreSQL security definer functions and business triggers. The app only asks; the server decides. The same behavior serves mobile and panel, and can't be bypassed from the client.

03

Módulos como Modules like mods

La configuración de cada gimnasio vive en un JSONB. Un módulo ausente cuenta como activo, así que añadir funcionalidades nuevas no altera a los gimnasios existentes. Solo el administrador puede tocar sus interruptores, y lo hace desde una función validada en servidor. Each gym's configuration lives in a JSONB. A missing module counts as active, so adding new features doesn't disturb existing gyms. Only the admin can flip the switches, through a server-validated function.

04

Ledger Immutable inmutableledger

Los puntos no se "guardan": se apuntan como eventos en un libro de cuentas al que solo se añade, y el total es la suma. Nadie inserta desde la app; solo las funciones de servidor, de forma idempotente. Auditable e infalsificable. Points aren't "stored": they're appended as events to an append-only ledger, and the total is the sum. Nothing inserts from the app; only server functions, idempotently. Auditable and tamper-proof.

05

Reservas sin Bookings without overbookingoverbooking

Dos socios reservando la última plaza a la vez es el caso clásico de concurrencia. Se resuelve con bloqueos de fila en la transacción: el aforo se comprueba y se descuenta de forma atómica. Two members booking the last spot at the same time is the classic concurrency case. It's solved with row locks inside the transaction: capacity is checked and decremented atomically.

06

Migraciones Versioned versionadasmigrations

Dieciséis migraciones SQL numeradas, del núcleo a la gamificación, y un paquete compartido con los tipos y el motor de reglas para que app y panel hablen el mismo idioma. Desarrollo por vertical slices: cada semana hay algo que se puede tocar. Sixteen numbered SQL migrations, from the core to gamification, and a shared package with types and the rules engine so app and panel speak the same language. Vertical-slice development: every week there's something you can touch.

GaleríaGallery 04

↑ Las capturas reales de la app y del panel se añadirán en cuanto se cierre la primera versión. ↑ Real captures of the app and panel will be added once the first version is closed.

StackStack 05

LenguajesLanguages
TypeScriptSQL / plpgsqlJSX
App móvilMobile app
React NativeExpoExpo Go (dispositivo real)
Panel webWeb panel
Next.jsReactTailwind CSS
Backend
SupabasePostgreSQLRow Level Securitysecurity definerTriggersJSONB
HerramientasTools
MonorepoGit / GitHubVS CodeNode.js / npm
CopilotoCopilot
Desarrollo asistido con Claude, con revisión y pruebas propias de cada rebanada antes de darla por buena. Development assisted by Claude, with my own review and testing of every slice before calling it done.

Estado Current actual status 06

En desarrollo activo durante 2026. La base de datos está completa hasta la gamificación y el plan semanal; la app móvil tiene sus pantallas principales funcionando contra Supabase y probadas en dispositivo real con Expo Go; el panel web está en construcción. El objetivo es cerrar una primera versión con el gimnasio de León y, a partir de ahí, ofrecerla como producto a más gimnasios. In active development throughout 2026. The database is complete up to gamification and the weekly plan; the mobile app has its main screens working against Supabase and tested on a real device with Expo Go; the web panel is under construction. The goal is to close a first version with the gym in León and, from there, offer it as a product to more gyms.

Base de datosDatabase
16 migraciones · RLS16 migrations · RLS
App móvilMobile app
16 pantallas en dispositivo16 screens on device
Panel webWeb panel
En construcciónUnder construction