Skip to content

Repository files navigation

πŸ” SOLENS: Solana Blockchain Intelligence Platform

Solana Python React TypeScript MongoDB FastAPI

SOLENS is a comprehensive intelligence platform for Solana blockchain analysis, featuring real-time copytrader detection, wallet discovery, and advanced ML-powered analytics. Built with FastAPI, MongoDB Atlas, and modern React frontend.


✨ Features

πŸ”„ Real-Time Discovery
Β Β Β Β Automated scrapers analyze top Solana tokens and wallets every minute, hour, and day

🎯 Copytrader Detection
Β Β Β Β Advanced algorithms detect and rank wallets based on profit patterns and trading behavior

πŸ” Quality Filtering
Β Β Β Β Intelligent filters ensure only high-quality tokens and wallets with sufficient liquidity and activity

πŸ€– ML-Powered Analytics
Β Β Β Β Machine learning pipeline generates smart scores, risk assessments, and behavioral clusters

πŸ’» Modern Interface
Β Β Β Β Sleek React dashboard with real-time updates and terminal-inspired design


image image image

πŸ“ Project Structure

solens_ai/
β”‚
β”œβ”€β”€ backend/                # Scrapers, database, and utility modules
β”‚   └── scrapers/          # Node.js scrapers with puppeteer
β”œβ”€β”€ backend_api/            # FastAPI backend (main API server)
β”œβ”€β”€ frontend-vite/          # React (Vite) frontend
β”‚   └── public/assets/      # Static assets (logo, bgvid.webm, etc.)
β”œβ”€β”€ venv/                   # Python virtual environment (not tracked)
β”œβ”€β”€ .env                    # Environment variables (Mongo URI, API keys, etc.)
β”œβ”€β”€ README.md               # This file

πŸ“‹ Prerequisites

🐍 Python 3.8+ with pip
πŸ“¦ Node.js 18+ with npm
πŸƒ MongoDB Atlas account (or local MongoDB)
πŸ”§ Git version control


πŸš€ Getting Started

1️⃣ Clone the Repository

git clone https://github.com/anthonystepvoy/solens_ai.git
cd solens_ai

2️⃣ Environment Setup

Create a .env file in the root directory with the following variables:

MONGODB_URI=your_mongodb_connection_string
MONGO_URI=your_mongodb_connection_string  # Alternative name for compatibility
# Add other environment variables as needed

3️⃣ Install Dependencies

🐍 Python (Backend API)

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install Python dependencies
pip install -r requirements.txt

βš›οΈ React Frontend

cd frontend-vite
npm install

πŸ”„ Data Scrapers

cd backend/scrapers
npm install

4️⃣ Running the Application

πŸ–₯️ Start the Backend API

cd backend_api
uvicorn main:app --reload --host 0.0.0.0 --port 8000

The backend API will be available at http://localhost:8000

🌐 Start the Frontend

cd frontend-vite
npm run dev

The frontend will be available at http://localhost:5173

πŸ—οΈ Production Build

# Build frontend for production
cd frontend-vite
npm run build

# Serve production build
npm run preview

πŸ”§ Common Issues & Solutions

❌ "vite" command not found

πŸ’‘ Solution: Run npm install in the frontend-vite directory

❌ "Cannot find package 'puppeteer-extra'"

πŸ’‘ Solution: Run npm install in the backend/scrapers directory

❌ MongoDB Connection Issues

πŸ’‘ Solutions:

  • Ensure your IP is whitelisted in MongoDB Atlas
  • Verify .env file contains correct MongoDB URI
  • Check network connectivity and firewall settings

πŸ”Œ API Endpoints

🎯 Core Endpoints

  • GET / β€” API health check
  • GET /dashboard-summary β€” Dashboard analytics and metrics
  • GET /wallets β€” List all tracked wallets
  • GET /wallet/{address} β€” Get specific wallet details
  • GET /tokens β€” List all tracked tokens
  • GET /top-tokens β€” Get top performing tokens

πŸ“Š Analysis Endpoints

  • POST /copytrade-analyze β€” Analyze wallet for copytrading patterns
  • GET /api/copytrade-analyze-progress β€” Check analysis progress
  • GET /api/copytrade-analyze-result β€” Get analysis results
  • POST /api/copytrade-cluster-analyze β€” Cluster analysis for multiple wallets

πŸ—„οΈ Data Management

  • POST /run-discovery β€” Trigger manual data discovery
  • POST /ml-process β€” Run ML processing on wallet data
  • GET /recent-activity β€” Get recent platform activity

πŸ—οΈ Architecture

πŸ”§ Backend Components

  • FastAPI Server (backend_api/main.py) - Main API server with REST endpoints
  • Data Scrapers (backend/scrapers/) - Node.js scripts for blockchain data collection
  • ML Processor - Machine learning pipeline for wallet analysis and scoring
  • MongoDB Integration - Data persistence and querying

🎨 Frontend Components

  • React + Vite - Modern frontend framework with fast development
  • Dashboard - Real-time analytics and wallet monitoring
  • Wallet Finder - Search and analyze individual wallets
  • Copytrade Analyzer - Pattern recognition for copy trading detection
  • Token Tracker - Monitor and analyze token performance

πŸ”„ Data Flow

  1. Collection: Scrapers fetch data from Solana blockchain and external APIs
  2. Processing: ML algorithms analyze and score wallet behavior
  3. Storage: Processed data stored in MongoDB
  4. API: FastAPI serves data to frontend
  5. Visualization: React frontend displays analytics and insights

πŸ‘¨β€πŸ’» Development Workflow

πŸ› οΈ Local Development

  1. Database: Ensure MongoDB is running and accessible
  2. Backend: cd backend_api && uvicorn main:app --reload
  3. Frontend: cd frontend-vite && npm run dev
  4. Scrapers: Run individual scrapers as needed for data collection

πŸ“‚ Code Structure

solens_ai/
β”œβ”€β”€ backend_api/          # FastAPI server
β”‚   └── main.py          # Main API application
β”œβ”€β”€ backend/             # Data collection and processing
β”‚   β”œβ”€β”€ scrapers/        # Blockchain data scrapers
β”‚   β”œβ”€β”€ database/        # Database utilities
β”‚   └── config/          # Configuration files
β”œβ”€β”€ frontend-vite/       # React frontend
β”‚   β”œβ”€β”€ src/            # Source code
β”‚   β”œβ”€β”€ public/         # Static assets
β”‚   └── dist/           # Built application
└── requirements.txt     # Python dependencies

🀝 Contributing

This is a personal project showcasing Solana blockchain analytics capabilities. While not actively seeking contributions, feedback and suggestions are welcome through issues or discussions.

πŸ“„ License

MIT License - see LICENSE file for details

πŸ“ž Contact

πŸ‘¨β€πŸ’» Developer: Anthony Stepvoy
πŸ™ GitHub: @anthonystepvoy
🐦 X/Twitter: @anthonystepvoy
πŸš€ Project: solens_ai

πŸ› οΈ Technology Stack

Category Technologies
πŸ”— Blockchain Solana
πŸ—„οΈ Database MongoDB Atlas
πŸ”§ Backend FastAPI, Python
🎨 Frontend React, TypeScript, Vite
πŸ’… Styling Custom CSS (Terminal Theme)
πŸ“Š Processing Node.js, Python ML
πŸš€ Deployment Railway, Vercel Compatible

Note: This project was originally built for personal use and is now being shared publicly to contribute to the developer community.

⭐ Star this repo if you find it useful!

Built with ❀️ for the Solana ecosystem

About

SOLENS is a comprehensive intelligence platform for Solana blockchain analysis, featuring real-time copytrader detection, wallet discovery, and advanced ML-powered analytics. Built with FastAPI, MongoDB Atlas, and modern React frontend.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages