Skip to content

h9-tec/Open_Gamma

Repository files navigation

Open Gamma

AI-Powered Presentation Generator

Next.js React TypeScript Tailwind CSS Prisma License

Open-source alternative to Gamma.app - Create stunning presentations from any content using AI. Self-hosted, privacy-focused, and fully customizable.

Features | Quick Start | Documentation | Contributing


Open Gamma Presentation Sample

Overview

Open Gamma is a modern, self-hosted presentation generator that leverages AI to transform your ideas into professional presentations. Built with the latest web technologies and designed with privacy in mind, it offers a powerful alternative to cloud-based presentation tools.

Why Open Gamma?

  • Privacy First: Your data stays on your servers. No third-party tracking or data collection.
  • BYOK (Bring Your Own Key): Use your own API keys for AI providers - pay only for what you use.
  • Local AI Support: Run completely offline with Ollama integration.
  • Modern Stack: Built with Next.js 16, React 19, and the latest AI SDK.
  • Real-time Collaboration: Work together with your team using Yjs-powered sync.

Screenshots

Dashboard

Manage all your presentations in one place

Dashboard

Login

Secure authentication with multiple providers

Login

Register

Easy account creation

Register


Features

AI-Powered Generation

Generate complete presentations from:

  • Simple text prompts
  • Document uploads (PDF, DOCX)
  • URLs and web content
  • Existing outlines

Supports multiple AI providers including OpenAI, Anthropic Claude, Google Gemini, OpenRouter, and local Ollama models.

Rich Slide Editor

  • Drag-and-drop content blocks
  • Multiple layout templates
  • Rich text editing with Plate/Slate
  • Image search integration (Pexels, Pixabay)
  • Custom themes and styling
  • Speaker notes support

Real-time Collaboration

  • Live cursor tracking
  • Simultaneous editing
  • Role-based permissions (Viewer, Editor, Admin)
  • Conflict-free synchronization with Yjs

Export Options

Export your presentations in multiple formats:

  • PowerPoint (.pptx) - Full compatibility
  • PDF - High-quality print-ready
  • Public Link - Share with anyone
  • Embed - Embed in websites

Tech Stack

Category Technologies
Framework Next.js 16.0, React 19.2, TypeScript 5
Styling Tailwind CSS 4, shadcn/ui, Radix UI
Database Prisma 6 + SQLite (default) / PostgreSQL
Authentication NextAuth.js 5 (OAuth + Credentials)
AI Integration Vercel AI SDK 5, OpenAI, Anthropic, Google, OpenRouter, Ollama
Real-time Yjs, Hocuspocus, WebSockets
Rich Text Plate, Slate
State Management Zustand, TanStack Query
API tRPC (Type-safe RPC)
Export pptxgenjs, jsPDF, html2canvas

Quick Start

Prerequisites

  • Node.js 20+
  • npm or pnpm
  • (Optional) Docker & Docker Compose
  • (Optional) Ollama for local AI

Installation

# Clone the repository
git clone https://github.com/h9-tec/Open_Gamma.git
cd Open_Gamma

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local

# Initialize the database
npx prisma db push

# Start the development server
npm run dev

Open http://localhost:3000 in your browser.

Docker Deployment

# With GPU support (for local Ollama)
docker compose --profile gpu up -d

# CPU only
docker compose --profile cpu up -d

# Production build
docker compose -f docker-compose.prod.yml up -d

Configuration

Environment Variables

Create a .env.local file based on .env.example:

# Database
DATABASE_URL="file:./data/opengamma.db"

# Authentication (required)
AUTH_SECRET="your-super-secret-key-change-in-production"
NEXTAUTH_URL="http://localhost:3000"

# OAuth Providers (optional)
AUTH_GOOGLE_ID=""
AUTH_GOOGLE_SECRET=""
AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""

# AI Providers (at least one required)
OPENAI_API_KEY=""
ANTHROPIC_API_KEY=""
GOOGLE_API_KEY=""
OPENROUTER_API_KEY=""

# Local AI
OLLAMA_URL="http://localhost:11434"

# Image Search (optional)
PEXELS_API_KEY=""
PIXABAY_API_KEY=""

# Collaboration (optional)
NEXT_PUBLIC_HOCUSPOCUS_URL="ws://localhost:1234"

AI Provider Setup

Provider Setup Models
OpenAI Get key from platform.openai.com GPT-4o, GPT-4o-mini
Anthropic Get key from console.anthropic.com Claude 3.5 Sonnet, Claude 3 Opus
Google Get key from aistudio.google.com Gemini 2.0, Gemini 1.5 Pro
OpenRouter Get key from openrouter.ai Access to 100+ models
Ollama Install from ollama.ai Llama 3, Mistral, Gemma, etc.

Project Structure

open-gamma/
├── src/
│   ├── app/                    # Next.js App Router
│   │   ├── api/                # API routes (auth, tRPC)
│   │   ├── dashboard/          # User dashboard
│   │   ├── editor/[id]/        # Presentation editor
│   │   ├── presentations/      # Presentation management
│   │   └── login/, register/   # Authentication pages
│   │
│   ├── components/
│   │   ├── ui/                 # shadcn/ui components
│   │   ├── editor/             # Editor components
│   │   ├── dashboard/          # Dashboard components
│   │   └── layout/             # Layout components
│   │
│   ├── lib/
│   │   ├── ai/providers/       # AI provider factory
│   │   ├── auth/               # NextAuth configuration
│   │   ├── db/                 # Prisma client
│   │   └── trpc/               # tRPC setup
│   │
│   ├── server/trpc/routers/    # tRPC API routers
│   ├── stores/                 # Zustand stores
│   └── types/                  # TypeScript types
│
├── prisma/
│   └── schema.prisma           # Database schema
│
├── docker/                     # Docker configurations
├── images/                     # README images
└── data/                       # SQLite database (gitignored)

API Reference

Open Gamma uses tRPC for type-safe API communication. Key endpoints:

Presentations

// Create presentation
trpc.presentation.create.mutate({ title, description })

// Generate with AI
trpc.ai.generatePresentation.mutate({
  prompt,
  provider,
  model,
  slideCount
})

// Export
trpc.presentation.export.mutate({ id, format: 'pptx' | 'pdf' })

Themes

// Get all themes
trpc.theme.getAll.query()

// Create custom theme
trpc.theme.create.mutate({ name, colors, typography })

Development

# Run development server
npm run dev

# Run type checking
npx tsc --noEmit

# Run linting
npm run lint

# Database operations
npx prisma studio      # Open Prisma Studio
npx prisma db push     # Push schema changes
npx prisma migrate dev # Create migration

Roadmap

  • AI image generation for slides
  • Presentation templates marketplace
  • Advanced animations and transitions
  • Presenter mode with timer
  • Comments and annotations
  • Version history
  • Mobile responsive editor
  • Plugin system

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments


Website | Documentation | Issues

Made with love by the Open Gamma community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages