{"id":18924,"library":"wappi","title":"WAPPI","description":"WAPPI is a Node.js microservice API framework that provides a plain and practical interface for building APIs with built-in Prisma ORM integration, request validation, and automatic OpenAPI documentation. Current stable version is 3.4.8. Development is active, with regular releases. Key differentiators: zero-config Prisma integration, automatic route documentation via OpenAPI, and a plugin system for extending functionality. It simplifies building microservices by reducing boilerplate and enforcing structure.","status":"active","version":"3.4.8","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","API","Prisma","wappi","wapi","Framework"],"install":[{"cmd":"npm install wappi","lang":"bash","label":"npm"},{"cmd":"yarn add wappi","lang":"bash","label":"yarn"},{"cmd":"pnpm add wappi","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for database access and schema management; WAPPI integrates deeply with Prisma ORM.","package":"prisma","optional":false},{"reason":"Runtime Prisma client used by WAPPI for database queries.","package":"@prisma/client","optional":false}],"imports":[{"note":"ESM-only since v3. For CommonJS, use dynamic import: const { Wappi } = await import('wappi');","wrong":"const Wappi = require('wappi')","symbol":"Wappi","correct":"import { Wappi } from 'wappi'"},{"note":"Named export, not default. For TypeScript, ensure esModuleInterop is enabled.","wrong":"import endpoint from 'wappi'","symbol":"endpoint","correct":"import { endpoint } from 'wappi'"},{"note":"Use type-only import for TypeScript to avoid runtime overhead. Available since v3.4.0.","wrong":"import { WappiRequest } from 'wappi' (if only used as type)","symbol":"WappiRequest","correct":"import type { WappiRequest } from 'wappi'"}],"quickstart":{"code":"import { Wappi, endpoint, param, body, response } from 'wappi'\n\nconst app = new Wappi({\n  database: {\n    provider: 'sqlite',\n    url: 'file:./dev.db'\n  }\n})\n\nconst helloEndpoint = endpoint({\n  method: 'GET',\n  path: '/hello/:name',\n  handler: ({ name }) => `Hello, ${name}!`\n})\n\napp.addEndpoint(helloEndpoint)\n\napp.start(3000).then(() => console.log('Server running on http://localhost:3000'))","lang":"typescript","description":"Shows initializing WAPPI with SQLite database, defining a simple GET endpoint with a path parameter, and starting the server."},"warnings":[{"fix":"Use ESM imports or dynamic import().","message":"WAPPI v3 drops CommonJS support; require() will throw an error.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Pass `prisma` option in the Wappi constructor config object.","message":"The `usePrisma` method is deprecated in favor of setting Prisma in the constructor config.","severity":"deprecated","affected_versions":">=3.2.0"},{"fix":"Add `\"esModuleInterop\": true` to tsconfig.json compilerOptions.","message":"When using TypeScript, ensure `esModuleInterop` is true in tsconfig.json to avoid import issues.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Always annotate endpoints with `response({ status: 200, schema: ... })` for full documentation.","message":"WAPPI generates OpenAPI spec based on endpoint decorators; missing `response` decorator can cause missing response schemas.","severity":"gotcha","affected_versions":"all"},{"fix":"Use colon syntax for path parameters.","message":"Path parameters must be prefixed with colon (e.g., `/user/:id`); using curly braces `{id}` will not match.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add `\"type\": \"module\"` in package.json or rename file to .mjs.","cause":"Attempting to use ESM import in a CommonJS Node.js project without proper configuration.","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Run `npm install prisma` as a dependency.","cause":"Prisma package not installed or not in node_modules.","error":"Error: Cannot find module 'prisma'"},{"fix":"Check WAPPI version; upgrade to v3+ and use addEndpoint method.","cause":"Using an older version of WAPPI where addEndpoint was named addRoute or similar.","error":"TypeError: app.addEndpoint is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}