freshcrate
Home > AI Agents > mangostudio

Description

AI-powered image generation and chat studio

README

GHBanner

MangoStudio

AI-powered image generation and chat studio supporting Gemini, OpenAI-compatible, and Anthropic models.

πŸ‡§πŸ‡· Leia em PortuguΓͺs

Prerequisites

  • Bun (v1.3.11+)
  • One or more API keys for supported providers (Gemini, OpenAI-compatible, Anthropic)

Installation

  1. Clone the repository:

    git clone <repo-url>
    cd mangostudio
  2. Install dependencies:

    bun install
  3. Start the development servers:

    bun run dev

    This starts:

    • API at http://localhost:3001 (Elysia + Kysely/SQLite)
    • Frontend at http://localhost:5173 (Vite + React)

Connector Configuration (Secrets)

MangoStudio has a flexible multi-connector system for managing multiple API keys with different persistence levels.

Supported Persistence Methods

  1. OS Secret Store β€” Native secure storage via Bun.secrets. Recommended for maximum security.
  2. config.toml β€” Stores keys in ~/.mango/config.toml. Ideal for sharing keys across instances or CLI tools.
  3. .env file β€” Adds variables to the .mango/.env file.

How to Configure

Go to the Settings page in the MangoStudio interface to add and manage connectors.

For each connector, you can enable or disable specific models (e.g., Gemini 2.5 Flash, Gemini 2.0 Flash Image). MangoStudio automatically selects the correct connector based on the active model in the chat.

Terminal Sync

You can manually add keys to ~/.mango/config.toml:

[gemini_api_keys]
personal = "your-key-here"
work = "another-key-here"

MangoStudio will sync these keys automatically the next time the Settings page is loaded or a generation is requested.

Project Structure

mangostudio/
β”œβ”€β”€ .mango/            # Example configuration
β”‚   └── config.toml.example
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ routes/        # Elysia endpoints (chats, messages, settings, auth…)
β”‚   β”‚       β”œβ”€β”€ services/      # Business logic (gemini, secret-store)
β”‚   β”‚       β”œβ”€β”€ plugins/       # Reusable middlewares (auth, rate-limit)
β”‚   β”‚       └── db/            # Kysely + SQLite + migrations
β”‚   β”œβ”€β”€ frontend/
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ components/
β”‚   β”‚       β”‚   └── ui/        # Design system (Button, Input, Card, Spinner, Toast)
β”‚   β”‚       β”œβ”€β”€ features/      # Feature modules (chat, gallery…)
β”‚   β”‚       β”œβ”€β”€ hooks/         # React hooks (use-i18n, use-app-state…)
β”‚   β”‚       └── routes/        # TanStack Router pages
β”‚   └── shared/
β”‚       └── src/
β”‚           β”œβ”€β”€ contracts/     # Request/response DTOs
β”‚           β”œβ”€β”€ types/         # Domain types
β”‚           β”œβ”€β”€ i18n/          # pt-BR / en dictionaries + useI18n hook
β”‚           └── test-utils/    # Shared mock factories
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ pt-br/
β”‚   β”‚   └── README.md          # Portuguese documentation
β”‚   └── TESTING.md             # Testing strategy and guide
β”œβ”€β”€ package.json               # Bun workspace root
└── tsconfig.json              # Base TypeScript configuration

Main Scripts

Command Description
bun install Install all workspace dependencies
bun run dev Start all dev servers concurrently
bun run build Build the frontend for production
bun run build:binary Generate standalone binaries with embedded frontend
bun run format Apply Prettier across all workspaces
bun run format:check Check formatting across all workspaces
bun run lint ESLint across all workspaces
bun run lint:fix ESLint autofix across all workspaces
bun run typecheck TypeScript type-check across all workspaces
bun run fix Apply lint autofix and Prettier across workspaces
bun run check Format check + lint + typecheck + tests
bun run verify Check + coverage + build
bun run test Run all unit and integration tests
bun run test:coverage Frontend coverage via Vitest/v8
bun run migrate Run SQLite database migrations

Architecture

Layer Technologies
Frontend React 19, Vite 8, Tailwind CSS v4, TanStack Router/Query
API Elysia, Better Auth, native rate limiting
Database SQLite via Kysely (type-safe query builder)
AI Multi-provider (Gemini, OpenAI-compatible, Anthropic)
Runtime Bun β€” no Node.js dependency
i18n Pure TypeScript dictionary in @mangostudio/shared/i18n

Design System

The frontend ships with a built-in design system under apps/frontend/src/components/ui/:

  • Button β€” variants primary, secondary, ghost; loading prop
  • Input β€” label, error message, spread of InputHTMLAttributes
  • Card β€” variants glass (glassmorphism) and solid
  • Spinner β€” loading indicator with sizes sm, md, lg
  • Toast β€” non-blocking notifications via useToast() hook

Internationalization (i18n)

UI strings are centralized in @mangostudio/shared/i18n. Supports pt-BR (default) and en, with automatic detection via navigator.language.

import { useI18n } from '@/hooks/use-i18n';

function MyComponent() {
  const { t } = useI18n();
  return <h1>{t.auth.loginTitle}</h1>;
}

The Messages type is inferred directly from the pt-BR.ts dictionary (as const). Adding a key without translating it in en.ts is a compile-time error.

Standalone Build Notes

The bun run build:binary command compiles the API into platform-specific binaries under .mango/out/<platform>/.

  • The database is persisted at ~/.mangostudio/database.sqlite by default.
  • Frontend assets are served from the public/ directory next to the executable.

License

This project is licensed under the MIT License.

Release History

VersionChangesUrgencyDate
main@2026-04-21Latest activity on main branchHigh4/21/2026
0.0.0No release found β€” using repo HEADHigh4/9/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

learn-claude-codeBuild a minimal Claude-style AI agent from scratch that processes messages, interacts with tools, and generates dynamic responses.main@2026-04-21
claw-marketEnable autonomous agents to create, trade, and scale digital products and services across decentralized marketplaces efficiently.main@2026-04-21
uix-ai-agentπŸ€– Generate UI & UX flows for web and mobile apps using natural language prompts with UIX AI Agent, your intelligent design assistant.main@2026-04-21
ai-notes-apiNo descriptionmaster@2026-04-21
opencode-cowork-pluginsProvide standalone Windows CLI plugins for OpenCode to research, draft, and analyze sales, marketing, and data tasks efficiently.main@2026-04-21