fragments  by e2b-dev

Next.js template for AI-generated apps

created 1 year ago
5,685 stars

Top 9.1% on sourcepulse

GitHubView on GitHub
Project Summary

Fragments is an open-source Next.js template for building AI-powered applications, similar to Claude Artifacts or Vercel v0. It targets developers looking to create interactive AI experiences that can securely execute code generated by large language models. The primary benefit is a robust, customizable framework for integrating AI code execution into web applications.

How It Works

The application leverages the E2B SDK to securely run AI-generated code within sandboxed environments. It supports various programming languages and AI model providers, allowing for flexible integration. The architecture is built on Next.js 14 with App Router and Server Actions, utilizing shadcn/ui and TailwindCSS for the frontend, and the Vercel AI SDK for streaming AI responses.

Quick Start & Requirements

  • Install dependencies: npm i
  • Start development server: npm run dev
  • Prerequisites: Git, Node.js, npm, E2B API Key, LLM Provider API Key.
  • Setup involves cloning the repo, installing dependencies, and configuring API keys in a .env.local file.
  • Official documentation and demo available at fragments.e2b.dev.

Highlighted Details

  • Supports multiple LLM providers (OpenAI, Anthropic, Google AI, Mistral, Groq, etc.) and programming stacks (Python, Next.js, Vue.js, Streamlit, Gradio).
  • Enables custom sandbox template creation using E2B CLI and Dockerfiles.
  • Allows adding custom LLM models and providers by modifying JSON and TypeScript configuration files.
  • Features streaming AI responses in the UI.

Maintenance & Community

The project is developed by E2B. Contributions are welcomed via issues and pull requests.

Licensing & Compatibility

The project is open-source, with the specific license not explicitly stated in the README. Compatibility for commercial use or closed-source linking would require license clarification.

Limitations & Caveats

The README does not explicitly state the project's license, which is crucial for determining commercial use and compatibility. Some configuration options, like Vercel/Upstash KV or Supabase, suggest potential dependencies for certain features.

Health Check
Last commit

1 week ago

Responsiveness

1 week

Pull Requests (30d)
3
Issues (30d)
1
Star History
398 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
5 more.

LibreChat by danny-avila

0.8%
29k
Enhanced ChatGPT clone for self-hosting
created 2 years ago
updated 1 day ago
Feedback? Help us improve.