Dev user (local login)

In development a known user is seeded automatically so you never have to go through sign-up while working on the app.

How it works

  • On system start with the :dev profile, saas.dev-user/seed-dev-user! (called from the :db.sql/migrations component) creates the dev account if it doesn't exist, with the default user role. It never runs in test/prod.

  • The credentials live in saas.dev-user (cljc), shared between the backend seed and the frontend.

  • On the login page, dev builds show a "Use dev account" button that autofills the form with these credentials — click it, then Login. The button is emitted by the saas.dev-only/with-dev-credentials macro, which inlines the credentials at compile time only when saas.dev-user is on the classpath and the build is not a :release build. In release builds the macro expands to nil, so neither the button nor the credentials exist in the bundle — and the prod build doesn't need env/dev on the classpath at all.

To change the credentials, edit env/dev/clj/saas/dev_user.cljc (delete the old user row from user_account if you change the email, so the new one gets seeded).