Skip to content

anmol392/MindLedger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MindLedger — The Proof-of-Intellect (PoI) Protocol

Next.js Node.js FastAPI PostgreSQL Redis Solidity

MindLedger is a decentralized academic "mining" platform. Students earn $POI tokens by solving Olympiad-level problems (JEE, INMO, IPhO). The platform uses AI-driven anti-cheat, semantic fingerprinting via pgvector, and a P2P verification network.


🏛️ System Architecture

graph TD
    User((Solver/Miner)) --> |Solve & Submit| Frontend[Next.js Application]
    Frontend --> |API Requests| API[Node.js Gateway]
    Frontend --> |Session Streams| WS[WebSocket Proctoring]
    
    subgraph "Infrastructure Layer"
        API --> |Context & Cache| Redis[(Redis Queue)]
        API --> |Relational Data| DB[(PostgreSQL + pgvector)]
        API --> |Embeddings| AI[FastAPI AI-Engine]
    end
    
    subgraph "Verification Layer"
        API --> |Sandboxed Code| Docker[Docker Runner]
        API --> |Solution Hash| Chain[Solidity Smart Contract]
    end
Loading

🚀 Installation & Setup

Method A: The Rapid Deployment (Recommended)

Use Docker Compose to spin up the entire stack (Database, Redis, AI-Engine, Backend, and Frontend) with a single command.

Prerequisites: Docker Desktop installed and running.

  1. Clone the Repository:

    git clone https://github.com/anmol392/MindLedger.git
    cd MindLedger
  2. Start the Services:

    docker-compose up --build -d
  3. Access the Platform:

    • Frontend: http://localhost:3000
    • API Server: http://localhost:8000
    • AI Engine: http://localhost:8001

Method B: Manual Component-wise Setup

Use this for granular development if you don't have Docker.

1. Database & Cache

You need a running PostgreSQL (version 15+ with pgvector extension) and Redis instance.

2. Backend API Server (Node.js)

cd backend/api_server
npm install
# Sync database schema (requires PG to be active)
npx prisma db push
# Seed initial problems
node prisma/seed.js
# Start server
node index.js

3. AI-Engine (Python)

cd backend/ai_engine
python -m venv venv
source venv/bin/activate  # Windows: .\venv\Scripts\activate
pip install -r requirements.txt
python main.py

4. Frontend (Next.js)

cd frontend
npm install
npm run dev

🏗️ Repository Structure

Directory Purpose Tech Stack
frontend/ Core user interface & dashboards Next.js 15, Tailwind 4, Framer Motion
backend/api_server/ Request gateway, proctoring & logic Node.js, Express, Socket.io, Prisma
backend/ai_engine/ Plagiarism & AI-trap detection FastAPI, Sentence-Transformers, PyTorch
blockchain/ Smart contracts & tokenomics Solidity (ERC-20 + custom PoI logic)

🛡️ Security & Anti-Cheat Protocols

  1. Semantic Fingerprinting: Every solution is vectorized using all-MiniLM-L6-v2. Any solution with >0.91 cosine similarity to existing solutions is flagged for plagiarism.
  2. AI-Trap Injection: Problems contain subtle "hallucination traps" (physically impossible constraints) that LLMs often miss but humans catch.
  3. Live Proctoring: WebRTC background streams verify the presence and focus of the solver in real-time.

📄 License & attribution

This project is open-source under the MIT License.

Built with precision for the global elite. © 2026 MindLedger Protocol.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors