HumanAI is a full-stack AI chat product template with a black Linear-inspired landing page, authenticated chat, model and subscription controls, a configurable admin console, file/image attachments, Markdown rendering, and Stripe billing.
The frontend is a React + Vite single-page app. The backend is a Go API backed by SQLite, with Docker Compose wiring /api through the frontend Nginx container.
| Landing page | Chat workspace |
|---|---|
![]() |
![]() |
| Mobile chat | Mobile model selector |
|---|---|
![]() |
![]() |
- Configurable landing page content, model tiers, pricing, and calls to action.
- Email/password authentication with secure HTTP-only session cookies.
- Chat conversations with live status updates and automatic refresh.
- Model selector with plan-based access and usage limits.
- Image and file attachments from file picker or paste.
- Markdown rendering for messages.
- Admin dashboard for content, plans, models, users, conversations, replies, and Stripe settings.
- Stripe Checkout, subscription portal, webhook handling, and admin-managed billing parameters.
- Responsive desktop and mobile UI with language detection for English, Chinese, and Japanese.
- Docker deployment with frontend
/apireverse proxy to the backend service.
- Frontend: React 19, TypeScript, Vite, React Router, TanStack Query, i18next, lucide-react.
- Backend: Go 1.24, net/http, SQLite, JWT, bcrypt.
- Data: SQLite database plus local upload storage.
- Deployment: Docker Compose, Nginx reverse proxy, optional Stripe webhooks.
cp .env.example .env
docker compose --env-file .env up --buildOpen http://localhost:8080 when using the default HUMANAI_HTTP_PORT from .env.example.
The default seeded admin account is:
- Email:
admin@humanai.local - Password:
change-me-admin
Change HUMANAI_ADMIN_EMAIL and HUMANAI_ADMIN_PASSWORD before the first boot in any shared or production environment.
Run the backend:
cd backend
go run ./cmd/serverRun the frontend in another terminal:
cd frontend
npm install
npm run devThe Vite dev server starts on http://localhost:5173 and proxies /api to http://localhost:8080.
| Variable | Default | Description |
|---|---|---|
HUMANAI_ADDR |
:8080 |
Backend listen address. |
HUMANAI_DATABASE |
humanai.db |
SQLite database path. |
HUMANAI_UPLOAD_DIR |
uploads |
Upload storage directory. |
HUMANAI_JWT_SECRET |
dev-secret-change-me |
JWT signing secret. Replace in production. |
HUMANAI_FRONTEND_URL |
http://localhost:5173 |
Public frontend URL used by backend flows. |
HUMANAI_ADMIN_EMAIL |
admin@humanai.local |
Seeded admin email on first boot. |
HUMANAI_ADMIN_PASSWORD |
change-me-admin |
Seeded admin password on first boot. |
STRIPE_SECRET_KEY |
empty | Optional Stripe secret fallback. Stripe can also be configured in the admin panel. |
STRIPE_WEBHOOK_SECRET |
empty | Optional Stripe webhook secret fallback. |
VITE_API_BASE |
empty | Optional frontend API origin. Leave empty when using the dev proxy or Docker Nginx proxy. |
HumanAI/
├── backend/ # Go API, SQLite schema, auth, chat, billing, admin handlers
├── frontend/ # React + Vite frontend
├── docs/assets/ # README hero and screenshots
├── docker-compose.yml # Production-style local deployment
├── .env.example # Docker Compose environment template
└── LICENSE # GPL-3.0 license
The admin console includes:
- Landing page copy and CTA editing.
- Subscription plan and Stripe price configuration.
- Model catalog and per-plan access limits.
- User role, subscription, and usage management.
- Conversation queue with pending conversations prioritized.
- Reply composition with Markdown, file attachments, and image attachments.
- Stripe API keys, Checkout Session parameters, Customer Portal settings, and setup guidance.
- Open the admin dashboard and go to Stripe settings.
- Choose test or live mode.
- Add the matching publishable key, secret key, and webhook signing secret.
- Configure plan fees in the plan editor. Saving a paid plan can generate or refresh the Stripe recurring Price ID.
- Configure the webhook endpoint at
/api/stripe/webhook.
For subscription mode, use payment methods supported by Stripe subscriptions. One-time-only methods are skipped by the backend when creating subscription checkout sessions.
- Do not commit
.env, SQLite databases, uploads, logs, or private deployment configs. - Replace the default admin credentials and JWT secret before exposing the app.
- Use HTTPS and a secure reverse proxy in production.
- Review Stripe live-mode configuration carefully before accepting payments.
HumanAI is released under the GNU General Public License v3.0. See LICENSE.




