fragments

Open-source Next.js template for building apps that are fully generated by AI. By E2B.

Visit WebsiteView on GitHub
6.2k
Stars
+519
Stars/month
0
Releases (6m)

Overview

Fragments is an open-source Next.js template that enables developers to build applications entirely generated by AI, similar to Claude Artifacts, Vercel v0, or GPT Engineer. Built with Next.js 14, shadcn/ui, TailwindCSS, and Vercel AI SDK, it uses the E2B SDK to securely execute AI-generated code in isolated environments. The platform supports multiple development stacks including Python interpreter, Next.js, Vue.js, Streamlit, and Gradio, while integrating with various LLM providers like OpenAI, Anthropic, Google AI, Mistral, and others. Key features include streaming UI updates, automatic npm/pip package installation, and integration with Morph for efficient code editing. This makes it valuable for developers who want to create AI-powered applications that can generate, execute, and iterate on code safely without compromising system security.

Pros

  • + Comprehensive multi-stack support with 5 different development environments (Python, Next.js, Vue.js, Streamlit, Gradio)
  • + Secure code execution through E2B SDK isolation, allowing safe running of AI-generated code
  • + Extensive LLM provider compatibility supporting 8+ providers including OpenAI, Anthropic, and local models via Ollama

Cons

  • - Requires multiple API keys (E2B + LLM provider) which adds setup complexity and ongoing costs
  • - Dependency on E2B's cloud infrastructure for code execution may introduce latency or availability concerns
  • - Limited to predefined stack templates, requiring custom development to add new frameworks or languages

Use Cases

Getting Started

1. Clone the repository and run `npm i` to install dependencies. 2. Create `.env.local` file with your E2B API key and preferred LLM provider API key (OpenAI, Anthropic, etc.). 3. Run the development server and start building AI-generated applications through the web interface.