Skip to content

Commit e65f61b

Browse files
authored
Merge branch 'main' into fix/logs
2 parents dbb1652 + 33f0c5d commit e65f61b

File tree

7 files changed

+818
-538
lines changed

7 files changed

+818
-538
lines changed

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,76 @@
11
# dec25_intern_E_security
22
GitHub Repo for Team E
3+
4+
## Run Locally
5+
6+
This project supports a fast frontend dev loop (Vite HMR) while running the backend pipeline in Docker.
7+
8+
### Prerequisites
9+
10+
- Docker + Docker Compose
11+
- Node.js (npm)
12+
- Python (only if running the generator on host; otherwise, it can run in Docker)
13+
14+
---
15+
16+
### Terminal 1 — Backend (Docker)
17+
18+
From the repo root:
19+
20+
```bash
21+
docker-compose up --build
22+
```
23+
24+
**What this starts (in Docker):**
25+
26+
| Service | Description |
27+
|---------|-------------|
28+
| Redis | Message broker and storage |
29+
| Collector | Log ingestion service |
30+
| Worker | Detection engine + writes alerts to Redis |
31+
| Dashboard API | FastAPI backend |
32+
33+
Backend API is available at: `http://localhost:8001/api/alerts`
34+
35+
---
36+
37+
### Terminal 2 — Frontend (Vite dev server)
38+
39+
```bash
40+
cd dashboard/frontend
41+
npm install
42+
npm run dev
43+
```
44+
45+
Open the URL printed by Vite (typically `http://localhost:3000` or `http://localhost:3001` if port 3000 is in use).
46+
47+
> **Note:** The frontend uses a dev proxy for `/api` to reach the backend API (`localhost:8001`), so the UI works without CORS issues.
48+
49+
---
50+
51+
### Sending Test Logs (Generator)
52+
53+
#### Option A: Generator in Docker Compose
54+
If the generator is included in `docker-compose.yml`, it starts automatically. Watch logs in Terminal 1.
55+
56+
#### Option B: Generator on Host
57+
Run the generator manually, targeting the Collector via the Nginx gateway:
58+
59+
```bash
60+
python generator/generate_logs.py
61+
```
62+
63+
The generator sends logs to: `http://localhost:3000/collect/logs`
64+
65+
---
66+
67+
### Resetting Alerts (Fresh Demo)
68+
69+
To clear old alerts stored in Redis:
70+
71+
```bash
72+
docker-compose down -v
73+
docker-compose up --build
74+
```
75+
76+
The `-v` flag removes volumes, wiping all stored data.

config/whitelist.json

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,11 @@
11
[
2-
"github.com",
3-
"gitlab.com",
4-
"bitbucket.org",
5-
"stackoverflow.com",
6-
"microsoft.com",
7-
"office.com",
8-
"teams.microsoft.com",
9-
"outlook.office.com",
10-
"zoom.us",
11-
"webex.com",
12-
"gotomeeting.com",
13-
"docs.google.com",
14-
"sheets.google.com",
15-
"slides.google.com",
16-
"atlassian.com",
17-
"jira.atlassian.com",
18-
"confluence.atlassian.com",
19-
"salesforce.com",
20-
"linkedin.com",
21-
"twitter.com",
22-
"youtube.com",
23-
"wikipedia.org",
24-
"google.com",
25-
"bing.com",
26-
"aws.amazon.com",
27-
"azure.microsoft.com",
28-
"cloud.google.com",
29-
"stackoverflow.com",
30-
"npmjs.com",
31-
"pypi.org"
32-
]
2+
"docs.company.com",
3+
"drive.company.com",
4+
"intranet.company.com",
5+
"hr.company.com",
6+
"github.company.com",
7+
"gitlab.company.com",
8+
"jira.company.com",
9+
"confluence.company.com",
10+
"sharepoint.company.com"
11+
]

dashboard/frontend/package-lock.json

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)