Skip to content

Latest commit

Β 

History

61 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ SecureVault - Cybersecurity Monitoring Platform

Real-time threat detection and security monitoring platform optimized for Windows environments

Next.js NestJS TypeScript PostgreSQL

πŸ“– Overview

SecureVault is an enterprise-grade cybersecurity monitoring platform that provides:

  • πŸ” Real-time Threat Detection - SSH brute force, malware, and anomaly detection
  • πŸ“Š Security Analytics - Comprehensive dashboards and metrics
  • πŸ€– Automated Response - Action console for automated remediation
  • 🌐 Multi-Site Management - Centralized monitoring for multiple servers
  • πŸ›‘οΈ Windows Optimized - Designed specifically for Windows Server environments

🎯 Built for: VPBank Hackathon 2025


πŸš€ Quick Start

For Demo/Development

See DEMO_GUIDE.md for complete hackathon demo instructions.

TL;DR:

# 1. Start PostgreSQL
docker compose up -d

# 2. Backend
cd backend
npm install
npm run start:dev

# 3. Frontend (new terminal)
cd frontend
npm install
npm run dev

# 4. Generate demo threats
cd docker
.\attack-mock.ps1 -Token YOUR_AGENT_TOKEN

Access: http://localhost:3000


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Next.js        │─────▢│  NestJS          │─────▢│  PostgreSQL     β”‚
β”‚  Frontend       │◀─────│  Backend API     │◀─────│  Database       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                  β”‚
                                  β”‚ WebSocket/HTTP
                                  β–Ό
                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚  Python Agent    β”‚
                         β”‚  (Windows Server)β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Frontend:

  • Next.js 15 (App Router)
  • React 19
  • TypeScript
  • Tailwind CSS
  • Zustand (State Management)

Backend:

  • NestJS 10
  • TypeORM
  • PostgreSQL
  • JWT Authentication
  • Swagger/OpenAPI

Agent:

  • Python 3.8+
  • Windows Event Log monitoring
  • Heartbeat mechanism
  • Threat detection algorithms

πŸ“ Project Structure

securevault/
β”œβ”€β”€ frontend/                 # Next.js Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/             # App Router pages
β”‚   β”‚   β”œβ”€β”€ components/      # React components (SOLID)
β”‚   β”‚   β”œβ”€β”€ hooks/           # Custom hooks
β”‚   β”‚   β”œβ”€β”€ lib/             # Services & API clients
β”‚   β”‚   β”œβ”€β”€ stores/          # Zustand stores
β”‚   β”‚   └── types/           # TypeScript interfaces
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/                 # NestJS Backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ modules/         # Feature modules
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/        # Authentication
β”‚   β”‚   β”‚   β”œβ”€β”€ threats/     # Threat management
β”‚   β”‚   β”‚   β”œβ”€β”€ agents/      # Agent communication
β”‚   β”‚   β”‚   β”œβ”€β”€ incidents/   # Incident tracking
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ config/          # Configuration
β”‚   β”‚   └── main.ts
β”‚   β”œβ”€β”€ libs/
β”‚   β”‚   └── entities/        # Database entities
β”‚   └── package.json
β”‚
β”œβ”€β”€ agent/                   # Python Security Agent
β”‚   β”œβ”€β”€ securevault-agent.py # Main agent
β”‚   β”œβ”€β”€ install.ps1         # Windows installer
β”‚   └── install.sh          # Linux installer (future)
β”‚
β”œβ”€β”€ docker/                  # Testing & Demo
β”‚   β”œβ”€β”€ attack-mock.ps1     # Mock attack generator
β”‚   β”œβ”€β”€ attack.ps1          # Real SSH attack test
β”‚   β”œβ”€β”€ attack.sh           # Linux version
β”‚   └── Dockerfile.agent-test
β”‚
β”œβ”€β”€ docker-compose.yml       # PostgreSQL + pgAdmin
β”œβ”€β”€ DEMO_GUIDE.md           # πŸ“– Hackathon demo guide
β”œβ”€β”€ POSTGRES_SETUP.md       # Database setup
└── README.md               # This file

🎯 Features

1. Threat Intelligence

  • Real-time SSH brute force detection
  • IP reputation analysis
  • Confidence scoring
  • Threat categorization (Critical/High/Medium/Low)

2. Dashboard Analytics

  • Active sites monitoring
  • Critical threat counts
  • Incident tracking
  • System health metrics

3. Agent Management

  • Windows agent deployment
  • Heartbeat monitoring
  • System metrics (CPU, RAM, Disk)
  • Remote configuration

4. Incident Response

  • Automated threat reporting
  • Incident timeline
  • Remediation actions
  • Alert notifications

5. Windows-First Design

  • Optimized for Windows Server
  • PowerShell-based installation
  • Windows Event Log integration
  • Windows-specific threat detection

πŸ”§ Development Setup

Prerequisites

  • Node.js 18+ LTS
  • PostgreSQL 15+ (or Docker)
  • Python 3.8+
  • Git

1. Clone Repository

git clone https://github.com/locdo-freelancer/hackathon-vpb-onebillion.git
cd hackathon-vpb-onebillion

2. Backend Setup

cd backend
npm install

Create .env file:

DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=onebillion
DB_PASSWORD=onebillion123
DB_NAME=one_billion

JWT_SECRET=your-secret-key
JWT_EXPIRES_IN=7d

PORT=3001
NODE_ENV=development
CORS_ORIGIN=http://localhost:3000

Start PostgreSQL:

docker compose up -d

Run backend:

npm run start:dev

3. Frontend Setup

cd frontend
npm install

Create .env.local:

NEXT_PUBLIC_API_URL=http://localhost:3001

Run frontend:

npm run dev

4. Access Application


πŸ“š Documentation

API Documentation

Swagger UI available at: http://localhost:3001/api/docs


πŸ§ͺ Testing

Generate Demo Threats

cd docker
.\attack-mock.ps1 -Token YOUR_AGENT_TOKEN

This creates 5 simulated SSH brute force attacks for testing.

Run Unit Tests

# Backend
cd backend
npm test

# Frontend
cd frontend
npm test

πŸš€ Deployment

Frontend (Vercel)

cd frontend
vercel --prod

Backend (Railway/Heroku)

cd backend
railway up
# or
git push heroku main

Environment Variables

See DEMO_GUIDE.md for production environment configuration.


πŸ”’ Security

  • JWT-based authentication
  • CORS protection
  • SQL injection prevention (TypeORM)
  • Input validation (class-validator)
  • Rate limiting
  • Helmet security headers
  • Password hashing (bcrypt)

🀝 Contributing

This is a hackathon project. For production use, please:

  1. Change all default secrets/passwords
  2. Enable HTTPS
  3. Configure production database
  4. Set up monitoring & logging
  5. Implement rate limiting
  6. Add comprehensive tests

πŸ“ License

MIT License


πŸ‘₯ Team

Project: SecureVault
Event: VPBank Hackathon 2025
Repository: https://github.com/locdo-freelancer/hackathon-vpb-onebillion


πŸ™ Acknowledgments

  • VPBank for hosting the hackathon
  • Open source community
  • All contributors and supporters

⭐ Star this repo if you find it helpful!

πŸŽ‰ Built with ❀️ for VPBank Hackathon 2025

Releases

Packages

Contributors

Languages