About AI Character Roleplay Platform
AI character chat, payments, creator revenue, admin panel & one-file rebranding
Overview This is the complete source code of an AI character chat platform that ran in production. Users browse and chat with AI characters, create and publish their own, and pay for usage with credits or a premium subscription. It's been fully white-labeled: one config file sets your name, domain, logo, and color palette, and a step-by-step guide walks you from an empty server to a live site. You're buying the product and months of development time, not a business. There's no user base, revenue, or brand included (details below). Features Characters Multi-step character creator: personality, scenario, multiple opening messages, example dialogues, image gallery AI-assisted generator: describe a character in a sentence and get a full draft Lorebooks: world facts injected into the chat only when their keywords come up Content rating per character (SFW / NSFW) and visibility (public, unlisted share link, private) Ownership transfer between accounts, downloadable character card image, comments, favorites, reports Chat Streamed AI replies, regenerate and swipe between alternatives, edit and delete messages User personas, long-term memory summaries, pinned chats Works with any model on OpenRouter, with an automatic fallback model if the main one fails Users can connect their own OpenRouter key (stored encrypted) Monetization Credits per AI reply, free daily credits with streaks, one-off credit packs Monthly premium subscription: cheaper messages, monthly bonus credits, longer memory, profile perks Discount codes, Stripe Checkout, billing portal, webhooks — all prices managed from the admin panel Creator economy Creators earn a share of the credits spent on their characters, paid out as platform credits Creator dashboard with analytics, earnings, goals, and badges Community Customizable profiles, guestbooks, follows, notifications, leaderboard Achievement badges, seasonal events, homepage banners, site-wide announcements Safety and moderation Local NSFW image classifier on every upload (no third-party API) Detection of characters written as minors, which forces safe-for-work rules Platform rules built into the AI's system prompt, plus reporting and moderation tools Admin panel Users, character moderation, reports, pricing, discount codes, banners, badges, events, announcements Dashboards: sales, usage, AI spend (OpenRouter), traffic (Cloudflare), online users SEO and operations Generated link-preview images for the site and every character, sitemap, structured data, instant indexing (IndexNow) Public status page, nightly database backups, zero-downtime deploy script Tech stack Next.js 14 (App Router) TypeScript Tailwind CSS PostgreSQL + Prisma Redis NextAuth (email, Google, two-factor) Stripe OpenRouter Resend Docker PM2 Caddy What's included Full source code, white-labeled: one file controls name, domain, logo, and colors Documentation: setup and rebranding guide, architecture map, commented configuration Deployment templates: Docker Compose (Postgres + Redis), PM2, Caddy, deploy and backup scripts Clean database schema with a single initial migration The NSFW image-classifier model file What's not included Users, traffic, or revenue The original brand, domain, or social accounts Legal texts ready to use: the Terms, Privacy, and Cookie pages are complete templates, but you need to fill in your details and have them reviewed for your jurisdiction Running costs A single VPS (4 GB RAM) runs the whole stack. AI usage is pay-as-you-go through OpenRouter and is covered by the credits users buy. Asking price: 7000$ Payment through escrow. The code is delivered as an archive, plus the model file.