Skip to content

cshillrj46/SafeTX-AI

SafeTX Banner

A smart and secure Web3 transaction analysis platform using Artificial Intelligence. Built to protect your crypto wallet and alert you of suspicious or high-risk activities in real time.

Python License Last Commit Stars

πŸš€ Features

  • πŸ” AI-Powered Transaction Risk Classification
  • πŸ“Š Transaction History with Filtering & Pagination
  • πŸ”” Real-Time Alerts via Webhook and Email
  • 🧠 Machine Learning with Balanced Training
  • πŸ’» Modern Web Interface (React + TailwindCSS)
  • πŸ›‘οΈ Secure FastAPI Backend with JWT Auth
  • πŸ“ Modular and Scalable Project Architecture

πŸ› οΈ Tech Stack

Layer Technology
Frontend React, TypeScript, TailwindCSS
Backend FastAPI, SQLAlchemy, Uvicorn
AI Engine scikit-learn, SMOTE, joblib
Database SQLite
Alerts SMTP (Gmail), Webhooks

πŸ“¦ Installation

1. Clone the project

git clone https://github.com/cshillrj46/SafeTX-AI.git
cd SafeTX-AI

2. Backend Setup

cd backend
python -m venv .venv
.venv\Scripts\activate    # Windows
# source .venv/bin/activate   # Linux/Mac
pip install -r requirements.txt
uvicorn main:app --reload

3. Frontend Setup

cd ../frontend
npm install
npm start

πŸ“ˆ Usage

  • Visit http://localhost:3000 to access the frontend
  • Backend runs at http://localhost:8000
  • You can submit transactions manually or connect a Web3 wallet integration
  • Reclassification and alerts are automatically logged

πŸ§ͺ Testing AI Model

To retrain the model:

python backend/train_model.py

Model files are saved in backend/:

  • risk_model.joblib
  • encoder_sender.joblib
  • encoder_recipient.joblib
  • encoder_risk.joblib

🧩 Folder Structure

SafeTX-AI/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ train_model.py
β”‚   β”œβ”€β”€ database.py
β”‚   β”œβ”€β”€ ai_model.py
β”‚   └── ...
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ public/
β”‚   └── ...
β”œβ”€β”€ assets/
β”‚   └── banner.png
β”œβ”€β”€ transactions.csv
β”œβ”€β”€ README.md
└── LICENSE

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/awesome-feature)
  3. Commit your changes (git commit -m 'Add awesome feature')
  4. Push to the branch (git push origin feature/awesome-feature)
  5. Open a Pull Request

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ’¬ Contact


SafeTX-AI: Empowering secure crypto transactions with smart technology.

About

AI-powered Web3 transaction protection system (anti-fraud, delay system, risk alerts)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors