Skip to content

theLucius7/NapCatWebChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NapCatWebChat

Web-based QQ chat client powered by NapCat, with AI chat summaries, RSS export, and a Telegram-inspired dark UI.

Setup Wizard

✨ Features

  • 🔐 One-time setup — Configure NapCat connection once, password-only login after
  • 💬 Telegram-style chat UI — Dark theme, glassmorphism, smooth animations
  • 👥 Groups & Friends — Browse all QQ groups and contacts with search
  • 📨 Send & Receive — Real-time messaging via WebSocket
  • 🤖 AI Summary — One-click chat summary powered by free Pollinations API
  • 📡 RSS Feed — Subscribe to any group's messages via RSS reader
  • 🛡️ Secure — JWT authentication, bcrypt password hashing, token stored server-side

🏗️ Architecture

Browser (React SPA) ←→ NapCatWebChat Server (Express) ←→ NapCat (OneBot v11 WS) ←→ QQ
Layer Technology
Frontend Vite + React + TypeScript + Zustand
Backend Express + ws + better-sqlite3
Auth JWT + bcryptjs
AI Pollinations API (free, no key needed)
Protocol OneBot v11 WebSocket

📦 Quick Start

Prerequisites

  1. Deploy NapCat and login your QQ account
  2. Enable Forward WebSocket in NapCat config
  3. Node.js 18+

Install & Run

git clone https://github.com/theLucius7/NapCatWebChat.git
cd NapCatWebChat
npm run install:all
npm run dev

Open http://localhost:5173 and follow the setup wizard.

Setup Wizard

  1. WS URL — Your NapCat WebSocket address (e.g. ws://your-server:3001)
  2. Token — NapCat access token (leave empty if not set)
  3. Password — Set a web access password

Connection Options

Scenario WS URL to fill
NapCat on same machine ws://localhost:<port>
NapCat on remote server (public) ws://<server-ip>:<port>
NapCat on remote server (SSH tunnel) Run ssh -N -L 13001:127.0.0.1:<port> user@server, then use ws://localhost:13001

📁 Project Structure

NapCatWebChat/
├── server/                 # Backend
│   └── src/
│       ├── index.ts        # Express + WS server
│       ├── db.ts           # SQLite config store
│       ├── auth.ts         # JWT + bcrypt auth
│       ├── napcat.ts       # OneBot v11 WS client
│       ├── ai.ts           # AI summary (Pollinations)
│       ├── rss.ts          # RSS feed generator
│       └── routes/         # API endpoints
├── client/                 # Frontend
│   └── src/
│       ├── pages/          # Setup, Login, Chat
│       ├── components/     # Sidebar, MessageList, etc.
│       ├── store/          # Zustand auth store
│       ├── services/       # API wrappers
│       └── hooks/          # WebSocket hook
└── package.json            # Monorepo scripts

License

MIT

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages