For developers

1. Getting started

From the THINQ Site developer guide, in the guide's own words. The same text ships with every site's core.

1.1 What you need

  • Node 22 or newer and git.
  • GitHub access to your site's repo (write) and to thinq-platform/thinq-site-core (read). Your site repo pulls core in as a submodule, so without read access to core the clone comes back with an empty core/ folder.
  • An editor with TypeScript support. VS Code works well; the @/… import paths resolve once the dev server has assembled the site once (see §1.4).

1.2 Clone and run

git clone --recurse-submodules https://github.com/thinq-platform/<your-site-repo>.git
cd <your-site-repo>
cp env.example .env.local          # set a local admin username and password
node core/scripts/dev.mjs --port 3311 --hostname 127.0.0.1

The first start installs dependencies and takes a few minutes. Then:

URL What it is
http://127.0.0.1:3311 The site
http://127.0.0.1:3311/admin The CMS. Sign in with the username and password from .env.local
http://127.0.0.1:3311/admin/blocks The block catalogue: every block, previewed with sample content
http://127.0.0.1:3311/preview/<slug> A page as saved, drafts included (admin session required)

If core/ is empty, you cloned without --recurse-submodules:

git submodule update --init

.env.local is never committed. The first start creates the local admin account from it; changing the password there later does not change an account that already exists (delete .thinq/content to start over, see §1.4).

1.3 What the dev script does

core/scripts/dev.mjs:

  1. Assembles core and your repo into .thinq/build: core's files first, then yours laid on top. Where both have the same path, yours wins.
  2. Installs dependencies in .thinq/build whenever the lockfile changes.
  3. Watches your repo and core/, and re-syncs .thinq/build on every save.
  4. Runs next dev inside .thinq/build, with the content folder pointed at .thinq/content.

Two rules follow:

  • Edit your repo, never .thinq/build. Every sync makes .thinq/build an exact copy of core plus your repo, so anything edited there is lost on the next save.
  • .thinq/build is the best place to read core, because it is the site exactly as it will deploy. core/src/… is the same code before your files are laid on top.

1.4 Where your local admin edits go

Pages, menus and settings you change in the local admin, images you upload, and the local admin account are stored in .thinq/content, outside the build, so saving a code file never touches them. (Before 2026-10-05 they lived inside the build and were wiped on every save. That was a bug, and it is fixed.)

Folder What it is Committed? Reaches staging?
content/ in your repo The site's seed content: what a brand-new deployment starts with Yes Only on first boot, and to files nobody has edited since (see Pages §6.6)
.thinq/content Your local admin edits and uploads No (gitignored) No
The host's volume (/data) The live site's content, edited in the staging or live admin No It is staging

So: real content goes in through the staging admin, not through your local one. To reset your local site to the seed, stop the dev server and delete .thinq/content.

1.5 Getting core updates

Core improves continuously, and your repo's core/ pin is moved forward automatically (see §1.7). When you start a working session, or when Bo tells you something has been fixed:

# stop the dev server first
git pull
git submodule update --init      # moves core/ to the commit your repo now pins
node core/scripts/dev.mjs --port 3311 --hostname 127.0.0.1

git pull alone does not update the files inside core/. It moves the pin, and git submodule update checks out the code. Skipping the second command is the most common reason a fix "didn't work" or an import like @/components/FooterParts cannot be found. Check with:

git submodule status       # a leading "+" means core/ is not at the pinned commit

If the dev server misbehaves after an update, delete the build and let it reassemble:

rm -rf .thinq/build        # keeps .thinq/content (your local admin edits)

1.6 Branches and pull requests

Work on a branch and open a pull request into main:

git checkout main && git pull && git submodule update --init
git checkout -b header-mobile-menu
# … work, commit …
git push -u origin header-mobile-menu

Merging into main deploys to staging (see Testing and deploying). Before you merge, run the production build on the assembled tree (§8.4). The host runs exactly that, and a site that fails it also stops receiving core updates.

1.7 The commits you didn't write

Two kinds of commits land on your main from outside:

  • Core → <sha>: the automated cascade moving your core/ pin after a core change. It only lands after your site has built, passed its tests and booted on the new core.
  • A reconcile commit from Bo, when core changes a file your site keeps its own copy of (usually src/features/index.ts; see §2.6).

Because of these, merge main into your branch before you open the pull request:

git fetch origin
git merge origin/main

If git reports a conflict on core itself, take main's pin. You almost never want your branch's older one:

git checkout origin/main -- core
git submodule update --init
git commit

If the conflict is in src/features/index.ts, keep both sides' entries: core's features plus your own, with yours last. If you are unsure, push the branch and ask Bo rather than committing a guess; a wrong resolution in that file can remove core features from the site.

1.8 What to send Bo, and when

Send it when:

  • something in core is broken, or behaves differently from this guide;
  • you need a change inside core/, or inside a file listed in §2.4;
  • you want a new capability the admin does not have (a new setting, a field an editor should control);
  • you are about to put a file at a path core already uses.

Include the exact error text, what you ran, and the branch. Full error output makes most problems a five-minute fix.

This text is maintained in thinq-site-core at docs/developers/01-getting-started.md (commit e72488e) and published here unchanged.