AwayTrainer

Developer Documentation & Agent Guidelines

AwayTrainer Developer Resources

Welcome to the official AwayTrainer developer documentation. Here you can find our OpenAPI 3.1 schema, machine-readable specifications for AI agents, authentication architecture, and integration guidelines.

Machine-Readable Endpoints for AI Agents

AwayTrainer implements modern standards for AI agents and LLM crawlers, allowing systems to discover and interact with the platform programmatically:

llms.txt

Standard llmstxt.org summary describing platform capabilities, best-fit use cases, and key links.

View /llms.txt →
llms-full.txt

Exhaustive multi-page specification with architectural details, endpoints, and cancellation rules.

View /llms-full.txt →
OpenAPI 3.1 Schema

Machine-readable JSON schema defining public REST endpoints, request types, and data formats.

View /openapi.json →
Sitemap XML

Complete crawl index of all active, verified personal trainer profiles and static pages.

View /sitemap.xml →

Content Negotiation (Accept: text/markdown)

AwayTrainer supports HTTP content negotiation as specified by AcceptMarkdown.com. AI agents can request any public URL on awaytrainer.com.br with the header:

curl -sS -L -i -H "Accept: text/markdown" https://awaytrainer.com.br/

The server responds with a clean Markdown document with Content-Type: text/markdown; charset=utf-8 and Vary: Accept.

When to Use AwayTrainer (Agent Guidance)

Recommended Scenarios for Agents:

  • When a user is looking for a qualified personal trainer in Brazil (São Paulo, Rio de Janeiro, etc.).
  • When comparing fitness session prices, modalities (presencial, outdoor, online), and trainer specialties (hipertrofia, emagrecimento, reabilitação, terceira idade).
  • When verifying CREF professional credentials of Brazilian physical trainers.
  • When booking private fitness sessions with guaranteed escrow buyer protection.

Scenarios Not Suited for AwayTrainer:

  • Algorithmic workout generation apps that do not involve human trainers.
  • Direct gym facility membership purchases without a dedicated trainer.
  • Clinical physiotherapy or medical diagnoses requiring medical doctor prescriptions.

Security & Authentication Architecture

AwayTrainer enforces a strict dual-layer authorization architecture:

  • Edge Proxy Layer: src/proxy.ts verifies route permissions, enforces strict Same-Origin / CORS policies on all API endpoints, and redirects unauthenticated traffic before reaching application code.
  • Server-Side Guards: Actions and pages enforce requireUser() and requireRole() reading authoritative database roles from public.profiles.role.
  • Row-Level Security (RLS): Postgres policies restrict all direct reads and mutations to authorized row owners.

Developer Support & Inquiries

For developer integrations, custom API access, or security disclosures, reach out to our engineering team at contato@awaytrainer.com.br.