Skip to content

SeimoDev/HumanAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HumanAI

HumanAI dark AI chat interface

License: GPL-3.0 Go React Vite Docker

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.

Screenshots

Landing page Chat workspace
HumanAI landing page HumanAI chat page
Mobile chat Mobile model selector
HumanAI mobile chat HumanAI mobile model selector

Features

  • 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 /api reverse proxy to the backend service.

Tech Stack

  • 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.

Quick Start

Docker Compose

cp .env.example .env
docker compose --env-file .env up --build

Open 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.

Local Development

Run the backend:

cd backend
go run ./cmd/server

Run the frontend in another terminal:

cd frontend
npm install
npm run dev

The Vite dev server starts on http://localhost:5173 and proxies /api to http://localhost:8080.

Environment Variables

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.

Project Structure

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

Admin Console

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.

Stripe Setup

  1. Open the admin dashboard and go to Stripe settings.
  2. Choose test or live mode.
  3. Add the matching publishable key, secret key, and webhook signing secret.
  4. Configure plan fees in the plan editor. Saving a paid plan can generate or refresh the Stripe recurring Price ID.
  5. 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.

Security Notes

  • 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.

License

HumanAI is released under the GNU General Public License v3.0. See LICENSE.

About

Full-stack AI chat product template with React, Go, SQLite, admin console, and Stripe billing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors