Skip to content

charmi-reddy/Shakti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Shakti

A secure web platform with blockchain-enabled logging and firewall protection

Python JavaScript License Status


🌟 Overview

Shakti is a modular security-focused platform that integrates multiple cutting-edge technologies to provide a robust, transparent, and secure web application environment. Written primarily in Python and JavaScript, with supporting components in Rust and PowerShell, Shakti combines:

  • Backend Logic β€” Core Python-based application handling business logic
  • Firewall Protection β€” Advanced firewall subsystem for request filtering and security
  • Blockchain Audit Trail β€” Immutable logging infrastructure for transparency and accountability
  • Modern Frontend β€” Responsive web interface built with JavaScript, HTML, and CSS

Shakti is designed for developers, security engineers, and teams who need a comprehensive demonstration platform that showcases how modern security technologies can work together seamlessly.


✨ Key Features

  • πŸ”’ Multi-Layer Security: Integrated firewall protection with customizable rule sets
  • ⛓️ Blockchain-Enabled Logging: Immutable audit trails for all critical operations
  • 🎨 Modern UI: Clean, responsive frontend with intuitive user experience
  • πŸ”§ Modular Architecture: Each component can be extended, modified, or replaced independently
  • πŸš€ Easy Deployment: Simple batch script setup for Windows environments
  • πŸ§ͺ Comprehensive Testing: Automated test suite for reliability
  • πŸ“¦ Lightweight Dependencies: Minimal external dependencies for easy maintenance
  • πŸ”„ Real-time Monitoring: Live monitoring of system activities and security events

πŸ—οΈ Architecture

Shakti follows a modular, layered architecture:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Frontend (UI Layer)         β”‚
β”‚    JavaScript / HTML / CSS          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚
              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚       Core Backend (Logic)          β”‚
β”‚         Python Module               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚           β”‚
          β–Ό           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Firewall   β”‚  β”‚   Blockchain     β”‚
β”‚   Module    β”‚  β”‚  Audit System    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technology Stack

Component Technologies
Backend Python 3.8+
Frontend JavaScript (ES6+), HTML5, CSS3
Blockchain Custom blockchain implementation
Firewall Python-based firewall engine
Utilities Rust, PowerShell, Batch scripts
Package Management pip (Python), npm (Node.js)

πŸ“¦ Prerequisites

Before installing Shakti, ensure you have the following installed on your system:

Required Software

Operating System

  • Windows 10/11 (for batch script support)
  • Linux/macOS (you may need to create equivalent shell scripts)

Optional

  • Rust (if modifying Rust components)
  • Visual Studio Code or preferred code editor

πŸš€ Installation

Follow these steps to get Shakti up and running on your local machine.

Step 1: Clone the Repository

git clone https://github.com/charmi-reddy/Shakti.git
cd Shakti

Step 2: Install Python Dependencies

Open your terminal or VSCode integrated terminal and run:

pip install -r requirements.txt

This will install all required Python packages listed in requirements.txt.

Step 3: Install Node.js Dependencies (if applicable)

If your frontend has Node.js dependencies:

npm install

Step 4: Verify Installation

Ensure all dependencies are installed correctly:

python --version  # Should show Python 3.8+
node --version    # Should show Node.js version
npm --version     # Should show npm version

⚑ Quick Start

Windows Users

Run the included batch script to start Shakti:

.\start_shakti.bat

This script will:

  1. Open two terminal windows for the backend and frontend servers
  2. Start the Python backend server
  3. Start the frontend development server
  4. Automatically open your default web browser to the application

Linux/macOS Users

Create and run a shell script equivalent:

# Start backend
python core/main.py &

# Start frontend (if applicable)
cd frontend && npm start &

# Open browser
open http://localhost:3000  # macOS
# or
xdg-open http://localhost:3000  # Linux

Accessing the Application

Once started, navigate to:

http://localhost:3000

πŸ“ Project Structure

Shakti/
|-- main.py                  # System controller
|-- api_server.py            # HTTP API, logging, block/unblock
|-- database.py              # Data storage for MACs/channels/signal
|-- database_blockchain.py   # Pushes data to Algorand blockchain
|-- firewall_server.py       # Handles MAC blocklist and network policies
|-- smart_contract/          # PyTeal contract(s) for Algorand
|-- frontend/                # React.js client dashboard
|-- requirements.txt         # Python deps
|-- package.json             # Node.js deps
|-- scripts/                 # Utility/setup scripts
|-- tests/                   # Automated tests
|-- start_shakti.bat         # Batch launcher script

🧩 Core Modules

main.py

System controller for detection, logging, firewall actions; coordinates workflow, backend communication, packet analysis, and event alerts.

api_server.py

Audit logging and real-time network protection API server; manages HTTP requests to block/unblock MACs, interfaces with the dashboard.

database.py

Backend storage for MAC events, signal data, channels, and messages; efficient lookups for network analytics.

database_blockchain.py

Pushes events to Algorand, guaranteeing immutability and audit compliance; syncs backend events with blockchain state.

firewall_server.py

Handles blocklist operations and network access; enforces security policies using detection module outputs.

smart_contract (PyTeal)

Algorand contract recording wireless attacks with full detail and count; enables compliance-ready audit trails.


βš™οΈ Configuration

  • requirements.txt, package.json – dependencies
  • .env – credentials, backend/frontend config
  • Firewall rules, API endpoints customizable in code or config files
  • Algorand parameters set in smart contract source


πŸ’» Usage

Starting Individual Components

Backend Only:

python core/main.py

Frontend Only:

cd frontend
npm start

Run Tests:

python -m pytest tests/

🀝 Contributing

We welcome contributions to Shakti! Here's how you can help:

How to Contribute

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Make your changes
  4. Commit your changes
    git commit -m "Add amazing feature"
  5. Push to the branch
    git push origin feature/amazing-feature
  6. Open a Pull Request

Code Style Guidelines

  • Follow PEP 8 for Python code
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Write tests for new features
  • Update documentation as needed

🚦 Roadmap

  • iOS/Android mobile companion app
  • Advanced analytics (anomaly detection)
  • Distributed firewall mode (multiple nodes)
  • On-chain alert escalation
  • Integration with enterprise SIEM/SOAR tools
  • Rust-based firewall engine full migration

Made with ❀️ by the Shakti Team

⭐ Star this repository if you find it helpful!

Report Bug Β· Request Feature Β· Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors