Skip to content

refactor(seed): Refactor much of the codebase to setup seed#171

Open
david-bretaud-dev wants to merge 14 commits into
mainfrom
david-bretaud-dev/spike-split-seed-and-d4t
Open

refactor(seed): Refactor much of the codebase to setup seed#171
david-bretaud-dev wants to merge 14 commits into
mainfrom
david-bretaud-dev/spike-split-seed-and-d4t

Conversation

@david-bretaud-dev

@david-bretaud-dev david-bretaud-dev commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Goal

Still manage one codebase but be able to develop (and deploy here) the 2 websites (seed and all4trees).

The main benefit is that we don't have to recreate an application or manage duplicates.

What I wanted to do here:

  • extract what is common or base (e.g. can be applied to any app)
  • isolate what is purely related to one application

Normally, both apps are isolated and

  • all 4 trees is hosted at /all4trees path
  • seed is hosted at /seed path

The only thing that will problematic is

  • different env variables (but can be defined at runtime differently for each app)
  • the cookie for django session id

Highlight

  • index.css is where we define the common theme. Tailwind directives are imported in each app css file, alongside the index.css => index.css is included in the stylesheet of either seed.css or all4trees.css
  • I moved to each {app}.css file their own configuration of light and dark tokens (but the common token are still used in the shared index.css)
  • Extracted i18n translations into: common, seed and all4trees namespaces
  • Routing: there are some routes like "../${URLS.BLABLA}" with "relative" to "path" => the goal here is that, no matter the segment /seed or /all4trees, when i route from / to /login or to /dashboard, I want to do it relatively to the first segment
  • Header => make it agnostic and rely on props injection

Path

1 index.html -> 1 main.tsx -> 1 global-router which creates the 2 segments, and each app is lazy loaded.

@severo

severo commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

sorry, but it's a lot for me to review, when I don't know the codebase yet. If it'(s OK, I prefer to let you review @arnaudfnr for this one

@david-bretaud-dev david-bretaud-dev force-pushed the david-bretaud-dev/spike-split-seed-and-d4t branch from b884717 to 5c681b8 Compare June 18, 2026 07:12
@david-bretaud-dev david-bretaud-dev changed the title feat(seed): Refactor much of the codebase to setup seed refactor(seed): Refactor much of the codebase to setup seed Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants