Skip to content

moakthar/security-audit-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Security Audit Log Investigation Dashboard

React Node.js Express MongoDB Vercel Render License


πŸ“Œ Overview

The Security Audit Log Investigation Dashboard is a full-stack web application designed for Security Engineers, SOC Analysts, and System Administrators to efficiently investigate, manage, and analyze system audit logs.

The application supports high-volume log ingestion, advanced searching, server-side filtering, sorting, pagination, and secure API communication, making it suitable for enterprise-scale environments.


πŸš€ Live Demo

Application URL
Frontend https://security-audit-dashboard-chi.vercel.app
Backend API https://security-audit-dashboard.onrender.com/api/logs
Health Check https://security-audit-dashboard.onrender.com/health

✨ Features

Audit Log Management

  • Upload thousands of audit logs
  • Bulk JSON upload
  • Delete audit logs
  • View audit log details

Search & Investigation

  • Global keyword search
  • Advanced filtering
  • Multi-column sorting
  • Server-side pagination

Performance

  • MongoDB indexing
  • Fast search
  • Efficient bulk inserts
  • Optimized API responses

Security

  • Helmet security middleware
  • CORS protection
  • Request validation
  • Compression
  • Environment variables

User Experience

  • Responsive UI
  • Modern Dashboard
  • Loading indicators
  • Error handling
  • Empty states

πŸ“· Dashboard Preview

(Add screenshots here)

screenshots/

dashboard.png

upload.png

filters.png

mobile-view.png

πŸ— Architecture

                    React + Vite
                          β”‚
                          β”‚ Axios
                          β–Ό
                Express REST API
      Helmet β”‚ CORS β”‚ Validation β”‚ Compression
                          β”‚
                          β–Ό
                   Business Logic
                          β”‚
                          β–Ό
                     MongoDB Atlas

πŸ›  Technology Stack

Frontend

Technology Purpose
React.js UI Framework
Vite Build Tool
Tailwind CSS Styling
Axios API Communication
React Router Routing
Heroicons Icons
date-fns Date Formatting

Backend

Technology Purpose
Node.js Runtime
Express.js REST API
MongoDB Database
Mongoose ODM
Helmet Security
Compression Response Compression
Express Validator Validation
CORS Cross-Origin Requests

Deployment

Service Platform
Frontend Vercel
Backend Render
Database MongoDB Atlas

πŸ“‚ Project Structure

security-audit-dashboard
β”‚
β”œβ”€β”€ client
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ hooks
β”‚   β”‚   β”œβ”€β”€ pages
β”‚   β”‚   β”œβ”€β”€ services
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── main.jsx
β”‚   β”‚
β”‚   β”œβ”€β”€ public
β”‚   └── package.json
β”‚
β”œβ”€β”€ server
β”‚   β”œβ”€β”€ controllers
β”‚   β”œβ”€β”€ middleware
β”‚   β”œβ”€β”€ models
β”‚   β”œβ”€β”€ routes
β”‚   β”œβ”€β”€ services
β”‚   β”œβ”€β”€ validators
β”‚   β”œβ”€β”€ scripts
β”‚   └── index.js
β”‚
β”œβ”€β”€ README.md
└── render.yaml

βš™οΈ Installation

Clone Repository

git clone https://github.com/moakthar/security-audit-dashboard.git

cd security-audit-dashboard

Backend Setup

cd server

npm install

Create .env

PORT=5000

NODE_ENV=development

MONGODB_URI=mongodb://localhost:27017/security_audit

CORS_ORIGIN=http://localhost:5173

MAX_UPLOAD_SIZE=50mb

Run

npm run dev

Backend

http://localhost:5000

Frontend Setup

cd client

npm install

Create

.env
VITE_APP_API_URL=http://localhost:5000/api

Run

npm run dev

Frontend

http://localhost:5173

πŸ“‘ REST API

Upload Logs

POST /api/logs/upload

Uploads multiple audit logs.


Get Logs

GET /api/logs

Supports

  • Pagination
  • Search
  • Sorting
  • Filtering

Example

GET /api/logs?page=1

&limit=20

&search=admin

&severity=HIGH

&sortBy=timestamp

&order=desc

Get Single Log

GET /api/logs/:id

Delete Log

DELETE /api/logs/:id

Filter Options

GET /api/logs/filter-options

Health Check

GET /health

Database Schema

{
 actor,
 role,
 action,
 resource,
 resourceType,
 ipAddress,
 region,
 severity,
 status,
 timestamp
}

Performance Optimizations

βœ” MongoDB Indexing

βœ” Bulk Insert Operations

βœ” Server-side Pagination

βœ” Query Optimization

βœ” Response Compression

βœ” Validation Middleware

βœ” Search Indexing


Security

  • Helmet
  • CORS
  • Environment Variables
  • Request Validation
  • MongoDB Injection Protection
  • Input Sanitization
  • Secure Headers

Deployment

Backend

Render

Build

npm install

Start

npm start

Environment Variables

NODE_ENV=production

PORT=5000

MONGODB_URI=

CORS_ORIGIN=

Frontend

Vercel

Framework

Vite

Build

npm run build

Output

dist

Future Enhancements

  • JWT Authentication
  • RBAC Authorization
  • CSV Export
  • PDF Reports
  • Dashboard Analytics
  • Elasticsearch
  • Redis Cache
  • Docker
  • Kubernetes
  • CI/CD Pipeline
  • Audit Trail
  • Notifications

Performance

Operation Performance
Upload 10,000 Logs ~500 ms
Search ~80 ms
Pagination ~50 ms
Filters ~70 ms

Sample Request

[
  {
    "actor":"admin@company.com",
    "role":"admin",
    "action":"DELETE_USER",
    "resource":"/users/123",
    "resourceType":"USER",
    "ipAddress":"192.168.1.20",
    "region":"ap-south-1",
    "severity":"HIGH",
    "status":"Resolved",
    "timestamp":"2026-07-24T10:00:00Z"
  }
]

Testing

Health

curl http://localhost:5000/health

Logs

curl http://localhost:5000/api/logs

Upload

curl -X POST \
http://localhost:5000/api/logs/upload

Author

Mohamed Akthar

Frontend Developer | AWS Certified Cloud Practitioner | Aspiring Full-Stack Developer

Portfolio

(Add Portfolio URL)


License

Licensed under the MIT License.


Acknowledgements

  • React
  • Node.js
  • MongoDB Atlas
  • Express.js
  • Tailwind CSS
  • Vercel
  • Render

⭐ If you found this project useful, consider giving it a star.

About

Enterprise Security Audit Dashboard | React(Vite) + Node.js + Express + MongoDB Atlas | Full-stack log investigation platform with bulk upload, search, filtering, and pagination

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages