Uma nova era na gestão em saúde
Aurora is a multi-tenant SaaS platform for Brazilian healthcare clinics and medical practices. It covers scheduling, electronic medical records (prontuário), billing, telemedicine, patient portal, WhatsApp notifications, and more.
| Layer | Technology |
|---|---|
| Frontend | React 19 + Vite + TypeScript |
| Backend | Python 3.12 + FastAPI + SQLAlchemy 2.0 (async) |
| Database | PostgreSQL (Supabase) — schema aurora |
| Cache | Redis |
| Reverse Proxy | Caddy |
| Container | Docker Compose |
- Docker + Docker Compose
- Node.js 20+
- Python 3.12+
- A Supabase project (or local Supabase via
supabase start)
git clone https://github.com/md84/aurora.git
cd aurora
cp api/.env.example api/.env
# Edit api/.env with your real values (see Variables section below)cd api
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8019cd web
npm install
npm run dev
# Opens on http://localhost:5173cd /opt/stacks/aurora # or your local stack dir
docker compose up -dServices started:
| Container | Port | URL |
|---|---|---|
| aurora-api | 8019 | http://localhost:8019 |
| aurora-web | 8016 | http://localhost:8016 |
| aurora-lp | 8017 | http://localhost:8017 |
| aurora-lp-invest | 8018 | http://localhost:8018 |
Create api/.env from the template below:
# Database
DATABASE_URL=postgresql+asyncpg://user:pass@host:5432/db
REDIS_URL=redis://localhost:6379
# Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
SUPABASE_JWT_SECRET=...
# Security
SECRET_KEY=<32+ char random string>
FERNET_KEY=<Fernet.generate_key() output>
ENCRYPTION_KEY=<32 char string>
# WhatsApp (Evolution API)
EVOLUTION_API_URL=https://your-evolution-api.com
EVOLUTION_API_KEY=...
EVOLUTION_INSTANCE=aurora
# Telemedicine
DAILY_API_KEY=...
# Email
RESEND_API_KEY=...
# NFS-e (Focus NFe)
FOCUS_NFE_KEY=...
FOCUS_NFE_AMBIENTE=homologacao # or producao
# Sentry (optional)
SENTRY_DSN=...cd api
# Unit + integration tests (no external services)
pytest tests/ -v --ignore=tests/test_integrations_e2e.py
# With coverage report
pytest tests/ --cov=app --cov-report=term-missing --ignore=tests/test_integrations_e2e.py
# E2E tests (requires real services in .env)
pytest tests/test_integrations_e2e.py -vcd api
pip install ruff
ruff check . --select E,W,F --ignore E501Migrations are plain SQL files in api/migrations/ numbered sequentially (001_*.sql, 002_*.sql, …).
Apply all pending migrations:
# Against your Supabase project (psql)
for f in api/migrations/*.sql; do
psql "$DATABASE_URL" -f "$f"
doneCurrent applied migrations: 001 through 010 (see api/migrations/ for details).
rsync -av --delete /root/aurora/api/ /opt/stacks/aurora/api/ \
--exclude='__pycache__' --exclude='*.pyc'
cd /opt/stacks/aurora
docker compose up -d --build aurora-apirsync -av /root/aurora/web/src/ /opt/stacks/aurora/web/src/
cd /opt/stacks/aurora
docker compose up -d --build aurora-webEvery push to main that passes all CI jobs triggers the deploy webhook at https://deploy.aurora.hydrocore.com.br/webhook. The webhook runs the rsync + docker compose steps on the VPS automatically.
Required GitHub secrets:
| Secret | Purpose |
|---|---|
DEPLOY_WEBHOOK_SECRET |
HMAC key for webhook signature verification |
FERNET_KEY_CI |
Fernet key used in CI test environment |
push to main/develop
│
├── test-backend (pytest + coverage)
├── lint-backend (ruff)
└── test-frontend (tsc + vite build)
│
└── deploy (webhook) ← only on main push, all jobs green
Pull request checks (fast, no deploy):
open PR → lint-backend + typecheck-frontend
caddy (reverse proxy)
├── api.aurora.hydrocore.com.br → aurora-api:8019 (FastAPI)
├── aurora.hydrocore.com.br → aurora-web:8016 (React SPA)
├── lpaurora.hydrocore.com.br → aurora-lp:8017 (Landing Page)
└── lpaurorainvest.hydrocore.com.br → aurora-lp-invest:8018
aurora-api
├── PostgreSQL (Supabase, schema: aurora)
├── Redis (cache + job queue)
└── External: Evolution API, Daily.co, Focus NFe, Resend, Stripe
24 of 33 phases implemented. Key pending phases:
- Phase 11 — Landing Page (Next.js / standalone)
- Phase 13 — Stripe Subscriptions (full billing)
- Phase 14 — Transactional Emails (React Email templates)
- Phase 17 — Observability (Sentry dashboards, alerting)
- Phase 23 — TISS & Health Insurance Claims
- Phase 27 — Native PIX payments
See docs/PROMPT_DETALHADO_v5.md and docs/PROMPT_MESTRE_v6.md for the full specification.
Proprietary — Hydrocore Tecnologia. All rights reserved.