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/ownmy-app/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.0.tar.gz (40.2 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.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for manus_to_supabase-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c38784961c8d2ac08b9537697f18cf1508d7fa9cdf4efbf7703ea97ea82a1593
MD5 449a1a3e3298b2517c6bde6e8b75d3bd
BLAKE2b-256 f4f4ed438c78aeb67e5788cb914dc1b3ceb224265e0ccc716fca29782283975d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for manus_to_supabase-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7273a8dc9157347a84f860906cbb090e0cd238ea4a464e5bff65ba6b7dd0010
MD5 204df6e5467df0b7a174a345a4a980c2
BLAKE2b-256 69bf4d94505ebd8afe562f6f55ce42d16b9d815e0ec8c631806908e85d3a0cb3

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