WAPPI Documentation
WAPPI is a TypeScript microservice API framework. It lets you build a functional, versioned API that runs serverless or as a monolith, with testing, documentation and simple local development built in. This WAPPI documentation covers everything from creating your first project to deployment.
Start here
All documentation pages
- Getting Started: Get started with WAPPI: create a project with npx wappi init, run the dev server, scaffold your first endpoint and test it in about two minutes.
- CLI Commands: Reference for the WAPPI CLI: init, create, build, delete, test, help and more, with shorthand commands and examples for each one.
- About WAPPI: What WAPPI is: a TypeScript framework for building functional APIs that run serverless or as a monolith, with testing, docs and local dev built in.
- AI Quick Reference: Compact WAPPI reference for AI coding agents: endpoint naming, folder layout, requests, Body data, versioning, CLI, testing and logging, plus rules-file snippets.
- Configuration: Configure a WAPPI project with wappi.json: API key, auth key rotation timing and other project settings, and when you need to rebuild.
- Environment Variables: Set up the WAPPI .env file from .env.example: environment (localhost, dev, stage, prod), frontend type paths and other required variables.
- Namespaces: How WAPPI's strict folder structure works: namespaces act like microservices, with endpoint names such as User_UpdateDetails_2_3_4.
- API Versioning: API versioning in WAPPI: every endpoint has its own semantic version folder, so you can deploy fixes without breaking your frontend or existing clients.
- Body Data: The Body parameter in WAPPI endpoints: the request data and built-in fields WAPPI passes to every endpoint function for observability and middleware.
- Webhooks: Receive third-party webhooks such as Stripe in WAPPI: Webhook_ endpoints, registering in API/index.ts, raw body signature checks and status codes.
- Query Language: WAPPI Query Language: include or exclude response fields on the server, like GraphQL field selection, to cut payload size and latency.
- Testing: Test WAPPI endpoints with the built-in TDD setup: every endpoint template ships an index.spec.ts, and wappi test runs it from the CLI.
- API Documentation (OpenAPI and Postman): WAPPI generates Internal and Public OpenAPI specs on wappi run, from each endpoint's README and types, ready to import into Postman or host.
- Deployment: Deploy a WAPPI API as serverless functions or on traditional servers, including example vercel.json and Dockerfile configurations.
- AWS EC2 Autoscaling: Deploying a WAPPI API to AWS EC2 with autoscaling. This guide and its template code are coming soon; see the main deployment page meanwhile.
- AWS Lambda Serverless: Deploying a WAPPI API serverless on AWS Lambda. This guide is coming soon; see the main WAPPI deployment page for current serverless options.
- Logging and Observability: Built-in observability in WAPPI: automatic request and error logging, with every endpoint wrapped in try/catch, so you can find issues in minutes.
- Health Checks: WAPPI ships a built-in health check endpoint that needs no configuration and returns 200 for all HTTP methods, ready for uptime monitoring.
- Security: Security in WAPPI: layered protection for your API, including request validation against your types and secure frontend to backend communication.
- Auth Keys: WAPPI auth keys: session tokens generated by the Core_Login endpoint that WAPPI rotates and manages automatically to secure user sessions.
- API Keys: Use API keys in WAPPI to authenticate and authorise access to your endpoints, configured in wappi.json and your environment variables.
- JWT Authentication: JWT authentication in WAPPI: issue JSON Web Tokens from a login endpoint for stateless, scalable user authentication and session management.
- Frontend Integration: Connect your frontend to a WAPPI API with wappi-fe, the companion client that keeps backend types in sync and handles requests and auth.
- Frontend Getting Started: Get up and running with wappi-fe in minutes: install and configure the client, then make your first typed call to your WAPPI API.
- Frontend Installation: Install wappi-fe with your package manager and set up automatic syncing of compiled WAPPI API types into your frontend project.
- Frontend Configuration: Configure wappi-fe and FRONTEND_PROJECT_PATHS so every wappi run copies your compiled API types into the frontend, keeping them in sync.
- Frontend Requests: Make typed API requests from your frontend with wappi-fe: request options, parameters and responses when calling WAPPI endpoints.
- Frontend Authentication: Handle authentication in wappi-fe: Core_Login sets a wappiAuthToken in localStorage, which secures calls between your frontend and WAPPI backend.
- Frontend Examples: Real-world wappi-fe examples, including building a reusable /API folder of typed calls to your WAPPI backend from different frontend frameworks.
- Examples: WAPPI endpoint examples for the TypeScript microservice API framework. This page is a work in progress; see the Security and Frontend pages for code.