Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Log Analyzer (SecOps Assistant)

AI Log Analyzer is a full-stack SecOps helper that ingests web access logs, parses them into structured events, applies rule-based detection logic, and enriches the result with a live Ollama summary or a safe fallback analysis.

Monorepo layout

.
|-- backend
|   |-- app
|   |-- tests
|   |-- requirements.txt
|   `-- README.md
|-- frontend
|   |-- app
|   |-- components
|   |-- lib
|   |-- package.json
|   `-- README.md
`-- venv

Local setup

1. Create the Python virtual environment

Use only the repo-root venv. Do not install backend dependencies globally.

Windows PowerShell:

python -m venv venv
.\venv\Scripts\python.exe -m pip install -r backend\requirements.txt

Linux or macOS:

python -m venv venv
./venv/bin/python -m pip install -r backend/requirements.txt

2. Configure environment files

Backend:

Copy-Item backend\.env.example backend\.env

Frontend:

Copy-Item frontend\.env.local.example frontend\.env.local

Store sensitive or deployment-specific values in .env and .env.local, not in committed files. The backend now requires DATABASE_URL pointing to a reachable PostgreSQL instance.

3. Prepare Ollama for local AI

ollama pull mistral

If ollama serve reports that port 11434 is already in use, Ollama is probably already running.

4. Run the backend

Ensure PostgreSQL is reachable at DATABASE_URL in backend/.env. Then run migrations:

cd backend
..\venv\Scripts\python.exe -m alembic upgrade head
cd backend
..\venv\Scripts\python.exe -m uvicorn app.main:app --reload

5. Run the frontend

Windows PowerShell:

cd frontend
npm.cmd install
npm.cmd run dev

Other shells:

cd frontend
npm install
npm run dev

What you get

  • FastAPI backend with parsing, detections, correlation, risk scoring, case management, GeoIP enrichment, and PDF export
  • Next.js App Router frontend with a SOC-style investigation workflow, cases, rules, and live mode
  • Local .env support and Postgres-backed persistence for investigation sessions
  • Deployment-safe behavior when Ollama is unavailable in hosted environments

See the backend and frontend READMEs for subsystem-specific details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages