Project status: Early-stage MVP. The project is public, runnable locally, and actively maintained. Community contributions for anti-fraud rules, anonymized cases, documentation, and integrations are welcome.
AntiFraud-KnowledgeHub is an open-source knowledge base and explainable risk analysis toolkit for identifying online fraud patterns in Chinese-speaking scenarios.
AntiFraud-KnowledgeHub 是一个面向中文互联网场景的反诈骗知识库与可解释风险识别平台。项目第一版聚焦可运行 MVP:结构化诈骗分类、规则引擎、匿名案例库、文本风险分析 API、Vue3 控制台和开发者 CLI。
AntiFraud-KnowledgeHub is an anti-fraud knowledge base and explainable risk analysis platform designed for Chinese-speaking online scenarios. The first version focuses on a runnable MVP, including structured scam categories, a rule engine, an anonymized case library, a text risk analysis API, a Vue3 dashboard, and a developer CLI.
在线诈骗话术变化快,但很多风险信号仍然可解释、可审计、可由社区维护。本项目希望提供一个 public-interest anti-fraud 工具,让开发者、研究者和公益团队可以基于开放规则库构建自己的风险提示能力。
Online fraud tactics evolve quickly, but many risk signals are still explainable, auditable, and maintainable by the community. This project aims to provide a public-interest anti-fraud toolkit that enables developers, researchers, educators, and non-profit teams to build their own risk warning capabilities based on an open rule library.
- Scam categories for investment fraud, cashback task fraud, fake customer service, phishing links, AI deepfake fraud and more.
- Explainable risk rules with keyword, regex, pattern and mock semantic providers.
- Text analysis API returning score, level, matched rules, evidence and recommendations.
- Anonymous sample scam cases for local demos and tests.
- Vue3 dashboard for overview, text analysis, rules, cases, categories and docs.
- Docker Compose startup for PostgreSQL, Redis, backend and frontend.
cp .env.example .env
make devBackend health check:
curl http://localhost:8080/api/v1/healthText analysis:
curl -X POST http://localhost:8080/api/v1/analysis/text \
-H "Content-Type: application/json" \
-d '{"text":"客服说账户异常,需要转账到安全账户"}'Frontend: http://localhost:5173
API docs: http://localhost:8080/swagger/index.html
make backend-test
make frontend-build
make seedCLI:
cd backend
go run ./cmd/afkh-cli analyze --text "客服说账户异常,需要转账到安全账户"- Backend: Go, Gin, GORM, PostgreSQL, Redis, Zap, Viper, swaggo/gin-swagger
- Frontend: Vue 3, TypeScript, Vite, Element Plus, Pinia, Vue Router, Axios, ECharts, UnoCSS
- DevOps: Docker Compose, Makefile, GitHub Actions
flowchart LR
User["User / Developer"] --> Frontend["Vue3 Dashboard"]
User --> CLI["Go CLI"]
Frontend --> API["Go Gin API"]
CLI --> API
API --> Engine["Explainable Risk Engine"]
API --> DB["PostgreSQL"]
API --> Redis["Redis"]
Engine --> Rules["Seeded Rules"]
DB --> Cases["Anonymous Cases"]
- Category: scam category metadata and default severity.
- RiskRule: explainable keyword, regex, pattern or semantic placeholder rules.
- ScamCase: anonymized case samples with tags and risk points.
- AnalysisRecord: input text, score, level, matched rules and recommendations.
- v0.1 MVP: rules, cases, API, dashboard, Docker.
- v0.2 Community Rules: contribution workflow and review helpers.
- v0.3 AI-assisted analysis adapter: optional external provider interface.
- v0.4 Browser extension.
- v0.5 Multi-language support.
See docs/screenshots.md for placeholders.
This is an early-stage open-source project seeking community contributions. See CONTRIBUTING.md for rule, category and anonymized case contribution guidelines.
MIT. See LICENSE.