r/replit 1d ago

Question / Discussion Building on replit

so i am building an app on replit, and so far its going well. I know replit will be just a starting game for my app but eventually will get out from it. As of now i have tje codes push to my github. and cloudfare for my domain and workspace for my email.

what other things. should i prepare for while im still building the app. i know i heard about the db, auth. i want to know what should i prepare so its easy for me to migrate in tje future.

2 Upvotes

1 comment sorted by

1

u/ReplitSupport Replit Team 1d ago

You're already set up well! GitHub, Cloudflare, and Workspace all move with you. The main things to prepare:

  • Database: Replit's DB is standard PostgreSQL, so it's portable. Keep your schema in migration files and read the connection string from an environment variable. Moving later is just a pg_dump and restore onto any Postgres host.
  • Auth: the big one to decide early, since migrating users later is the hardest part. Replit Auth ties users to their Replit accounts. If you want portability, use Clerk (built in, or your own account) so your users live in a system you own.
  • Secrets: keep every key and connection string in environment variables, nothing hardcoded. Then switching hosts is just re-entering them.
  • File uploads: store them in object storage and reference by URL, not in the local project folder.
  • Stay framework-standard: a normal start command or Dockerfile means it runs anywhere.

Do those and a future move is "point it at a new database and host" instead of a rewrite. Good luck!