System ready ยท v0.11.0 ยท 99/99 tests ยท open source

The front desk that makes the member come back tomorrow

The front desk of a small gym or studio, ready to run in your own environment: memberships and enrollment, classes with spots and a waitlist, check-in, workout card, animated exercises and the staff on Telegram. Implemented: v0.11.0, 99 of 99 tests, Docker for the VPS. Only what is yours is left: credentials, real data and the deploy.

Atende Academia banner: memberships and enrollment, classes with spots and a waitlist, check-in, workout card, animated exercises and a Telegram staff desk
Video

Watch the explainer

The project explained in a few minutes.

What it is

A ready system, built from the contract to 99 green tests

The repository ships the working app (./atende), the contract for what it does, the test battery that proves it and the guardrails that stopped the agent from cheating. It was built by an agent (Claude Code and Codex, on the subscription) until 99 of 99 tests, LIMITES OK and a passing independent verification. Its sibling Atende Fisioterapia follows the same mold, and atende-clinica, which came first, was built exactly this way and closed 93 of 93 tests.

Memberships with a manual payment status, group classes with spots and a waitlist, check-in and win-back with consent, workout card, physical assessment as sensitive data and a Telegram staff desk

๐Ÿ‹๏ธ The system

Members and plans, group classes with booking, check-in and the instructor's workout card. At the center is the class with spots: booking with a cap, a waitlist with an automatic offer and an automatic no-show. Python 3 with the standard library only and SQLite, one gym per installation.

๐Ÿ“ฆ How it was built

A 23-section specification (0 to 22), 99 black-box tests, 20 proposed decisions, a map to Raio-X, prompts for /goal and for the headless loop, and the guardrails that froze the contract. Before the implementation, an adversarial validator went through all of it and found 10 problems, 2 of which would have stopped an honest implementer. All of it stays in the repo for anyone who wants to redo or adapt it.

๐Ÿ“ˆ Source: Raio-X de Margem

No-shows without notice, idle time slots and members who vanish are the leaks the system attacks. The system hands six monthly numbers to the dashboard of Raio-X de Margem, the source of the business rules. It has no gym package: the system uses the generic services-with-appointments model, and each mapping is an assumption.

๐Ÿ’ณ Plan and enrollment, manual payment

Monthly, quarterly, annual and drop-in class plans, with price and validity. An enrollment is ativa, vencida, trancada or cancelada (active, expired, frozen, canceled). Payment is only a manual status (pago or pendente, paid or pending) set by the staff, plus an expiry notice. No Pix, card or payment processor in v1.

๐Ÿ“ Check-in and win-back

Members check in with a code at the front desk or in the chat (cheguei, "I'm here"), once a day. Anyone who has vanished for N days gets a win-back message, but only if they gave consent: win-back is marketing, not a contract notice. "PARAR" (stop) blocks everything automatic.

๐Ÿ”’ LGPD and physical assessment

Export and anonymize a member's data. The physical assessment result (weight, height, measurements) is sensitive data: only the staff can see it, never through the chat, and it is erased together with the member. LGPD and 192 are Brazil's: LGPD is Brazil's data protection law and 192 is the Brazilian ambulance number.

How it works

From enrollment to each day's "I'm here"

This is the flow of the system. A Python server with no dependencies, SQLite in a data folder and Docker for the VPS. Evolution and Telegram come in only through environment variables; without them the outbox is simulated and no network call goes out.

Site chat or WhatsApp (Evolution)โ†’ Plan and enrollmentโ†’ Class booking, spot or waitlistโ†’ Check-in and automatic no-showโ†’ Workout card and animated exerciseโ†’ Win-back and numbers for Raio-X

Member

In the chat or on WhatsApp they ask about classes, book and cancel, see meu plano (my plan) and meu treino (my workout), ask explica agachamento (explain the squat), say cheguei, get FAQ answers, ask for a human and send "PARAR" when they want no more messages. A health alert word (strong pain, chest pain, shortness of breath, fainting, dizziness, injury and others) is answered with 192 and warns the instructor. The chat is in Portuguese in v1.

Staff on Telegram

Notices of new and canceled bookings, and the commands /aulas [date], /fila, /responder and /encerrar, also as a direct reply to the member's message.

The /equipe page

With a token: members, plans and enrollments, class grid, bookings, check-ins, workout cards, assessments, exercise library, FAQ, registries and the human queue.

Classes, spots and waitlist

The weekly grid has modality, instructor, room and spots. Booking respects the spot cap and the lead time; with 10 requests for the last spot, one gets 201 and the other nine get 409. When someone cancels, the first person on the waitlist receives the automatic offer.

Cancellation window and no-show

Canceling inside the window (default 2 h before) returns the credit. After the window the spot is released and the waitlist fires, but the drop-in credit does not come back. A booking without a check-in on the day of the class becomes an automatic no-show in the task run, and the staff can correct it.

Workout card

The instructor builds the card from the exercise library (sets, reps, load, rest). The member asks meu treino de hoje (my workout today) and gets the next workout in the sequence, one per check-in. The bot shows the instructor's card and never prescribes.

๐ŸŽž๏ธ Demo: an exercise animated with CSS only

Each exercise is an SVG animated with CSS only, no script and no SMIL. Measured in a real render, HyperFrames has no SMIL adapter: SMIL motion came out frozen or out of phase in the MP4, and only CSS stayed faithful. This is the squat: feet fixed on the floor, knees forward, hips back.

Squat

The 12 example exercises

Squat, push-up, plank, bent-over row, bench press, deadlift with a stick, lunge, hip raise, crunch, shoulder press, lat pulldown and jumping jack.

Each one has a public page /exercicios/<id> with the animated SVG, the steps, common mistakes and precautions. On WhatsApp a 4 s MP4 rendered by HyperFrames goes out, a local build step (tools/render-exercicios); without the MP4 (or without PUBLIC_URL) the page link goes out instead. The 12 SVGs were drawn by the implementing agent, and the motion was checked at level 4 by verificar-independente.py in a Chromium. The MP4s have not been rendered yet: it is an optional step of yours (step 5 of the guide).

Prerequisites

What you need

To run the system you only need Python 3.10 or newer; pytest is there to check the tests. Docker comes in for the VPS deploy; Evolution and Telegram are optional and yours. For the exercise videos, Node 22 or newer, HyperFrames and ffprobe. You only need an agent if you want to redo or adapt the system with the same method.

Python 3.10+ and pytest

The tests use pytest (a development tool). The application itself has no dependencies.

# check
python3 --version
python3 -m pip install pytest

Claude Code or Codex (optional)

Only to redo or adapt with the method, through the subscription, no paid API. For the headless loop, clone execucao-longa into ~/projetos.

# check
codex --version   # or: claude --version

Docker, Evolution and Telegram

Docker brings the system up on the VPS (and does the build of the independent check). An Evolution instance and a Telegram bot only if you want the channels; the credentials live in .env.

# check
docker --version
User guide ยท step by step

From the clone to the implemented system, in your own environment

The commands below are the repository's own. The cycle: clone and check the tests, configure your gym, run it locally, bring it up on the VPS with Docker, generate the videos and ask a physical education professional to review. At the end, how the system was built, for anyone who wants to redo or adapt it.

1

Clone the repository and check the tests

The system is already in the repo (./atende, v0.11.0). Check that the whole suite passes and the guardrails are intact.

git clone https://github.com/inematds/atende-academia && cd atende-academia
python3 -m pytest -q tests/ | tail -n 1                          # 99 passed
bash longrun/2026-10-05-academia-v1/verificar-limites.sh               # LIMITES OK at close; now flags only guia/ and README.en/es (docs added later)
2

Configure your gym

Copy the example into a data folder and edit the name, the staff token, the grid, plans, instructors, FAQ and exercises. The 20 default decisions (win-back only with consent, automatic no-show, cancellation deadline and others) are in docs/DECISOES-ABERTAS.md.

mkdir -p dados && cp exemplos/academia.json dados/academia.json
less docs/DECISOES-ABERTAS.md
3

Run it locally

Start the server. The member chat is at /, the staff page at /equipe (X-Token header) and each exercise at /exercicios/<id>. Without the Evolution and Telegram variables the outbox is simulated and no network call goes out. raiox produces the monthly numbers for Raio-X, and backup can run with the server on.

./atende serve --porta 8080 --dados dados
./atende raiox --dados dados --mes 2026-10 --acompanhamento acompanhamento.json
./atende backup --dados dados --saida backups/academia.zip
4

Bring it up on the VPS with Docker

The owner's step, with their machine and credentials: the system never does this on its own. The service listens only on 127.0.0.1:8080, keeps everything in ./dados and has a healthcheck at /api/saude. In front, an HTTPS proxy (Caddy, Nginx or Traefik) on the gym's domain, and in .env the PUBLIC_URL, the Evolution (WhatsApp) credentials with WEBHOOK_SEGREDO and the Telegram bot credentials with TELEGRAM_SEGREDO. The full walkthrough, with the webhooks and the daily cron backup, is in the "VPS deployment" section of the README.

cp .env.exemplo .env          # fill in PUBLIC_URL, EVOLUTION_*, TELEGRAM_*
docker compose up -d --build
docker compose restart       # after editing dados/academia.json
5

Generate the exercise MP4 videos (optional)

WhatsApp does not show SVG. tools/render-exercicios generates web/exercicios/<id>.mp4 (4 s, 720ร—720, no audio) from each SVG with HyperFrames, a local render through Chromium, no API. It needs Node 22 or newer, HyperFrames installed and ffprobe. This render has not been run yet: the SVG animations work on the web, and without an MP4 (or without PUBLIC_URL) the member gets the link to the animated page. On the VPS, copy the .mp4 files to the EXERCICIOS_MP4_DIR folder.

npm install hyperframes
tools/render-exercicios --ids agachamento,prancha --saida web/exercicios
6

Check with the independent verification

The verifier the agent never saw looks for fixture values copied into the code, brings up a gym that never appeared (another grid, other plans and deadlines, a holiday, another clock), opens 3 SVGs in a Chromium to prove they move, renders one exercise with HyperFrames and runs docker build with a healthcheck. Without Chromium, HyperFrames or Docker those stages come out as PULADO (skipped), never as OK. At delivery it printed INDEPENDENTE OK (movimento: chromium, hyperframes: pulado, docker: ok).

python3 longrun/2026-10-05-academia-v1/verificar-independente.py      # INDEPENDENTE OK
7

How it was built (and how to redo or adapt it)

The system was built like this: the decisions were answered, the contract and the tests were frozen by hash (congelar.sh) and an agent worked in long-running execution, with the execucao-longa method, until 99 passed and LIMITES OK, with state.md, progress.md and failures.md recording every cycle. Want to change a rule marked โš  or take the mold to another business? The method stays in the repo: edit docs/ESPECIFICACAO.md and tests/, freeze again and run the Codex headless loop or /goal in Claude Code, following the prompts in longrun/2026-10-05-academia-v1/.

bash longrun/2026-10-05-academia-v1/congelar.sh
~/projetos/execucao-longa/tools/loop-longrun.sh longrun/2026-10-05-academia-v1   # or /goal: prompt-goal-claude.md

โš ๏ธ Before using with a real member: review by a physical education professional

The 12 SVGs are schematic figures drawn by the implementer, and the steps, common mistakes and precautions of each exercise were written as examples: a physical education professional must review everything before it reaches a real member, including the list of health alert words. The professional council rules (CREF/CONFEF, Brazil's physical education boards) were not researched: the campaign guardrail is only the safe minimum (promise of results and "before and after"), citing no article, and the owner confirms the rules before any campaign is published (decision 5). The legal basis for the physical assessment, sensitive data, is also for the owner or a lawyer to confirm (decision 6).

What's in the kit

Contract, tests and guardrails, with the real numbers

Everything the agent needed to build the system, and everything that stopped it from pretending it built it. It stays in the repo and runs on every change.

99 acceptance tests

Black-box, over HTTP and the command line, in 13 files.

test_integracoes.py           16
test_exercicios_svg.py        14
test_aulas.py                 12
test_alunos_planos.py          9
test_conversa.py               8
test_treino.py                 6
test_cadastros.py              6
test_basico.py                 6
test_docker.py                 5
test_checkin.py                5
test_campanhas.py              5
test_avaliacao.py              4
test_lgpd_raiox.py             3

A 23-section specification

docs/ESPECIFICACAO.md, sections 0 to 22: execution, academia.json, members, plans and enrollments, group classes, check-in, workouts, animated explanation, physical assessment, HTTP API, chat, tasks, campaigns and the advertising guardrail, Raio-X, LGPD, Evolution, Telegram and Docker. Pix or card billing, turnstiles, a member app, personal training and several gyms on one server are explicitly out (section 16).

Guardrails against shortcuts

A frozen hash of tests/, pytest.ini, the specification and the verifiers. File scope: the agent only touches the code and its own logs. No API key, no external URL in the code, no 0.0.0.0 and no SMIL or script in the SVGs. verificar-limites.sh checks all of it and prints LIMITES OK.

Independent verification

Level 4, hidden from the agent: it looks for fixture values in the code, brings up a gym never seen before, checks the SVG motion and the MP4 when the tools exist, and runs docker build and a healthcheck. Only that way does "99 passed" prove general logic.

20 proposed decisions

Language, channels, manual billing only, the campaign guardrail, physical assessment as sensitive data, win-back with consent, automatic no-show, late cancellation, check-in by code, the 12 exercises with CSS-only animation and Raio-X. Only the items marked โš  change the contract.

Validated by an adversarial agent

A validator that did not see the planning checked tests against the specification and tried to get around the guardrails. It found and fixed 10 problems: 2 blocked the run, 5 got in the way and 3 were cosmetic. The main one: the specification allowed SMIL, and the HyperFrames render has no SMIL adapter, measured in a real render. The full account is in docs/VALIDACAO.md and each fix has a line in FALHAS.md.

The business rules come from Raio-X

No-shows without notice, idle time slots, members who do not return and a front desk stuck on the calendar: docs/MAPA-RAIO-X.md links each leak of the services package to a v1 piece or to the reason it stays out. Raio-X carries no gym market figures, so no-shows, occupancy and renewal stay as assumptions to measure in your own gym. Details in the Raio-X de Margem guide.

Brazilian rules built in

LGPD (expiry notices, waitlist offers and canceled classes as contract performance; win-back and campaigns only with consent; physical assessment as sensitive data; export and anonymize) and 192 for emergencies. The professional council rule (CREF/CONFEF) has not been researched yet. Outside Brazil, swap in the local privacy law, professional board and emergency number.

Roadmap

Where it stands and where it goes

The plan was validated and the implementation is done: v0.11.0, 99 of 99 tests, built with the execucao-longa method. atende-clinica followed the same path and closed 93 of 93. What is left now belongs to the owner.

Plan โœ…
Specification, tests and guardrails validatedA 23-section contract, 99 acceptance tests, 20 proposed decisions, a map to Raio-X and an adversarial validation completed on 2026-10-05.
Implementation โœ…
System implemented and verifiedContract frozen and an agent in long-running execution until 99 passed and LIMITES OK. Independent verification passed (SVG motion in Chromium, docker build and healthcheck). Telegram, the / and /equipe pages, Docker and tools/render-exercicios delivered on 2026-10-19.
Videos
Exercise MP4s, on your machine (optional)The script is ready, but the render has not been run yet. Run tools/render-exercicios once, with HyperFrames installed, and publish the files together with PUBLIC_URL.
Pilot
In a real gymReplace the example with the real grid, plans and exercises, set up the real Evolution (WhatsApp) and Telegram credentials, get a review from a physical education professional, confirm the CREF/CONFEF rules, publish on the VPS and track no-shows, occupancy, renewal and attendance in the Raio-X Recovery Panel.
Later
Out of v1Billing, turnstiles, a member app, personal training, several gyms, per-user login, an LLM in the answers and an EN/ES interface are left for a next version, behind a human gate.