Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cyberwizdev/tavo

Repository files navigation

🚀 Tavo

Tavo is a modern full-stack framework CLI that combines:

  • Python backend (FastAPI/Starlette base)
  • 🦀 Rust + SWC powered SSR for React (with App Router support)
  • 🔥 Client hydration & HMR with no Node.js runtime required
  • 🛠️ CLI scaffolding for apps, routes, components, and APIs

Think of it as Laravel Breeze + React + Python but lighter, faster, and developer-friendly.


✨ Features

  • SSR with React App Router (layouts, nested routes, use client)
  • Hydration scripts compiled with SWC (no Node.js runtime needed)
  • File-based routing for both backend and frontend
  • Hot Module Replacement (HMR) via inline WebSocket
  • One CLI (tavo) to rule them all — scaffold projects, run dev server, and build
  • Python backend with Starlette/FastAPI style APIs out of the box
  • Template system for rapidly creating new apps

📦 Installation

pip install tavo

Or from source:

git clone https://github.com/cyberwizdev/tavo
cd tavo
pip install -e .

⚡ Requirements

Tavo itself does not depend on Node.js for SSR/runtime. However, two things make npm required:

  1. Frontend ecosystem: Tavo projects use React and npm packages from the Node.js ecosystem.
  2. SWC binary: Tavo’s compiler installs the SWC binary globally using npm during setup.

So you’ll need:

  • Python 3.10+
  • Node.js (LTS) + npm (npm is mandatory since SWC uses it for global install)

On Linux:

# Example (Debian/Ubuntu)
sudo apt install nodejs npm python3-venv

⚡ Quick Start

1. Create a new project

tavo new myapp

This sets up a project with:

  • Python backend (tavo_core)
  • React frontend with SSR
  • HMR + WebSocket inline dev server
  • Preconfigured templates

2. Run dev server

cd myapp
tavo dev

Visit: http://localhost:3000 Changes reload instantly ⚡.


3. Build for production

tavo build

This generates:

  • ✅ Compiled backend (Python)
  • ✅ Optimized frontend bundle (SWC)
  • ✅ Static + SSR-ready HTML

🗂️ Project Structure

A new tavo project looks like this:

myapp/
│── app/                  # React components (App Router)
│   ├── layout.tsx
│   ├── page.tsx
│   └── ...
│── backend/              # Python backend (APIs, DB, services)
│   ├── main.py
│   └── routes/
│── public/               # Static assets
│── templates/            # Scaffolding templates
│── package.json          # For frontend deps (managed with npm)
│── pyproject.toml        # Python project config
│── tavo.config.json      # Tavo project config

🛠️ CLI Commands

Command Description
tavo new <name> Create a new project
tavo dev Run development server with HMR
tavo build Build backend + frontend for production
tavo add <name> Add a component, page, or API route
tavo doctor Check environment & setup

⚙️ Configuration

Tavo uses a tavo.config.json file:

{
  "name": "myapp",
  "backend": "fastapi",
  "frontend": "react",
  "ssr": true,
  "hmr": true
}

🤝 Contributing

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/foo)
  3. Commit changes (git commit -m 'Add foo')
  4. Push to branch (git push origin feature/foo)
  5. Open a PR 🚀

📜 License

MIT © CyberwizDev


🌟 Why the name Tavo?

Short, catchy, and inspired by “Tabula Volans” — “a flying tablet/page” in Latin. Just like how Tavo makes pages fly from Python to React ⚡.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •