App Overview
Sample Appnest app
A frontend and backend app built on the Appnest stack: you implement business logic and UI; the framework and engine handle dev routing, HTTP wiring, React setup, and bundling for local development and pack.
- Backend — See App Backend (
app-backend/server.js, manifest registration,$fetch,$db, etc.). - Frontend — See App Frontend (React root, Twigs, calling the backend,
{ statusCode, body }vs SDK helpers).
At a high level every app root has three pillars:
app-frontend/— UI users see (plus optionalapp-install-frontend/).app-backend/— Server code the platform invokes; exports must matchmanifest.json.manifest.json— Declares locations, functions, events,installation_parameters, OAuth, andwhitelisted_domains.
For the development engine (proxy, CLI, zip), see Overview and Commands.
Project structure
| Path | Required? | Role |
|---|---|---|
app-backend/ | Yes | server.js — backend entry; exports drive API + events. |
app-frontend/ | Yes | Main React (or template) UI; built dist for pack. |
app-install-frontend/ | Optional | Separate install / onboarding UI. |
manifest.json | Yes for packaging | Platform contract (see Configuration below). |
.env | Recommended | Ports, pack paths, CLIENT_SCRIPT_URL, … |
Edit app-* trees and root config only—not appnest-* engine packages.
Configuration
| Topic | Document |
|---|---|
Manifest schema, examples, installation_parameters, OAuth tables | Manifest |
Product UI locations (full_page_app, …) | Product Location |
Appnest Functions (summary)
Platform-backed helpers: backend modules inside app-backend, and frontend helpers to call named server functions.
Overview: Appnest Functions
| Surface | Doc |
|---|---|
Backend modules ($fetch, $db, $file, $schedule, $next, …) | App Backend (table + links to each topic) |
Frontend invoke (appBackendInvoke, global client, …) | App Frontend & Frontend Functions |
Day-to-day commands
From the app root (next to manifest.json):
appnest-development-engine app init # scaffold
appnest-development-engine app start # proxy + backend + frontends
appnest-development-engine app validate # lint + manifest
appnest-development-engine app pack # build + zip
validate— Backend + frontend lint andmanifest.jsonchecks.pack— Usuallyapp-frontend,app-backend, optionalapp-install-frontend,manifest.json,.env, plus optionalPACK_FOLDER_PATHS/PACK_FILE_PATHS.- Treat
.envas sensitive.
Cross-cutting reminders
process.cwd()is the project root; the engine usesORIGINAL_CWDfor child processes (see engine docs).- Keep manifest,
server.jsexports, and docs aligned when renaming or adding functions.
Full documentation (this developer site)
| Topic | Document |
|---|---|
| Backend entry, SDK modules, rules | App Backend |
| Frontend entry, Twigs, invoke patterns, UX | App Frontend |
| Manifest & locations | Manifest, Product Location |
| Appnest Functions concept + deep links | Appnest Functions overview |
| Engine & CLI | Development Engine overview, Commands |
| Twigs component library (external) | twigs.surveysparrow.com |