Migrating an Existing Base44 App to Knack

Move an app you already built in Base44 onto Knack as its backend, including your tables, data, sign-in, and access rules, without exposing data along the way.

What You'll Learn

This article walks you through migrating an existing Base44 app to Knack, so Knack holds your data, your users, and your access rules while Base44 keeps building your screens. It covers the order to do things in so your data is never exposed, and how to prove the migration worked.

Before You Start: Why Order Matters

Migrating creates a second copy of your data. Until the old copy is locked down and deleted, your app is only as secure as its weakest backend.

The safe order is to secure Knack first, test the switch before your users see it, and remove the old backend last.

⚠️

Check your Base44 app's security first

Base44 apps can be published with Public visibility by default. A login screen in your app may only protect the screens, not the data. Run Base44's security scan before you start so you know what's exposed today.

The Migration Sequence

Follow these phases in order. Each one depends on the one before it.

PhaseWhat you doWhy
  1. Baseline
Capture record counts and key numbers, export your dataGives you something to compare against later
  1. Build Knack
Create tables, move data, verify every recordNothing is live yet
  1. Lock Knack
Set roles and data access rules, turn on enforcementKnack is secure before anything points at it
  1. Sign-in setup
Register the OAuth client for your Base44 URLsSetup only, no exposure
  1. Switch the app
Replace Base44 sign-in and data with KnackBase44 builds the new wiring
  1. Test
Compare everything to your baselineProve it before users rely on it
  1. Cutover
Remove Base44 sign-in pages, publishThe switch
  1. Clean up
Delete the Base44 tablesRemoves the second copy

Phase 1: Capture a Baseline

Before you change anything, record what your app shows today. You'll compare against this after the move.

Capture the record count for each table, the numbers on any dashboard, and every field value for one reference record. Then export each Base44 table as a CSV from the Base44 Data view.

📘

Date-based numbers change daily

If your app calculates anything from today's date, like "expiring in 30 days," the numbers shift every day on their own. Compare your baseline and your Knack results on the same day.

Phase 2: Connect Base44 and Build Your Knack Tables

Connect the Knack MCP Server in Base44 first. See Connecting Base44 to Knack: Complete Setup Guide for the connection steps.

Then ask Base44 to create a new Knack app with tables that match your Base44 tables. Be specific about field types in your prompt.

Tell your builder which dates are calendar dates

Expiration dates, due dates, and birthdays are calendar dates, not moments in time. Ask your builder to create them as date-only fields with no default date.

If date fields are created with a time, dates can display one day early for anyone west of your Knack app's timezone. The stored value is correct, but it looks wrong. The fix is to set the field to ignore time.

Keep the old IDs for matching connections

Base44 stores relationships as its own record IDs. Those IDs mean nothing to Knack.

Add a Base44 ID text field to each Knack table and fill it during the move. Knack can then match connections on that field, so every record links to the right parent.

Create connections after the tables

Knack creates connection fields in a separate step after the tables exist. Move parent tables first, then child tables. For example, move facilities, then providers, then credentials.

Phase 2 Continued: Move Your Data

You have two ways to move records.

MethodBest forWatch for
CSV import in the Knack BuilderLarger datasets, most controlMatch connections on the Base44 ID field
Base44 moves records through the MCPSmall datasetsWrites one record at a time, needs several "continue" prompts

If Base44 moves the records, some writes may report an error even though the record saved. A good builder checks before retrying. Ask yours to confirm it won't create duplicates.

Verify every record

Export each Knack table and compare it to your Base44 export, matched on the Base44 ID field. Check the count, every field, every connection, and every date.

📘

For developers

A short script comparing both CSVs by Base44 ID catches missing records, duplicates, broken connections, and date shifts in one pass. Spot-checking a few records in the Builder doesn't.

Phase 3: Lock Down Knack

Set up your user roles and data access rules before your app points at Knack. Your AI builder can configure data access control through the MCP, including turning enforcement on.

After it reports done, open the Knack Builder and confirm three things. Enforcement is on. Each role has the access you intended. The Public (Not Logged-In) role has No Access in both the Owned by User and All Other Records columns.

⚠️

Check the Public role's Owned by User column

In testing, the Public role showed Full Access under Owned by User after data access was configured through the MCP. Confirm it shows No Access before you continue.

Keep user registration off unless your app needs open sign-up.

Phase 4: Register the Sign-In Client

Knack sign-in for a Base44 app needs an OAuth client with three redirect URLs, one for each address your app runs on.

AddressFormat
Live apphttps://your-app.base44.app/auth/callback
Previewhttps://preview--your-app.base44.app/auth/callback
Preview sandboxhttps://preview-sandbox--[Base44 App ID].base44.app/auth/callback

The sandbox URL uses your Base44 App ID, not your Knack application ID. You'll find it in Base44 under Dashboard, then API, then Authentication.

⚠️

Knack sign-in doesn't complete inside the Base44 editor preview

You'll reach the Knack sign-in screen, but the handoff back fails. Test sign-in on your published app instead.

Phase 5: Switch Sign-In and Data to Knack

Ask Base44 to replace its login with Knack sign-in first, then switch data in a separate step. Testing them one at a time tells you which part broke if something fails.

When you ask for the data switch, include these requirements in your prompt:

  • Use the signed-in user's Knack session for every request
  • Send the knack-client-timezone header with every request
  • Treat date-only fields as calendar dates with no timezone conversion
  • Load all records and handle pagination
  • Refresh the session so it doesn't expire mid-use
  • Show a visible error if a request fails, and never fall back to Base44 data
⚠️

An empty screen can look like good news

If your app can't read data, a dashboard may show zeros and "nothing needs attention." Without a visible error, you can't tell an access problem from a perfect record.

Lock the Base44 tables during the switch

Set each Base44 table's permissions to admin only. Your app keeps working for you as the builder, and nobody else can reach the old data.

Phase 6: Test Against Your Baseline

Sign in to your published app in an incognito window, so no old Base44 session interferes. Then check each of these:

  • Dashboard numbers match your baseline exactly
  • Your reference record matches field for field
  • Dates match, including records moved in different batches
  • Printed or exported reports match
  • Adding a record in your app creates it in Knack
  • Editing a record in your app updates it in Knack
  • Deleting a record in your app removes it from Knack
  • Signed out, every page sends you to sign-in

Records created from your app are owned by the signed-in user. Records you migrated are owned by App Builder. See Who Owns a Record if your access rules depend on ownership.

Phases 7 and 8: Cutover and Clean Up

Ask Base44 to remove its own sign-in pages, including registration, and every remaining reference to the Base44 tables. Publish, then test again in an incognito window.

Delete the Base44 tables last, by hand, from the Base44 Data view. Run Base44's security scan one final time.

Troubleshooting

What you seeLikely causeFix
Dates show one day early at 9 or 10 PMDate fields include a timeSet the Knack date field to ignore time
Connections are empty after importParent records imported after children, or no matching fieldImport parents first, match on Base44 ID
"Sign-in session expired" in the editor previewPreview can't complete the handoffTest on the published app
OAuth registration rejects URL #3Knack application ID used in the sandbox URLUse the Base44 App ID
Dashboard shows all zeros after sign-inApp still reads Base44 data, or access rules block the userCheck which backend the app reads, then check data access rules
Duplicate records after a moveA write was retried without checking if it savedCompare counts to your baseline, delete duplicates

Next Steps


Did this page help you?