alaaMelook/TIBSA-Platform
GitHub: alaaMelook/TIBSA-Platform
一个基于 Next.js 和 FastAPI 构建的全栈安全评估平台,整合威胁情报与安全扫描能力。
Stars: 0 | Forks: 1
# TIBSA — 基于威胁情报的安全应用
一个使用 **Next.js** (前端) 和 **FastAPI** (后端) 构建的全栈网络安全平台,并使用 **Supabase** 进行身份验证和数据库管理。
## 🏗️ 架构
| Layer | Technology | Deployment |
|-------|-----------|------------|
| Frontend | Next.js 16 (TypeScript) | Vercel |
| Backend | FastAPI (Python) | Railway |
| Database & Auth | Supabase | |
## 📁 项目结构
```
TIBSA/
├── frontend/ # Next.js app
│ └── src/
│ ├── app/ # Pages (App Router)
│ ├── components/# UI, Layout, Shared
│ ├── lib/ # Supabase client, API wrapper
│ ├── contexts/ # AuthContext (role-based)
│ ├── hooks/ # Custom hooks
│ └── types/ # TypeScript definitions
│
├── backend/ # FastAPI app
│ ├── app/
│ │ ├── routers/ # API endpoints
│ │ ├── models/ # Pydantic schemas
│ │ ├── services/ # Business logic
│ │ ├── repositories/ # Data access
│ │ └── middleware/ # Rate limiter, etc.
│ ├── tests/ # pytest
│ ├── Dockerfile # For Railway
│ └── requirements.txt
│
├── database/ # SQL schemas (split by module)
│ ├── 01_users.sql # Users & auth
│ ├── 02_scans.sql # Scanning engine
│ └── 03_threats.sql # Threat intelligence
│
└── README.md
```
## 🚀 快速开始
### Frontend
```
cd frontend
npm install
cp .env.local.example .env.local # Add your Supabase keys
npm run dev # → http://localhost:3000
```
### Backend
```
cd backend
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
cp .env.example .env # Add your Supabase keys
uvicorn app.main:app --reload # → http://localhost:8000/docs
```
## 👤 角色
- **User** — 所有新账户的默认角色
- **Admin** — 由现有管理员通过用户管理页面手动分配
## 📦 数据库设置
SQL schemas 位于 `database/` 文件夹中,按模块划分。请**按顺序**在 Supabase SQL Editor 中运行它们:
1. `01_users.sql` — 用户配置文件 & 角色
2. `02_scans.sql` — 扫描引擎表
3. `03_threats.sql` — 威胁情报源 & 指标
## 🌐 部署
| Service | Platform | Config |
|---------|----------|--------|
| Frontend | Vercel | Root Directory: `frontend`, Framework: Next.js |
| Backend | Railway | Root Directory: `backend`, Builder: Dockerfile |
### 环境变量
**Frontend (Vercel):**
- `NEXT_PUBLIC_SUPABASE_URL`
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`
- `NEXT_PUBLIC_API_URL` — Railway backend URL
**Backend (Railway):**
- `SUPABASE_URL`
- `SUPABASE_SERVICE_ROLE_KEY`
- `VIRUSTOTAL_API_KEY` — 通过 VirusTotal 进行 URL/hash 扫描所需
- `CORS_ORIGINS` — Vercel frontend URL
标签:AV绕过, FastAPI, Python, Supabase, TCP/IP协议栈, TIBSA, TypeScript, 反取证, 威胁分析, 威胁情报, 安全插件, 安全评估, 实时处理, 密码管理, 开发者工具, 数据库设计, 无后门, 测试用例, 网络安全平台, 自动化侦查工具, 自动化攻击, 请求拦截, 逆向工具