λꡬλ AI μΊλ¦ν°λ₯Ό λ§λ€κ³ , λννκ³ , 곡μ νλ μ€νμμ€ νλ«νΌ
OpenPerso is a self-hostable, open-source alternative to Character.AI. Build your own AI character platform with full control over your data, models, and user experience.
- π Open Source β Full transparency. Self-host on your own infrastructure.
- π€ Model Agnostic β Works with any OpenAI-compatible API (OpenAI, Claude, local LLMs via Ollama, etc.)
- π§ Memory System β Characters remember past conversations with hybrid global + per-character memory.
- π¨ One-Click Creation β Generate a complete character from just a name and description.
- π Shareable β Create characters and share them with the community.
- π± Mobile Ready β PWA support for mobile home screen installation.
|
|
|
|
|
|
πΈ Screenshots
π Explore β νλ₯΄μλ νμ
|
π Persona β μΊλ¦ν° μμΈ
|
π¬ Chat β μ€μκ° λν
|
β¨ Create β μν΄λ¦ μμ±
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (Next.js 16) β
β β
β Landing β Explore β Create β Chat β Profile β Pricing β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β HTTP / SSE
ββββββββββΌβββββββββ
β FastAPI Backend β
β β
β Auth β Chat β
β Persona β LLM β
β Memory β TTS β
β Image β Admin β
ββββ¬βββββββ¬βββββββ¬β
β β β
βββββββββββββ β βββββββββββββ
β β β
ββββββΌββββββ βββββββββΌββββββββ ββββββββΌβββββββ
βPostgreSQL β β Redis β β MinIO β
β+ pgvector β β Cache/Queue β β S3 Storage β
ββββββββββββ βββββββββββββββββ βββββββββββββββ
| Layer | Technology |
|---|---|
| Frontend | Next.js 16 (App Router), TypeScript, Tailwind CSS, shadcn/ui |
| Backend | FastAPI, Python 3.12, SQLAlchemy 2.0 (async), Alembic |
| Database | PostgreSQL 16 + pgvector |
| Cache | Redis |
| Storage | MinIO (S3-compatible) |
| LLM | Any OpenAI-compatible API |
| TTS | OpenAI TTS API |
| Auth | JWT + Google OAuth |
| Infra | Docker Compose (dev) β Kubernetes (prod) |
- Docker & Docker Compose (for PostgreSQL, Redis, MinIO)
- Node.js 20+ and npm
- Python 3.12+
- uv (recommended Python package manager)
- OpenAI API Key (or any OpenAI-compatible API)
git clone https://github.com/Daewooki/OpenPerso.git
cd OpenPerso
# Copy environment template
cp .env.example .envEdit .env and fill in your API keys:
# Required: Your LLM API key
LLM_API_KEY=sk-your-openai-api-key
LLM_SUB_API_KEY=sk-your-openai-api-key
# Change in production!
SECRET_KEY=your-secret-key-here
POSTGRES_PASSWORD=your-secure-passworddocker-compose up -dThis starts PostgreSQL (port 5434), Redis (port 6381), and MinIO (port 9200).
cd backend
# Install dependencies
uv sync
# Run database migrations
PYTHONPATH=. uv run alembic upgrade head
# Start the server
PYTHONPATH=. .venv/bin/uvicorn app.main:app --reload --port 8200An admin account is auto-created on first startup (configure via ADMIN_EMAIL and ADMIN_PASSWORD in .env).
cd frontend
# Install dependencies
npm install
# Start dev server
npm run dev -- -p 3200Visit http://localhost:3200 and start creating AI characters!
cd backend
PYTHONPATH=. .venv/bin/python scripts/seed_personas.pyThis adds 6 sample characters (Einstein, Sherlock Holmes, Coding Mentor, etc.)
openperso/
βββ backend/
β βββ app/
β β βββ api/v1/ # REST API endpoints
β β β βββ auth.py # Login, register, JWT
β β β βββ chat.py # SSE streaming chat
β β β βββ personas.py # CRUD + generation
β β β βββ explore.py # Featured, trending, new
β β β βββ guest.py # Guest trial (3 turns)
β β β βββ voice.py # TTS endpoints
β β β βββ ...
β β βββ models/ # SQLAlchemy ORM models
β β βββ schemas/ # Pydantic validation
β β βββ services/ # Business logic
β β β βββ chat.py # Chat + streaming
β β β βββ llm.py # LLM abstraction layer
β β β βββ memory.py # Memory extraction
β β β βββ persona_gen.py # AI character generation
β β β βββ image_gen.py # Image generation
β β β βββ tts.py # Text-to-speech
β β β βββ ...
β β βββ workers/ # Background tasks
β βββ alembic/ # DB migrations
β βββ scripts/ # Seed data, utilities
βββ frontend/
β βββ src/
β βββ app/ # Next.js pages (App Router)
β β βββ (auth)/ # Login, Register
β β βββ (main)/ # Explore, Chat, Create, Profile
β β βββ trial/ # Guest trial
β βββ components/ # Reusable React components
β βββ hooks/ # Custom React hooks
β βββ lib/ # API client, utilities
β βββ types/ # TypeScript definitions
βββ nginx/ # Reverse proxy config
βββ docker-compose.yml # Dev infrastructure
βββ docker-compose.prod.yml # Production deployment
βββ docs/ # Planning documents
All configuration is done via .env file. See .env.example for the full list.
| Variable | Description | Required |
|---|---|---|
LLM_API_KEY |
OpenAI (or compatible) API key | β |
LLM_MODEL |
Main chat model (default: gpt-4o) |
|
LLM_SUB_API_KEY |
API key for auxiliary tasks | β |
LLM_SUB_MODEL |
Auxiliary model (default: gpt-4o-mini) |
|
SECRET_KEY |
JWT signing secret | β prod |
POSTGRES_PASSWORD |
Database password | β prod |
ADMIN_EMAIL |
Auto-created admin email | |
ADMIN_PASSWORD |
Auto-created admin password | |
GOOGLE_CLIENT_ID |
Google OAuth client ID | |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret |
OpenPerso works with any OpenAI-compatible API:
# OpenAI (default)
LLM_API_URL=https://api.openai.com/v1
LLM_MODEL=gpt-4o
# Ollama (local)
LLM_API_URL=http://localhost:11434/v1
LLM_MODEL=llama3
# Any OpenAI-compatible provider
LLM_API_URL=https://your-provider.com/v1
LLM_MODEL=your-model-nameOpenPerso includes a built-in freemium pricing UI β ready for monetization.
- Text chat with SSE streaming
- AI character generation (one-click)
- Memory system (global + per-character)
- AI avatar generation
- In-chat image generation
- Voice output (TTS)
- Guest trial mode
- Explore page (featured, trending, new)
- PWA support
- SEO (sitemap, OG tags)
- Voice input (real-time STT)
- Voice chat mode (bidirectional)
- Avatar animation (lip-sync)
- Group chat (multiple characters)
- Character marketplace
- Creator analytics dashboard
- Plugin system
- Multi-language support (i18n)
Contributions are welcome! See CONTRIBUTING.md for guidelines.
# Fork β Clone β Branch β Code β PR
git checkout -b feature/amazing-feature
git commit -m 'feat: add amazing feature'
git push origin feature/amazing-featureThis project is licensed under the MIT License.
- FastAPI β Modern Python web framework
- Next.js β React framework
- shadcn/ui β UI component library
- OpenAI API β LLM, TTS, and image generation
β Star this repo if you find it useful!
Made with β€οΈ by Daewooki







