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

Built by the Nometria team. We help developers take apps built with AI tools (Lovable, Bolt, Base44, Replit) to production - handling deployment to AWS, security, scaling, and giving you full code ownership. Learn more →

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.3.tar.gz (31.3 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.3-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: manus_to_supabase-0.1.3.tar.gz
  • Upload date:
  • Size: 31.3 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.3.tar.gz
Algorithm Hash digest
SHA256 5dab6788cbc7ddabdd691fb1510f414e2ee9af8d08c836b9c9a58f0c2fe36932
MD5 df7b240ea721bf194c4bb694e622db05
BLAKE2b-256 a2901ec392df86e34944b885b90a2aa0aec3ed0db429b4becb271080ffd498d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for manus_to_supabase-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c40e6357f7da7b6fef499998317f04a0f3ba5cb4389641abfd70cd07293df5af
MD5 c39ec6744a851269407a84dc01f3849e
BLAKE2b-256 48c4481d292774476dc09f4895405515eb41e899c6afb35f940fdebcdf09a547

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