Open Source Alternative to V0/Lovable
Libra AI: Language as Application - Launch, iterate, and deploy your next web application with a single sentence.
π Try Now β’ π Documentation β’ π¬ Join Community β’ β‘ View Source
- Libra AI
- π What is Libra AI?
- ποΈ Technical Architecture
- β‘ Quick Start
- π Deployment Options
- π― Hosted Platform vs Open Source
- β Frequently Asked Questions
- π Open Source License
Libra AI is a production-ready AI-native development platform that enables full lifecycle management of web applications through natural language interaction. Built with modern technology architecture, it covers the complete engineering process from rapid prototyping to enterprise-grade production deployment.
Just as V0 is deeply integrated with the Vercel ecosystem, Libra is specifically designed for the Cloudflare Workers architecture, providing a native AI development experience.
- Multi-model integration: Claude, OpenAI, Gemini, DeepSeek, and more
- Natural language-driven production-grade code generation
- Intelligent context awareness and best practice adherence
- Multi-sandbox provider support (E2B, Daytona)
- Cloud IDE: syntax highlighting, smart indentation, custom plugins
- Hot Module Replacement (HMR) real-time preview
- Intelligent dependency analysis and automatic installation
- Seamless GitHub integration with one-way sync
- Cloudflare edge computing deployment
- Enterprise-grade identity authentication (OAuth 2.0)
- Stripe commercial subscription management
- Cloudflare Workers edge computing network
- Serverless architecture with elastic scaling
- Automated TLS/SSL certificate management
- Git version control with one-click rollback
- π Technical Autonomy: Avoid vendor lock-in risks
- π§ Architectural Flexibility: Support for deep customization and extension
- π Community Ecosystem: Open source community collaboration
Libra is built entirely on Cloudflare. You need to be familiar with the following products:
Product Name | Description | Application in Libra |
---|---|---|
Workers | Serverless computing platform | Core application runtime environment, hosting all service logic |
Durable Objects | Strong consistency storage | Real-time state management and session persistence |
Browser Rendering | Browser rendering service | Web screenshot generation and preview functionality |
Workers for Platforms | Multi-tenant platform | User project isolation deployment and routing management |
Product Name | Description | Application in Libra |
---|---|---|
KV | Global key-value storage | Configuration caching and temporary data storage |
D1 | Serverless SQLite database | Authentication data and lightweight business data |
Hyperdrive | Database connection acceleration | PostgreSQL connection pooling and query optimization |
R2 | Object storage service | File uploads, static assets, and build artifact storage |
Product Name | Description | Application in Libra |
---|---|---|
Turnstile | Smart CAPTCHA | Security verification for user registration and sensitive operations |
Cloudflare for SaaS | Custom domain management | Custom domain binding and SSL certificates for user projects |
Product Name | Description | Application in Libra |
---|---|---|
Workflows | Workflow orchestration | Step-by-step management of complex deployment processes |
Queues | Message queue service | Asynchronous task processing and batch deployment management |
AI Gateway | AI model gateway | Monitor and control your AI applications |
Images | Image processing optimization | Dynamic image transformation and CDN distribution |
Libra adopts Turborepo Monorepo architecture design:
libra/
βββ apps/ # Core application services
β βββ auth-studio/ # Authentication management console (D1 + drizzle-kit)
β βββ builder/ # Vite build service - code compilation and deployment
β βββ cdn/ # Hono CDN service - static asset management
β βββ deploy/ # Deployment service V2 - Cloudflare Queues
β βββ deploy-workflow/ # Deployment service V1 - Cloudflare Workflows (deprecated)
β βββ dispatcher/ # Request routing dispatcher (Workers for Platforms)
β βββ docs/ # Technical documentation site (Next.js + FumaDocs)
β βββ email/ # Email service previewer (React Email)
β βββ opennext-cache/ # OpenNext cache service (Cloudflare)
β βββ screenshot/ # Screenshot service - Cloudflare Queues
β βββ vite-shadcn-template/# Project template engine (Vite + shadcn/ui)
β βββ web/ # Next.js 15 main application (React 19)
βββ packages/ # Shared package modules
β βββ api/ # API layer (tRPC + type safety)
β βββ auth/ # Authentication service (better-auth)
β βββ better-auth-cloudflare/ # Cloudflare authentication adapter
β βββ better-auth-stripe/ # Stripe payment integration
β βββ common/ # Common utility library and type definitions
β βββ db/ # Main database schema and operations (PostgreSQL)
β βββ email/ # Email service components
β βββ middleware/ # Middleware services and tools
β βββ sandbox/ # Unified sandbox abstraction layer (E2B + Daytona)
β βββ shikicode/ # Code editor (Shiki syntax highlighting)
β βββ templates/ # Project scaffolding templates
β βββ ui/ # Design system (shadcn/ui + Tailwind CSS v4)
βββ tooling/ # Development tools and configuration
β βββ typescript-config/ # Shared TypeScript configuration
βββ scripts/ # GitHub environment variable management
π Authentication Management Center (apps/auth-studio
)
- User, organization, permission, and subscription lifecycle management
- Main database uses PostgreSQL (via Neon + Hyperdrive), authentication data uses D1 (SQLite)
- OAuth 2.0 multi-provider authentication system
- Stripe commercial payment gateway integration
π¨ Build Compilation Service (apps/builder
)
- Vite high-performance build engine with millisecond-level hot startup
- Automatic code compilation and seamless production deployment
- Multi-tech-stack project template rapid instantiation
πΊ Content Distribution Service (apps/cdn
)
- Hono framework-driven file management system
- Intelligent image processing and compression optimization
- Global CDN edge caching acceleration
- Cloudflare Workers edge deployment
π Deployment Service V2 (apps/deploy
)
- Modern deployment architecture based on Cloudflare Queues
- Batch processing and concurrency control
- D1 database state management
- Dead letter queue handling for failed deployments
- Comprehensive error handling and retry logic
β‘ Deployment Service V1 (apps/deploy-workflow
, deprecated)
- Deployment orchestration based on Cloudflare Workflows
- Step-by-step deployment process and state management
- Built-in retry mechanism and error recovery
- Support for complex deployment scenarios and dependency management
π Request Routing Service (apps/dispatcher
)
- Workers for Platforms core routing component
- Route user domain requests to corresponding Worker instances
- Dynamic Worker scheduling and lifecycle management
- Custom domain binding and SSL certificate handling
- Unified authentication and access control layer
- Cloudflare SaaS for Platforms integration
π Technical Documentation Site (apps/docs
)
- FumaDocs modern documentation solution
- Cloudflare Workers global distribution
π§ Email Notification Service (apps/email
)
- React Email component-based email development
- Multi-scenario email template engine
π OpenNext Cache Service (apps/opennext-cache
)
- Next.js Cloudflare deployment cache optimization
- OpenNext framework and Cloudflare Workers integration
- Seamless integration with main web application deployment
πΈ Screenshot Service (apps/screenshot
)
- Cloudflare Queues-based screenshot generation
- Asynchronous queue processing for web screenshot requests
- Automated website preview image generation
- R2 storage for screenshot files
- Batch processing and error retry
π¨ Project Scaffolding Service (apps/vite-shadcn-template
)
- Vite high-performance build toolchain
- Fast compilation and production deployment
- Pre-configured shadcn/ui + Tailwind CSS v4
- Visual template selection and preview
π Core Web Application (apps/web
)
- Next.js 15 App Router + React 19 technology stack
- Platform main interface and user interaction layer
- AI-driven intelligent conversation and project management
- Real-time code editing, preview, deployment, and version control
- Cloudflare Workers serverless deployment
Technology Framework | Application Scenario | Version |
---|---|---|
Next.js | React full-stack development framework (App Router) | 15.3.5 |
React | User interface library (Server Components) | 19.1.1 |
TypeScript | Statically typed JavaScript superset | 5.8.3+ |
Tailwind CSS | Utility-first CSS framework | 4.1.11 |
shadcn/ui | Component library and design system | Based on Radix UI |
Radix UI | Unstyled accessible UI primitive library | 1.2.x-1.3.x |
Motion | Modern animation engine | 12.23.11 |
Lucide React | Vector icon library | 0.486.0 |
Technology Framework | Application Scenario | Version |
---|---|---|
tRPC | End-to-end type-safe API development | 11.4.3+ |
Hono | Edge computing web framework | 4.8.10+ |
Zod | TypeScript data validation library | 4.0.14 |
Drizzle ORM | Type-safe TypeScript ORM | 0.44.4 |
better-auth | Modern identity authentication solution | 1.3.4 |
AI Platform | Features | API Version |
---|---|---|
AI SDK | Multi-provider AI model integration | 4.3.19 |
E2B | Secure code execution sandbox | 1.2.0-beta.5 |
Daytona | Development environment sandbox provider | Latest |
Integrated AI Models | ||
Anthropic Claude | Advanced reasoning and code generation | API v1 |
Azure OpenAI | Enterprise-grade AI model service | API v1 |
Google Gemini | Multimodal AI capabilities | API v1 |
DeepSeek | Cost-effective code generation | API v1 |
Database Technology | Application Scenario | Version |
---|---|---|
Neon | Main database (PostgreSQL) | 17+ |
Cloudflare Hyperdrive | Database connection pooling and acceleration | Latest |
Cloudflare D1 | Edge database (SQLite) | Latest |
Drizzle Kit | Database migration tool | 0.31.4+ |
Platform Technology | Application Scenario | Version |
---|---|---|
Cloudflare Workers | Serverless edge computing platform | Latest |
OpenNext | Next.js Cloudflare deployment adapter | 1.6.2 |
Turborepo | High-performance Monorepo build system | 2.5.5 |
Bun | JavaScript runtime and package manager | 1.2.19 |
Tool | Purpose | Version |
---|---|---|
Biome | Code formatting and quality checking | 2.0.6 |
Vitest | Unit testing framework | 3.2.4 |
Paraglide.js | Internationalization i18n solution | 2.2.0 |
- Visit libra.dev to get started
- Quick registration with GitHub OAuth or email
- Build production-grade applications in minutes
- Complete source code access and control
- Deep customization development and extension
- Private/enterprise-grade deployment
# System dependency requirements
git --version # >= 2.30.0
node --version # >= 20.0.0 (recommend 24)
bun --version # >= 1.0.0
git clone https://github.com/nextify-limited/libra.git
cd libra
bun install
# (Optional) Generate i18n files for apps/web
cd apps/web && bun run prebuild && cd ../..
cp .env.example .env
Edit the .env
file to configure necessary environment variables.
Main database (PostgreSQL) initialization:
# Generate and run migrations from project root
cd packages/db
bun db:generate
bun db:migrate
Authentication database (D1/SQLite) initialization:
# Test D1 database connection (local environment)
cd apps/web && bun wrangler d1 execute libra --local --command='SELECT 1'
# Generate and run authentication database migrations
cd packages/auth
bun db:generate
bun db:migrate
# Start all services
bun dev
# Or start main application separately
cd apps/web && bun dev
Configure corresponding products:
stripe listen --forward-to localhost:3000/api/auth/stripe/webhook
After setup, you can access various services through the following addresses:
- Core Application (web): http://localhost:3000
- Email Preview (email): http://localhost:3001
- Authentication Management (auth-studio): http://localhost:3002
- Technical Documentation (docs): http://localhost:3003
- CDN Service (cdn): http://localhost:3004
- Build Service (builder): http://localhost:5173 (Vite default port)
- Template Service (vite-shadcn-template): http://localhost:5173 (Vite default port, may conflict with builder)
- Routing Service (dispatcher): http://localhost:3007
- Deployment Service V2 (deploy): http://localhost:3008
- Screenshot Service (screenshot): http://localhost:3009
- Deployment Service V1 (deploy-workflow, deprecated): http://localhost:3008 (shares port with Deployment Service V2)
Ready-to-use cloud development experience:
- Visit libra.dev official platform
- Quick registration with GitHub OAuth or email
- AI-driven rapid application building
- One-click deployment to custom domains
Cloud Service Advantages:
- Zero-configuration out-of-the-box
- Elastic scaling and automatic updates
- Built-in AI model integration
- Enterprise-grade technical support
1. Deploy Libra Platform Itself
All Libra platform services are deployed on Cloudflare Workers:
# Deploy various services to Cloudflare Workers
# Refer to the following workflow files for complete deployment process:
# - .github/workflows/web.yml - Main application deployment
# - .github/workflows/cdn.yml - CDN service deployment
# - .github/workflows/deploy.yml - Deployment service deployment
# - .github/workflows/dispatcher.yml - Routing service deployment
# - .github/workflows/screenshot.yml - Screenshot service deployment
# - .github/workflows/docs.yml - Documentation site deployment
2. Deploy User Projects as PaaS Platform
Libra uses Workers for Platforms technology to provide project deployment capabilities for users, offering two deployment service architectures:
-
Workers for Platforms Architecture:
- Each user project is deployed as an independent Worker
- Intelligent routing through
dispatcher
service - Support for custom domain binding
- Completely isolated runtime environment (process-level isolation through Workers for Platforms)
-
Deployment Service Architecture Options:
V2 Queue Architecture (
apps/deploy
):- Cloudflare Queues: Asynchronous queue processing for deployment tasks
- Batch Processing: Support for concurrency control and batch deployment
- Dead Letter Queue: Retry mechanism for handling failed deployments
- Use Cases: High concurrency, large-scale deployment needs
V1 Workflow Architecture (
apps/deploy-workflow
, deprecated):- Cloudflare Workflows: Step-by-step deployment orchestration
- State Persistence: Built-in state management and recovery mechanism
- Complex Processes: Support for complex deployment dependencies and conditional logic
- Use Cases: Complex deployment processes, scenarios requiring precise control
-
General Deployment Process:
- Verify user permissions and project quotas
- Create sandbox environment for secure building (supports E2B or Daytona)
- Sync project files
- Execute build commands (
bun install
&bun build
) - Deploy to user's Worker instance using Wrangler API
- Update routing configuration, clean up temporary environment
-
Technical Features:
- Sandbox Environment: Secure isolated build environment (supports E2B or Daytona)
- Global Distribution: Leverage Cloudflare edge computing network
- Flexible Architecture: Choose appropriate deployment service based on needs
Feature | Hosted Platform | Open Source | Notes |
---|---|---|---|
π€ AI Code Generation | β Out-of-the-box | β Requires API key configuration | Multi-AI provider integration |
π§ Development Environment | β Zero configuration | β Requires sandbox environment setup | Cloud IDE and real-time preview |
π GitHub Integration | β One-click connection | β Requires OAuth authorization setup | Repository auto-creation and sync |
π Deployment Service | β Built-in support | β Requires deployment environment setup | Cloudflare native integration |
π¨ Editor | β Full features | β Basic visual editing | Visual editing and preview |
π Data Control | π Cloud hosted | β Complete private control | Self-hosted data complete control |
π οΈ Custom Development | β Unlimited customization | Source-level modification and extension | |
π Technical Support | β Professional service | π€ Community support | Official service vs open source community |
π° Cost Structure | π° Pay-as-you-go | π Infrastructure costs | SaaS subscription vs self-maintenance |
- π Quick Launch: No complex configuration needed, start application development immediately
- πΌ Business Priority: Focus on product development rather than infrastructure operations
- π₯ Team Collaboration: Need enterprise-grade team management features
- π Professional Service: Expect official technical support and SLA guarantees
- π Automatic Operations: Want platform automated updates and maintenance
- π Data Autonomy: Complete control over data storage and processing
- π§ Deep Customization: Need to modify core functionality or integrate proprietary business logic
- π° Cost Control: Have technical team, need to optimize long-term operational costs
- π Special Deployment: Specific region/private network/offline environment deployment
- π Technical Learning: Deep understanding of complete technical architecture design
Q: What are the core differences between the hosted platform and open source version?
A: Cloud hosting is an official SaaS service, ready to use upon registration, including complete AI capabilities and enterprise-grade features. Open source version provides core source code, supports self-deployment and deep customization, but requires self-configuration of AI APIs and operational environment.
Q: How complete are the features in the open source version?
A: The open source version includes the platform's core functional architecture. We follow the principle of "99% features open source, 1% commercial services" to ensure developers can access complete technical capabilities.
Q: What technical background is required to use Libra?
A: Depends on usage method:
- Hosted platform users: No technical background required, just need to use a browser
- Local developers: Need basic web development knowledge and Node.js experience
- Self-hosted deployment: Need server and DevOps practical experience
Q: How is the quality of AI-generated code?
A: We always pursue production-grade code quality:
- Complete TypeScript type safety guarantee
- Follow modern React development patterns and industry best practices
- Responsive design implementation based on Tailwind CSS
- Accessible components integrated with Radix UI
- Clear and maintainable code structure and comments
Q: Can I customize AI behavior and prompts?
A: Full customization is supported in the open source version:
- Custom AI prompt engineering
- Flexible model selection logic configuration
- Modify code generation templates
- Integrate third-party AI services
Q: Can Libra be used for commercial projects?
A: Absolutely. We provide multiple commercial solutions:
- Hosted platform: Business-friendly pay-as-you-go model
- Open source version: Follows AGPL-3.0 open source license, requires derivative projects to also be open source
- Commercial licensing: Provides commercial open source licenses for enterprises requiring closed-source deployment
Q: How about data security and privacy protection?
A: We provide different levels of data protection solutions:
- Hosted platform: Data processed in our secure infrastructure, compliant with international security standards
- Self-hosted deployment: You have complete control over data storage, processing, and access permissions
- Enterprise customization: Can provide customized solutions based on special security requirements and compliance needs
Q: Do you provide enterprise-grade technical support?
A: Yes. Our enterprise services include:
- Private cloud environment deployment
- Custom feature development services
- Dedicated technical support team
- Service Level Agreement (SLA) guarantees
- Security auditing and compliance support
For enterprise services, please contact: [email protected]
Q: Which deployment platforms are supported?
A: Currently only supports deployment on Cloudflare
Q: How to participate in open source project contributions?
A: We warmly welcome community contributions. For specific methods, please refer to the Community Contribution Guidelines below.
We warmly welcome contributions from developers worldwide! Here are the ways you can participate:
- Experience Libra platform and share your usage experience
- Create amazing application projects and showcase them in the community
- Write technical blog articles or create tutorial videos
- Share and recommend Libra on social media platforms
# 1. Fork our repository on GitHub
# 2. Clone your fork to local
git clone https://github.com/your-username/libra.git
cd libra
# 3. Create feature development branch
git checkout -b feature/your-amazing-feature
# 4. Develop and test thoroughly
bun install
bun dev
# 5. Commit code with clear commit messages
git commit -m "feat: add incredible new feature"
# 6. Push branch and create Pull Request
git push origin feature/your-amazing-feature
- Documentation Improvement: Improve usage guides, add example code, fix documentation errors
- Issue Reporting: Help us discover and locate system issues
- Feature Suggestions: Propose improvement ideas and new feature requirements
- Multi-language Support: Help translate Libra into more languages
- Project uses Paraglide.js for internationalization
- Translation file location:
apps/web/messages/[locale].json
- Add new language: Add language code in
apps/web/project.inlang/settings.json
- Community Support: Help other users in forum and GitHub discussions
- Please follow our Code of Conduct
- Read and follow Contribution Guidelines
- Use standardized commit message format (Conventional Commits)
- Provide corresponding test cases for new features
- Update relevant documentation in a timely manner
Libra is released under the GNU Affero General Public License v3.0 open source license.
- π Free Use: Free to use for personal, educational, and commercial projects
- π§ Modification and Customization: Free to modify and extend code functionality
- π€ Distribution and Sharing: Can share with others under the same license
- π’ Commercial Deployment: Allowed for commercial purpose deployment
- π Retain Copyright Information: Must retain original copyright notices
- π Open Source Derivative Works: Must provide source code for any modifications
- π§ Network Service Open Source: Must open source when providing services over network
- π Use Same License: Derivative works must use AGPL-3.0 license
If you need more flexibility, we provide commercial licenses suitable for:
- Closed-source proprietary modifications
- Product distribution without open sourcing
- Customized licensing terms
Commercial licensing consultation: [email protected]
We welcome community participation in roadmap planning:
- π Feature Requests
- π¬ Roadmap Discussion
- π§ Enterprise Requirements
Thanks to the following excellent sponsors for their valuable support to the Libra project, enabling us to focus on building better AI development experiences for developers:
Clerk - The most comprehensive user management platform
E2B - E2B is an open-source runtime environment for executing AI-generated code in secure cloud sandboxes, suitable for intelligent agents and AI application scenarios.
PostHog - A single platform for analytics, testing, observing, and deploying new features
Daytona - Daytona is a secure and resilient infrastructure for running AI-generated code
Cloudflare - Global leading edge computing and network infrastructure provider