chris12x1/cyberbrief
GitHub: chris12x1/cyberbrief
基于 Gemini 2.5 的 AI 网络安全新闻仪表盘,自动聚合、摘要并评级实时威胁情报。
Stars: 0 | Forks: 0
# 🔐 CyberBrief




## 📸 功能
- 🔴 **实时威胁情报** — 获取过去 48 小时内的真实网络安全新闻
- ⚡ **AI TL;DR** — 每条新闻都由 Gemini 2.5 生成 1-2 句话的摘要
- 🎯 **严重程度评级** — 严重 / 高 / 中 / 低 / 信息 颜色编码
- 🗂️ **分类筛选** — 漏洞、数据泄露、恶意软件、国家级攻击、零日漏洞
- 🌐 **Grounded 搜索** — 由 Google Search 通过 Gemini 的 grounding 工具提供支持
- 🎨 **黑客美学** — 专为安全专业人士打造的深色 UI
## 🚀 在线演示
[cyberbrief.vercel.app](https://cyberbrief.vercel.app)
## 🛠️ 技术栈
| 层级 | 技术 |
|-------|------|
| 框架 | Next.js 14 (App Router) |
| AI 模型 | Gemini 2.5 Flash |
| 搜索 | Google Search Grounding |
| 部署 | Vercel |
| 样式 | 内联样式 + Google Fonts |
## ⚙️ 本地设置
### 1. 克隆仓库
```
git clone https://github.com/chris12x1/cyberbrief.git
cd cyberbrief
```
### 2. 安装依赖
```
npm install
```
### 3. 添加你的 Gemini API key
```
cp .env.example .env.local
```
打开 `.env.local` 并粘贴从 [aistudio.google.com/apikey](https://aistudio.google.com/apikey) 获取的密钥
```
GEMINI_API_KEY=your_key_here
```
### 4. 本地运行
```
npm run dev
```
打开 [http://localhost:3000](http://localhost:3000)
## 🌍 部署到 Vercel
[](https://vercel.com/new/clone?repository-url=https://github.com/chris12x1/cyberbrief)
1. 点击上方按钮或在 [vercel.com](https://vercel.com) 导入仓库
2. 添加环境变量:`GEMINI_API_KEY`
3. 部署 ✅
## 📁 项目结构
```
cyberbrief/
├── app/
│ ├── about/
│ │ └── page.jsx
│ ├── api/
│ │ ├── create-checkout/
│ │ │ └── route.js
│ │ ├── news/
│ │ │ └── route.js # Backend — Gemini API call (key stays secret)
│ │ ├── refresh-status/
│ │ │ └── route.js
│ │ ├── setup-db/
│ │ │ └── route.js
│ │ ├── user-status/
│ │ │ └── route.js
│ │ └── webhook/
│ │ └── route.js
│ ├── components/
│ │ └── NewsCard.jsx # Expandable article card
│ ├── contact/
│ │ └── page.jsx
│ ├── lib/
│ │ └── db.js
│ ├── success/
│ │ └── page.jsx
│ ├── globals.css # Global styles + animations
│ ├── layout.jsx # Root layout
│ └── page.jsx # Main dashboard UI
├── .env.example # Environment variable template
├── .gitignore
├── LICENSE
├── README.md
├── middleware.js
├── next.config.js
├── package-lock.json
├── package.json
└── tailwind.config.js
```
## 🔑 环境变量
| 变量 | 描述 | 获取方式 |
|----------|-------------|-----------------|
| `GEMINI_API_KEY` | Google Gemini API key | [aistudio.google.com/apikey](https://aistudio.google.com/apikey) |
## 📜 许可证
MIT — 免费使用、修改和部署。
由 [Christopher Diaz](https://github.com/chris12x1) 构建 · 由 [Google Gemini](https://deepmind.google/technologies/gemini/) 提供支持
标签:Gemini, 威胁情报, 开发者工具, 网络安全新闻, 自定义脚本