Skip to content

Vishok-2006/ChainDrive

Repository files navigation

NebulaChain AI Storage

MVP full-stack cloud storage platform combining AI document chat, Supabase PostgreSQL + pgvector RAG, Telegram Bot API file storage, and Ethereum Sepolia ownership proofs.

MVP stack

  • React + Vite frontend
  • FastAPI backend
  • Supabase Auth, PostgreSQL, and pgvector
  • NVIDIA AI API for LLM responses
  • Telegram Bot API for encrypted file storage and retrieval references
  • Ethereum Sepolia smart contract for file ownership verification

Features

  • Upload files through the FastAPI backend and store encrypted bytes through Telegram Bot API.
  • Persist file metadata, activity, and document embeddings in Supabase PostgreSQL.
  • Chat with document context using the RAG pipeline and NVIDIA AI API.
  • Register SHA256 file ownership hashes on Sepolia with FileOwnershipRegistry.
  • Verify ownership from the frontend using MetaMask and the deployed contract address.

Quick start

cp .env.example .env
# Fill Supabase, NVIDIA, Telegram, Sepolia, and security values.

npm install
pip install -r requirements.txt

npm run dev
uvicorn main:app --reload

Frontend: http://localhost:5173 Backend docs: http://localhost:8000/docs

Supabase setup

Run database/schema.sql in the Supabase SQL editor. Use your Supabase PostgreSQL connection string in SUPABASE_DB_URL. The project keeps pgvector support through the document_embeddings table.

Sepolia deployment

npm install
npx hardhat compile
npx hardhat run scripts/deploy.cjs --network sepolia
# Put the deployed address into VITE_CONTRACT_ADDRESS in .env

Only metadata and ownership hashes are stored on-chain. File bytes are encrypted and stored through Telegram Bot API.

Environment

The root .env.example is intentionally small and beginner-friendly. Runtime constants such as JWT algorithm, token expiry, pgvector table name, and contract metadata are kept in code instead of requiring extra environment variables.

API

  • GET /api/health
  • POST /api/files/upload
  • GET /api/files
  • GET /api/stats
  • POST /api/ai/chat
  • POST /api/ai/stream
  • GET /api/blockchain/verify/{file_hash}/{wallet}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors