{"_id":"@allyinthecode/fastnode","name":"@allyinthecode/fastnode","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@allyinthecode/fastnode","version":"2.0.0","description":"FastAPI-inspired Express framework with automatic OpenAPI/Swagger docs and Zod validation","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"build":"tsc --project tsconfig.json","dev":"ts-node --project tsconfig.dev.json example/server.ts","start":"node dist/index.js","test":"node test.js"},"keywords":["express","swagger","openapi","zod","typescript","fastapi","validation","docs","rest","api"],"author":"","license":"MIT","dependencies":{"express":"^5.2.1","swagger-ui-express":"^5.0.1","zod":"^3.23.8","zod-to-json-schema":"^3.23.3"},"devDependencies":{"@types/express":"^5.0.0","@types/swagger-ui-express":"^4.1.8","ts-node":"^10.9.2","typescript":"^5.4.5"},"_id":"@allyinthecode/fastnode@2.0.0","gitHead":"3672dfc03a660082044373e8a4ccfb645950d4d2","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-9iDyBJm+1KIVgjapzeAJB6onX9QxGTT4vLFe2gpWxpVkdZB4csp0wX9OxIeKe/mcN/LaJL2+CfLETpNFdnxYdg==","shasum":"ba0cbbe793bd98546d6d384035b9c9e0659ab507","tarball":"https://registry.npmjs.org/@allyinthecode/fastnode/-/fastnode-2.0.0.tgz","fileCount":23,"unpackedSize":54311,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICgrYCS5UngZ7L710LvcCpZ/e3rWPVm8Z3Yaj0q53f4oAiAhgl6yADhmqdW1GPL347JJGYN8D5DLt3uOKP5jGoBJXA=="}]},"_npmUser":{"name":"allyinthecode","email":"allyasadzade@gmail.com"},"directories":{},"maintainers":[{"name":"allyinthecode","email":"allyasadzade@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fastnode_2.0.0_1776119043410_0.8136747598436072"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-13T22:24:03.252Z","2.0.0":"2026-04-13T22:24:03.562Z","modified":"2026-04-13T22:24:03.889Z"},"maintainers":[{"name":"allyinthecode","email":"allyasadzade@gmail.com"}],"description":"FastAPI-inspired Express framework with automatic OpenAPI/Swagger docs and Zod validation","keywords":["express","swagger","openapi","zod","typescript","fastapi","validation","docs","rest","api"],"license":"MIT","readme":"# 🚀 FastNode\n\n**FastNode** is a lightweight, developer-first Node.js framework that brings a **FastAPI**-like developer experience to the Node.js ecosystem. It enhances **Express** with automatic validation, OpenAPI documentation, and TypeScript-powered type safety using **Zod**.\n\n## 🌟 Why FastNode?\n\nBuilding APIs in Express often requires repetitive manual work:\n\n- ❌ Manual request validation\n- ❌ Manual API documentation (Swagger)\n- ❌ No built-in type safety\n- ❌ Boilerplate-heavy route setup\n\n**FastNode** solves this by unifying everything into a single source of truth: **your schema**.\n\n## ⚡ Key Features\n\n- 🛡️ **Zod-powered validation**: Validate request body, query, and params automatically.\n- 📄 **Automatic OpenAPI generation**: No manual Swagger/YAML files needed.\n- 📊 **Built-in Swagger UI**: Explore and test your API instantly at `/docs`.\n- 💎 **TypeScript-first experience**: Fully inferred types from schemas.\n- 🚀 **Express-compatible**: Built on top of Express with zero complexity loss.\n\n## 📦 Installation\n\n```bash\nnpm install @allyinthecode/fastnode zod express swagger-ui-express\n```\n\n## 🚀 Quick Start\n\n```typescript\nimport { createApp, z } from \"@allyinthecode/fastnode\";\n\nconst app = createApp({\n  title: \"My API\",\n  version: \"1.0.0\"\n});\n\n// Define schema once\nconst UserSchema = z.object({\n  username: z.string().min(3),\n  email: z.string().email()\n});\n\n// Create route with automatic validation + docs\napp.post(\n  \"/users\",\n  {\n    summary: \"Create a new user\",\n    body: UserSchema,\n    tags: [\"Users\"]\n  },\n  (req, res) => {\n    // req.body is fully typed!\n    const { username, email } = req.body;\n\n    res.status(201).json({\n      message: \"User created successfully\",\n      data: { username, email }\n    });\n  }\n);\n\n// Swagger UI\napp.docs();\n\napp.listen(3000, () => {\n  console.log(\"Server running on http://localhost:3000\");\n  console.log(\"Docs available at http://localhost:3000/docs\");\n});\n```\n\n## 🧠 Core Concept\n\nFastNode is built on one principle: **Define once. Validate everywhere. Document automatically.**\n\nYou define your schema using Zod, and FastNode handles:\n1. Request validation\n2. Type inference\n3. OpenAPI schema generation\n4. Swagger documentation\n\n## 🔧 Example\n\n```typescript\nconst ProductSchema = z.object({\n  name: z.string(),\n  price: z.number(),\n  inStock: z.boolean()\n});\n\napp.post(\"/products\", {\n  body: ProductSchema,\n  summary: \"Create product\"\n}, (req, res) => {\n  res.json({ ok: true });\n});\n```\n\n## 📊 What FastNode Generates Automatically\n\n- OpenAPI 3.0 specification\n- Swagger UI interface (`/docs`)\n- Request validation middleware\n- Typed request objects\n\n## 🧩 Philosophy\n\nFastNode is not trying to replace Express. It is designed to be a minimal abstraction layer that upgrades Express into a modern API framework without increasing complexity.\n\n## 📄 Tech Stack\n\n- Node.js\n- Express.js\n- Zod\n- TypeScript\n- Swagger UI\n\n## 📌 Roadmap\n\n- [ ] Middleware system\n- [ ] Decorator-based API (`@Get`, `@Post`)\n- [ ] Response schema validation\n- [ ] Plugin system\n- [ ] CLI tool (`fastnode create`)\n\n## 📄 License\n\nMIT © 2026\n","readmeFilename":"README.md","_rev":"1-61481c934b6559cb5e130b036a79a457"}