Skip to content

🎯 Capsulas Framework - Modular TypeScript framework with visual editor. Build production apps 90% faster with AI-powered capsules. 13 ready-to-use capsules, 487 tests passing.

License

Notifications You must be signed in to change notification settings

hublabdev/capsulas-framework

Repository files navigation

🎨 Capsulas Framework

The WordPress of Apps

Build production-ready applications visually in minutes, not weeks.

License TypeScript Tests Capsules PRs Welcome

Getting Started β€’ Documentation β€’ Examples β€’ Contributing


πŸš€ What is Capsulas?

Capsulas is an open-source visual development framework that lets you build complete applications by connecting pre-built, type-safe modulesβ€”just like WordPress plugins, but for any type of app.

πŸ’‘ The Problem

Building modern apps requires:

  • ❌ Weeks of boilerplate code
  • ❌ Complex API integrations
  • ❌ Repetitive authentication logic
  • ❌ Database setup and migrations
  • ❌ Deployment configuration
  • ❌ Type safety across services

Result: 2-4 weeks just to build an MVP.

✨ The Solution

# Clone and build (npm package coming soon)
git clone https://github.com/hublabdev/capsulas-framework.git
cd capsulas-framework
npm install && npm run build

# Use a template
cd examples/saas-starter
npm install
node index.js

Result: Production app running in 5 minutes. ⚑


🎯 Why Capsulas?

🎨 Visual First

Drag, drop, and connect modules in our n8n-style editor. No more boilerplate.

πŸ”’ Type Safe

Full TypeScript support. Connections are validated at compile-time.

πŸ’» Real Code

Generates clean TypeScript you own. No vendor lock-in. Deploy anywhere.

πŸ“¦ 23 Capsules

Auth, databases, AI, payments, email, and more. Batteries included.

πŸš€ One-Click Deploy

Deploy to Vercel, Railway, AWS, or anywhere with a single command.

🌍 Open Source

MIT licensed. Built by the community, for the community.


πŸ“Š Capsulas vs Alternatives

Feature Capsulas n8n Zapier Bubble Retool
Visual Builder βœ… βœ… βœ… βœ… βœ…
Generates Code βœ… ❌ ❌ ❌ ❌
Type Safety βœ… ❌ ❌ ❌ ⚠️
Self-Hosted βœ… βœ… ❌ ❌ ⚠️
Own the Code βœ… ❌ ❌ ❌ ❌
Open Source βœ… ⚠️ ❌ ❌ ❌
Pricing Free Free/Paid Paid Paid Paid

πŸ—οΈ Quick Start

Installation

# Clone the repository
git clone https://github.com/hublabdev/capsulas-framework.git
cd capsulas-framework

# Install dependencies
npm install

# Build all packages
npm run build

# Run tests (500 tests passing)
npm test

Your First Application

Choose a template to get started:

Option 1: SaaS Starter

cd examples/saas-starter
npm install
node index.js

Features:

  • βœ… JWT Authentication (register/login)
  • βœ… PostgreSQL Database
  • βœ… Stripe Subscriptions ($29/$99/$299 plans)
  • βœ… Email Notifications
  • βœ… Redis Cache
  • βœ… Complete demo included

View SaaS Starter β†’

Option 2: E-commerce Store

cd examples/ecommerce-store
npm install
node index.js

Features:

  • βœ… Product Catalog with Search
  • βœ… Shopping Cart Management
  • βœ… Stripe Checkout Integration
  • βœ… Order Processing
  • βœ… Email Confirmations
  • βœ… File Uploads

View E-commerce Template β†’


🧩 Available Capsules (23 Total)

πŸ” Authentication

  • jwt-auth - JWT token-based authentication
  • oauth - OAuth 2.0 (Google, GitHub, Facebook, Twitter, Microsoft, LinkedIn)

πŸ—„οΈ Data & Storage

  • database - SQL/NoSQL databases (PostgreSQL, MongoDB, MySQL, SQLite)
  • cache - Caching (Redis, Memory)
  • storage - File storage (S3, Google Cloud Storage, Azure, Cloudflare R2)

πŸ€– AI & ML

  • ai-chat - Chat completions (OpenAI, Anthropic, Llama)

πŸ“§ Communication

  • email - Email sending (SendGrid, Resend, Nodemailer)
  • notifications - Multi-channel notifications (Email, Push, SMS, Slack)
  • websocket - Real-time WebSocket connections

πŸ’³ Payments

  • payments - Payment processing (Stripe, PayPal, Square, Braintree)

βš™οΈ Processing

  • queue - Job queues with retry logic
  • http - HTTP client with retries

🎨 UI & Frontend

  • form-builder - Dynamic form generation
  • theme - Theme management (light/dark/system)
  • router - Client-side routing (Hash, History, Memory)
  • state - State management (Redux-style)

πŸ› οΈ Utilities

  • validator - Input validation (Zod, Yup, Joi)
  • logger - Structured logging (Winston, Pino, Bunyan)
  • encryption - Data encryption (AES, RSA)
  • file-upload - File upload handling
  • geolocation - Geolocation services
  • i18n - Internationalization
  • analytics - Analytics (Google Analytics, Mixpanel, Segment)

See all capsules β†’


🎨 Example Templates

1. SaaS Starter

Complete SaaS application with authentication, billing, and database.

const { initialize, registerUser, subscribeToPlan } = require('./examples/saas-starter');

await initialize();

// Register new user with 14-day trial
const user = await registerUser({
  email: 'user@example.com',
  password: 'SecurePass123!',
  name: 'John Doe',
  company: 'Acme Inc'
});

// Subscribe to Pro plan ($99/month)
await subscribeToPlan(user.id, 'pro');

Use Cases:

  • SaaS products
  • Subscription services
  • B2B platforms
  • Member portals

Full Documentation β†’

2. E-commerce Store

Complete online store with products, cart, and checkout.

const { initialize, createProduct, addToCart, createCheckout } = require('./examples/ecommerce-store');

await initialize();

// Create a product
const product = await createProduct({
  name: 'Wireless Headphones',
  price: 99.99,
  stock: 50
});

// Add to cart and checkout
await addToCart('session-123', product.id, 2);
const checkout = await createCheckout('session-123', 'customer@example.com');

Use Cases:

  • Online stores
  • Marketplaces
  • Digital products
  • Physical goods

Full Documentation β†’


πŸ“¦ Architecture

This is a monorepo containing:


πŸ› οΈ Development

Prerequisites

  • Node.js >= 18.0.0
  • npm >= 9.0.0

Setup

# Clone repository
git clone https://github.com/hublabdev/capsulas-framework.git
cd capsulas-framework

# Install dependencies
npm install

# Build all packages
npm run build

# Run tests
npm test

# Start visual editor
cd packages/web
node server.cjs
# Open http://localhost:3050

Running Tests

# Run all tests (500 tests)
npm test

# Run specific test file
npm test -- packages/capsules/src/database/__tests__/service.test.ts

# Watch mode
npm test -- --watch

πŸš€ Deployment

Vercel

cd examples/saas-starter
npm install -g vercel
vercel

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
CMD ["node", "index.js"]

Railway / AWS / Others

See our Deployment Guide for platform-specific instructions.


πŸ“– Documentation


🀝 Contributing

We love contributions! Capsulas is built by the community.

Ways to contribute:

Contributing guide β†’


πŸ“Š Project Stats

  • 23 Capsules - Production-ready modules
  • 500 Tests - 100% passing
  • 290 Files - Clean, organized codebase
  • TypeScript - Full type safety
  • MIT License - Free forever

🌟 Community


πŸ“„ License

MIT Β© hublab.dev

See LICENSE for more information.


πŸ™ Acknowledgments

Built with:

  • TypeScript
  • Node.js
  • Vitest
  • And the amazing open-source community

⭐ Star us on GitHub β€” it helps!

Made with ❀️ by the Capsulas community

Get Started β€’ View Examples β€’ Read Docs

About

🎯 Capsulas Framework - Modular TypeScript framework with visual editor. Build production apps 90% faster with AI-powered capsules. 13 ready-to-use capsules, 487 tests passing.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •