One Function. Every Protocol. Zero Duplication.
Write your logic once. Wire it to HTTP, WebSockets, queues, scheduled tasks, CLI, or AI tools (via Model Context Protocol). Same logic. Different protocols.
1. Define Your Function
export const getCard = pikkuFunc<
  { cardId: string },
  { id: string; title: string; status: string }
>({
  func: async ({ database, channel }, { cardId }) => {
    const card = await database.query('cards', {
      where: { id: cardId }
    })
    // Works with WebSocket channels and SSE too!
    if (channel) {
      await channel.send({ type: 'card-fetched', card })
    }
    return card
  },
  permissions: { owner: requireOwner },
  docs: {
    summary: 'Fetch a card by ID',
    tags: ['cards']
  }
})
2. Wire to Any Protocol


3. Deploy Anywhere

✓ Same authentication, permissions, and validation across all protocols
What Developers Say
Real feedback from teams using Pikku in production
"So many places in my code base have like three entry points: CLI, public (sometimes protected) HTTP API and internally from within the API. Would be so nice having everything just an invoke away. With Nest it's a pain because you basically have to start the whole API up just to run CLI command."
Alex Harley
Co-founder @ Superbridge
"Ever been annoyed at having to write your code different in a Lambda than in an express handler? Pikku fixes that."
Christoph Sitter
CTO @ spot
Ship Faster, Maintain Less
Write your business logic once and deliver features across all protocols instantly. One source of truth means fewer bugs, faster iterations, and the flexibility to pivot without rewrites.
Tiny runtime with minimal overhead. Bundles as small as 50KB for single-function deployments.
How Teams Use Pikku
Real-world scenarios where one function serves multiple use cases
Marta
The Challenge:
Caregivers, patients, and administrators all need different portals with different permissions—but sharing the same backend
With Pikku:
Write matching logic once. One backend serves caregiver portal, patient portal, and admin dashboard. Each portal has its own cookies and permissions, all managed by Pikku's session system.
Benefits:
- ✓Single backend for all user types
- ✓Different permissions per portal
- ✓Shared business logic, isolated access
HeyGermany
The Challenge:
Nurses, employers, and admin staff need separate interfaces with different data access—all from one backend
With Pikku:
Write eligibility logic once. One backend serves nurse applications, employer dashboards, and admin verification. Each user type gets different cookies and permission filters automatically.
Benefits:
- ✓Multiple portals, one codebase
- ✓Role-based access control
- ✓Unified credential validation
BambooRose
The Challenge:
Customer admins, end users, and internal ops need different views of the same release data—with strict access boundaries
With Pikku:
Write deployment tracking once. One backend powers customer dashboards, user portals, and ops CLI. Session-based permissions ensure each user type sees only their data.
Benefits:
- ✓Single source of truth
- ✓Fine-grained access control
- ✓Consistent data across all portals
Why I Built Pikku
Three core principles that drove Pikku's creation
Cost Optimization
Start optimizing your infrastructure budget by having full freedom to switch deployments at any time
Speed & Type Safety
Build fast without any runtime lock-in, with TypeScript having your back
AI-Era Quality
Simplicity means dramatically better generated code quality
— Yasser Fadl, Creator of Pikku
Bundle Only What You Deploy
Run as a monolith (~2.8MB), microservices (~180KB), or individual functions (~50KB). Pikku's tree-shaking creates the smallest bundle for your deployment.
Use CLI flags to filter by routes, tags, or function types—deploy exactly what you need, nothing more.
Learn about deployment strategies and bundle optimization →Get Started in Minutes
Create your first Pikku app with one command. You'll have a function running across HTTP, WebSockets, and more in under 5 minutes.
Code Examples
Explore live Pikku examples. Functions stay the same - just the deployment changes.
- HTTP
- WebSocket
- SSE
- Scheduled
- Queues
- RPC
- MCP
Ready to Simplify Your Backend?
Stop duplicating logic. Write once, deploy anywhere with Pikku.



