Skip to main content

One-command migration for Manus AI projects: add Supabase auth and switch Drizzle from MySQL to PostgreSQL.

Project description

manus-to-supabase

One-command migration for Manus AI projects: swap MySQL→PostgreSQL, add Supabase auth, wire everything up.

Built for developers who generated a project on Manus and want to self-host it with Supabase + Postgres instead of the managed MySQL that Manus uses by default.


Quick start

# Clone and install (zero runtime deps — pure stdlib)
git clone https://github.com/nometria/manus-to-supabase
cd manus-to-supabase
pip install -e .

# Run in your Manus project directory
manus-to-supabase /path/to/your/manus-project

# Or run in current directory
cd /path/to/manus-project
manus-to-supabase

# After migration: set env vars and install
cat >> .env << 'EOF'
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=eyJ...
SUPABASE_JWT_SECRET=your-jwt-secret
DATABASE_URL=postgresql://user:pass@host:5432/db
EOF
npm install
npm run dev

# Run tests
pytest tests/ -v

What it does

Applies these changes to your Manus project automatically:

  1. package.json — adds @supabase/supabase-js, pg, jose; removes mysql2
  2. Reference files — copies in Auth.tsx, AuthCallback.tsx, supabase-client.ts, supabase-auth.ts, unified-sdk.ts from bundled templates
  3. server/_core/env.ts — adds supabaseUrl and supabaseJwtSecret env vars
  4. server/_core/index.ts — registers registerSupabaseAuthRoutes and registerForgeReplacementRoutes
  5. shared/db.ts — patches Drizzle from mysql2 to pg
  6. client/src/App.tsx — adds Auth and AuthCallback route pages
  7. .env.example — appends all discovered SUPABASE_* env vars
  8. Env var scan — scans all .ts/.tsx/.js/.jsx files and prints required vars

Install

pip install manus-to-supabase

Or run without installing:

pipx run manus-to-supabase /path/to/your/manus-project

Usage

# Run in current directory (Manus project root)
manus-to-supabase

# Specify target directory
manus-to-supabase /path/to/manus-project

The script is idempotent — safe to run multiple times.


After migration

Add these to your .env:

VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=eyJ...
SUPABASE_JWT_SECRET=your-jwt-secret
DATABASE_URL=postgresql://user:pass@host:5432/db

Then:

npm install
npm run dev

Zero dependencies

The migration script uses only Python stdlib. No pip install required beyond the package itself.


Example output

Running pytest tests/ -v:

============================= test session starts ==============================
platform darwin -- Python 3.13.9, pytest-9.0.2, pluggy-1.5.0
cachedir: .pytest_cache
rootdir: /tmp/ownmy-releases/manus-to-supabase
configfile: pyproject.toml
plugins: anyio-4.12.1, cov-7.1.0
collecting ... collected 9 items

tests/test_migrate.py::test_patch_package_json_adds_supabase_deps PASSED [ 11%]
tests/test_migrate.py::test_patch_package_json_removes_mysql2 PASSED     [ 22%]
tests/test_migrate.py::test_patch_package_json_idempotent PASSED         [ 33%]
tests/test_migrate.py::test_patch_package_json_skips_missing PASSED      [ 44%]
tests/test_migrate.py::test_collect_env_vars_finds_process_env PASSED    [ 55%]
tests/test_migrate.py::test_collect_env_vars_finds_import_meta_env PASSED [ 66%]
tests/test_migrate.py::test_collect_env_vars_skips_node_modules PASSED   [ 77%]
tests/test_migrate.py::test_patch_env_ts_adds_supabase_vars PASSED       [ 88%]
tests/test_migrate.py::test_patch_env_ts_idempotent PASSED               [100%]

============================== 9 passed in 0.03s ===============================

See examples/sample-manus-app/ for the typical Manus project structure before migration.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

manus_to_supabase-0.1.2.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

manus_to_supabase-0.1.2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file manus_to_supabase-0.1.2.tar.gz.

File metadata

  • Download URL: manus_to_supabase-0.1.2.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for manus_to_supabase-0.1.2.tar.gz
Algorithm Hash digest
SHA256 baaa50fc3b1a1a9b409eac41a613b4ab5f6d7c29a3cd93d2aa91ce924a42fb2d
MD5 d86fa1c9abcf4ead4879e52e01ca418d
BLAKE2b-256 db5ceb0a6bb06850e5d5aadf255ef0c4cf9ad3f258580b953db0459084b7781f

See more details on using hashes here.

File details

Details for the file manus_to_supabase-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for manus_to_supabase-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e28f3847a74f485d022ebe9d5502e5ab0fd70a0ed80baada79bdce6156056629
MD5 692de5554cf103c8c5eeb6dd7cbbc353
BLAKE2b-256 6743104d5ede4abad0941c8c05414fd71ca1a89a996e83d691006c0a9120db96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page