A lightweight web-based data notebook for Python and SQL code execution, inspired by Hex.
hex_lite/
├── backend/ # FastAPI + Python (IPython kernel, DuckDB)
├── frontend/ # Next.js + React + TypeScript
└── docs/ # Documentation
- Python 3.12+ (with
uvpackage manager recommended) - Node.js 20+ (with
pnpmpackage manager) - PostgreSQL 15+ (for metadata storage)
- Docker (optional, for running PostgreSQL)
cd backend
# Create virtual environment with uv
uv venv
source .venv/bin/activate # Linux/Mac
# .venv\Scripts\activate # Windows
# Install dependencies
uv pip install -e .
# Copy environment file
cp .env.example .env
# Edit .env with your database credentials
# Start PostgreSQL (using Docker)
docker-compose up -d
# Run database migrations
alembic upgrade head
# Start backend server
uvicorn app.main:app --reload --port 8000cd frontend
# Install dependencies
pnpm install
# Start development server
pnpm dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Admin Dashboard: http://localhost:8000/admin
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/hex_lite
# Security
ENCRYPTION_KEY=your-fernet-key-here
# CORS
CORS_ORIGINS=http://localhost:3000
# Optional
DEBUG=true
SQL_LOG_LEVEL=WARNINGNEXT_PUBLIC_API_URL=http://localhost:8000- ✅ Python code execution via IPython kernel
- ✅ SQL query execution via DuckDB
- ✅ Multiple database connections (PostgreSQL, MySQL, SQLite)
- ✅ CSV/Parquet/Excel file upload
- ✅ Notebook persistence
- ✅ Session isolation (each notebook = separate kernel)
- ✅ Admin dashboard
- FastAPI
- SQLAlchemy + Alembic
- IPython/Jupyter Client
- DuckDB
- PostgreSQL
- Next.js 14 (App Router)
- React 19
- TypeScript
- Tailwind CSS
- CodeMirror 6
- Zustand
MIT