Skip to content

Repository files navigation

SKLinkChat

Anonymous real-time chat with Stack Auth, FastAPI, React, PostgreSQL, Redis, moderation, and audit trails.

CI MIT License Python 3.11+ React 18 FastAPI PostgreSQL Redis Docker Compose

English · 中文 · Documentation · Quick Start · Architecture · Contributing

English

SKLinkChat is a full-stack anonymous chat project for real-time matching, private conversation, reporting, moderation, and admin audit workflows. It is designed as a practical reference for building real-time community products, not only a single chat screen.

SKLinkChat English preview

Why It Exists

Anonymous chat products are easy to prototype but hard to operate responsibly. SKLinkChat keeps the real-time interaction loop while adding login, reports, account restrictions, audit logs, and a maintainable frontend/backend boundary.

Features

  • Anonymous real-time chat over WebSocket.
  • Stack Auth login synchronized into local sessions.
  • PostgreSQL persistence for accounts, chat sessions, reports, restrictions, and audit logs.
  • Redis-backed presence, matching state, and realtime coordination.
  • Admin console for report review, account restriction, account recovery, and audit search.
  • Docker Compose local preview with PostgreSQL, Redis, backend, and frontend.
  • Open-source community files: MIT license, CI, issue templates, PR template, contributing guide, and security policy.

Quick Start

git clone https://github.com/BarbieWinter/SKLinkChat.git
cd SKLinkChat
cp .env.example .env
docker compose up --build

Open:

  • Frontend preview: http://localhost:4173
  • API health check: http://localhost:8000/healthz
  • Admin reports: http://localhost:4173/admin/reports
  • Admin audit: http://localhost:4173/admin/audit

More setup details: Quick Start, Development, Deployment.

中文

SKLinkChat 是一套匿名实时聊天全栈项目,覆盖随机匹配、私密聊天、举报、审核、审计、登录、本地部署和基础工程治理。它的目标不是做一个孤立的聊天页面,而是提供一个能被阅读、运行、改造和继续扩展的真实参考项目。

如果这个项目对你有帮助,欢迎给一个 star。star 会帮助更多开发者发现这个项目。

SKLinkChat 中文预览

项目亮点

  • 匿名实时聊天:基于 WebSocket 的会话消息链路。
  • 认证链路:Stack Auth 登录,并同步成本地 session。
  • 数据持久化:PostgreSQL 保存账号、会话、举报、限制和审计日志。
  • 实时状态:Redis 支撑在线状态、匹配状态和事件协调。
  • 管理后台:支持举报审核、账号限制、账号恢复和审计查询。
  • 一键本地演示:Docker Compose 拉起 PostgreSQL、Redis、后端和前端。
  • 开源友好:MIT License、CI、Issue 模板、PR 模板、贡献指南和安全说明。

本地预览

git clone https://github.com/BarbieWinter/SKLinkChat.git
cd SKLinkChat
cp .env.example .env
docker compose up --build

访问:

  • 前端预览:http://localhost:4173
  • API 健康检查:http://localhost:8000/healthz
  • 管理后台举报页:http://localhost:4173/admin/reports
  • 管理后台审计页:http://localhost:4173/admin/audit

完整启动、开发和部署说明见:快速开始开发指南部署指南

Tech Stack / 技术栈

Layer / 层级 Technology / 技术
Frontend / 前端 React 18, Vite, TypeScript, Zustand
Backend / 后端 FastAPI, SQLAlchemy, Alembic, WebSocket
Database / 数据库 PostgreSQL 16
Realtime / 实时状态 Redis 7
Auth / 认证 Stack Auth
Tooling / 工程化 Docker Compose, GitHub Actions

Documentation / 文档

License

SKLinkChat is released under the MIT License.

About

A production-ready anonymous 1v1 chat platform built with FastAPI, React, PostgreSQL, and Redis, featuring real-time messaging, moderation, and admin audit tools.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages