Custom functions are server-side handlers you author and deploy alongside your Archie app. Use them when the auto-generated CRUD APIs are not enough — webhook receivers, scheduled jobs, complex transactions, third-party API calls.Documentation Index
Fetch the complete documentation index at: https://archie.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
When to write a function vs. extend the API
- Auto-generated CRUD endpoint — sufficient for most reads and writes
- Custom function — for arbitrary logic, integrations, side effects, or complex orchestration
Anatomy of a function
A function has:- Name — used as the route key or trigger identifier
- Trigger — HTTP request, scheduled cron, webhook receiver, or queued job
- Handler code — the body, written in your project’s backend language
- Configuration — environment variables, integration credentials it needs, timeouts
- Response shape — what callers receive (for HTTP/webhook triggers)
What is here
- Writing custom functions — authoring patterns and language details
- Deploying custom functions — pushing to staging and production
FAQ
What language do functions use?
What language do functions use?
The language of your project’s backend stack — typically TypeScript on Node, but matches whatever you chose in the blueprint.
Are functions cold-started?
Are functions cold-started?
Depends on deployment target. Archie-hosted functions are warm-pooled to minimize cold starts.
Can a function call another function?
Can a function call another function?
Yes. Use the generated client or a direct HTTP call.