Documentation
Getting started
Run the Astro site and Phoenix control plane locally, then walk the current alpha workflow.
Getting started
Textree is split into two apps:
apps/sitefor the public Astro siteapps/webfor the Phoenix app, developer API, webhooks, and MCP endpoints
Local workflow
- Install Node 22+, Elixir 1.19+, Erlang/OTP 28+, and PostgreSQL.
- Copy
apps/web/.env.exampletoapps/web/.env.local. - Copy
apps/site/.env.exampletoapps/site/.env.local. - Generate a Proton SMTP Submission token before sending real local email.
- Run
pnpm setupfrom the repo root. - Start Astro with
pnpm --dir apps/site dev. - Start Phoenix with
cd apps/web && mix phx.server.
Local URLs
- Astro public site:
http://localhost:4321 - Phoenix app and API:
http://localhost:4001
Environment groups
Environment variables are scoped by responsibility:
- Phoenix local runtime:
apps/web/.env.local - Astro local public config:
apps/site/.env.local - production deploy/admin operations:
devops/env/prod.env.local - test deploy/admin operations:
devops/env/test.env.local
Do not use root env files. Only scoped example files are committed.
First-run alpha workflow
Once the stack is up:
- Sign up or log in through Textree at
/signupor/login. - Open
/app. - Use a Textree access token with
messages:writefor API calls. - Confirm the recipient is not under a workspace suppression.
- Set a spend limit.
- Optionally create a funding session for Peer-backed balance visibility.
- Use the Textree bearer token against
POST /api/v1/messages. - Poll
GET /api/v1/messages/:idor inspect/appfor provider and funding state.
Verification commands
pnpm testpnpm verifypnpm app:testpnpm www:checkpnpm www:build
What the current alpha guarantees
- stable route namespaces
- Neon-ready Ecto config
- Oban queues for messaging and webhook work
- Phoenix-native auth and local identity normalization
- workspace and campaign suppression enforcement
- provider STOP/opt-out reconciliation into workspace suppressions
- spend authorization before provider execution
- verified messaging and funding webhook ingestion
- MCP execution audits, quotas, and timeout policy
What is not public yet
The current alpha still keeps some critical setup inside the authenticated app rather than public API endpoints:
- workspace/campaign suppression management
- spend-limit management
- funding-session creation