Skip to content

Upgrade Guide

Most upstream changes reach your fork through the registry (see Getting Updates). Some releases also change files the registry doesn’t ship (components.json, vite.config.ts, index.html…). This page lists the manual steps for those releases. Apply them before refreshing your fork from the registry.

Atomic CRM now builds on Base UI instead of Radix UI, following Shadcn Admin Kit 2.0. Before pulling this release into an older fork, switch your own components.json to the Base UI style:

{
"style": "base-vega"
}

Skipping this step leaves the src/components/ui files your fork already owns on Radix while the incoming application code uses the Base UI API (render instead of asChild, an items map on <Select>, array values on <ToggleGroup>), and tsc will fail.

Your own components keep using Radix until you migrate them. Shadcn ships an agent skill for that, one component at a time:

Terminal window
pnpm dlx skills add shadcn/ui

Then ask your coding agent migrate accordion to base-ui, and so on. The Shadcn Admin Kit migration guide covers the details.

Atomic CRM now reads its deployment settings (Supabase URL and key, inbound email…) from a config.js file at runtime instead of inlining the VITE_* variables in the bundle (see Runtime Configuration). The registry updates the code that reads this file, but not the files that produce and load it. Before pulling this release into an older fork, copy them from upstream, otherwise the app fails on startup with “config.js is not loaded”:

  1. Copy scripts/renderRuntimeConfig.ts into your scripts/ directory.

  2. Add its plugin to vite.config.ts (and vite.demo.config.ts, if you have it), and remove the define block that inlined the VITE_* variables:

    vite.config.ts
    import { runtimeConfig } from "./scripts/renderRuntimeConfig.ts";
    export default defineConfig({
    plugins: [
    // ...
    runtimeConfig(),
    ],
    });
  3. If you use VitePWA, keep config.js out of the precache, so that a rewritten file isn’t served stale:

    vite.config.ts
    workbox: {
    // ...
    globIgnores: ["**/node_modules/**/*", "config.js"],
    runtimeCaching: [
    {
    urlPattern: /\/config\.js$/,
    handler: "NetworkFirst",
    options: { networkTimeoutSeconds: 3 },
    },
    ],
    },
  4. Load the file in index.html, before the app’s script:

    index.html
    <script vite-ignore src="./config.js"></script>

Your .env files and deployment variables keep working unchanged: the dev server serves config.js from them, and vite build writes it from them. If your own unit tests stub VITE_* variables with vi.stubEnv(), set window._atomicCrmConfig in a vi.hoisted() block instead, since the configuration is read once, on import.