This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the Flopsstuff organization .github repo (github.com/Flopsstuff/.github). It holds two independent things:
- The org profile (
profile/) - static assets GitHub renders on the org landing page. No build. - The landing site (repo root) - a static site deployed to Cloudflare Workers at https://stuff.flopbut.pl, ported from the sibling
aigniteproject's stack.
These are unrelated to each other; a change to one rarely touches the other.
No em dashes. Write a plain ASCII hyphen -, never — (U+2014) or – (U+2013). This holds for
everything authored here: site copy (src/content/*.md, src/data/projects.ts), page titles and meta
descriptions, both READMEs, the brand guide, and these docs. The repo is currently clean of both
characters, so grep -rn "—\|–" over a change should come back empty before you commit.
profile/README.md- the org landing page on GitHub. A curated, grouped table of public projects (AI & developer tooling, Polish e-Invoicing/KSeF, hardware, and forks/contributions). Each row has a one-line description and Repo / optional Web links. First line embeds the logo via<img src="logo.svg" width="80">. Newest first here too - a new row goes at the top of its table, never appended.profile/logo.svg- hand-built 7-segment LED display spelling the "FS" monogram in red (#ff2d2dlit,#3a0c0cdark) on a dark rounded rect. Segments are individual<polygon>s taggedclass="seg seg-<a-g> on|off"+data-seg; the two digit groups are positioned withtransform="translate(...)". Toggling a segment = flip both its fill and theon/offclass. No generator script - edit the SVG directly.profile/logo.png- raster export of the SVG; keep in sync when the SVG changes.
A Vite + React 19 + React Router single-page app (src/), built to dist/ and served by Cloudflare Workers' static-assets handler with SPA not-found fallback. See ADR 0001 for why. Plain CSS with design tokens - no CSS framework.
index.html(repo root) - Vite entry; mountssrc/main.tsxinto#root.src/main.tsx- thecreateBrowserRouterroute table and the sharedLayout(Header/Outlet/Footer).Layoutalso renders React Router's<ScrollRestoration />: without it aLinkfrom a card half-way down the home page opens the detail page already scrolled to that offset. It keeps new navigations at the top and restores the previous offset on back/forward, so don't drop it or replace it with a bare scroll-to-top effect.src/data/projects.ts- the project catalogue (the source of truth for cards + links). OneProjectper public org repo:slug,name,category,tagline,description,repoUrl, optionalwebUrl/npmUrl,status(active|experimental|fork|completed|archived; every non-activestatus renders as a badge). Grouped into five categories (AI & dev tooling, KSeF, hardware, art, forks). Keep this in sync with the org's public repos and withprofile/README.md. Newest first: the home page renders each category in this array's order (getProjectsByCategoryfilters, it never sorts), so a new project goes at the top of its category block and the rest shift down - see "Adding a project" inREADME.md.public/projects/<slug>.jpg- the card/hero image for each project: 1200x675 (16:9), referenced fromprojects.tsasimage: "/projects/<slug>.jpg". Sourced from the project's own repo or live site where one exists, generated art otherwise. Copied in and resized, never hot-linked. See "Card images" inREADME.mdfor the rules, including the blurred-backdrop treatment for square/portrait sources.src/content/<slug>.md- long-form detail-page body per project, loaded eagerly as raw strings viaimport.meta.glob(src/content/index.ts). A project with no.md(or an empty one) simply renders without a long body. Authoring structure:docs/content-authoring.md.src/pages/(Home,ProjectDetail),src/components/(Header,Footer,ProjectCard,NotFound),src/styles/tokens.css- the UI. Detail pages live at/projects/<slug>.dist/- Vite build output; this is whatwrangler.jsondeploys (assets.directory: ./dist). Gitignored (.gitignore:/dist), so runyarn buildbefore any localyarn deploy- wrangler ships whatever happens to be on disk.docs/flopsstuff.md- narrative content source for the landing copy;docs/brand/holds the brand/design-system reference.README.md(root) - a generic Cloudflare "Next.js Framework Starter" template readme carried over verbatim fromaignite. It is inaccurate (this repo is Vite + React, not Next.js) - treat the section below as the source of truth, not that README.
- Package manager: Yarn 4.6.0 via Corepack (
corepack enable), pinned by.yarnrc.yml(yarnPath: .yarn/releases/yarn-4.6.0.cjs). That release binary andyarn.lockare committed on purpose - CI breaks without them. yarn install --immutable- install (React, React Router, react-markdown, Vite, wrangler).yarn dev- Vite dev server with HMR (day-to-day local work).yarn build-tsc -b && vite build→dist/(typecheck + production bundle).yarn preview-wrangler dev, serves the builtdist/the way Workers will.yarn deploy-wrangler deploy. The script sources.envfirst (set -a; . ./.env), so local deploys pick up credentials from there automatically. Runyarn buildfirst -deployships whatever is indist/.
wrangler.json: worker nameflopsstuff,assets.directory: ./dist, SPA not-found handling, and a routestuff.flopbut.plwithcustom_domain: true.stuff.flopbut.plis a subdomain of theflopbut.plzone (same Cloudflare account) - not a separately registered domain.custom_domain: truemakes wrangler create the DNS record + TLS cert on first deploy.- The site previously lived at
fs.aignite.pl(zoneaignite.pl). Dropping it fromroutesand redeploying was enough: wrangler unbound the custom domain and deleted its DNS record. fs.aignite.plnow 301-redirects here, preserving path and query. Two pieces on theaignite.plzone: a proxiedAAAA fs → 100::record (a discard address - it only has to resolve and hit Cloudflare's edge) plus a Redirect Rule matchinghostname eq fs.aignite.pl, actionconcat("https://stuff.flopbut.pl", http.request.uri.path), status 301, preserve query string. The hostname filter matters: without it the rule would swallowaignite.plandsoulgrep.aignite.pltoo.- The deploy token is scoped to
flopbut.plonly, so anything touching theaignite.plzone (that redirect included) has to go through the dashboard. - Cloudflare account:
serg.flop@gmail.com, account ID42548ca95c85a68b4ce20ad79b805334.
.github/workflows/deploy.ymldeploys on push tomain(andworkflow_dispatch): Node 22 → Corepack →yarn install --immutable→yarn build→cloudflare/wrangler-action@v3withcommand: deploy. CI buildsdist/itself - it is not in the repo.- CI auth uses two repo secrets:
CLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_ID. Both are already set. - The API token needs: Account › Workers Scripts: Edit, Account › Account Settings: Read, Zone › Workers Routes: Edit, and Zone › DNS: Edit on
flopbut.pl(DNS Edit is required whenever the custom domain is (re)created).
- Local:
.env(gitignored) holdsCLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_ID..env.exampleis the committed template documenting both. - CI: the same two vars live as GitHub Actions secrets. Actions does not read
.env, so the two stores are maintained separately (e.g.gh secret set --env-file .env).
Images and media (*.jpg, *.png, *.mp3, *.mp4) are stored in Git LFS (.gitattributes). The deploy workflow checks out with lfs: true; without it the build would ship LFS pointer files instead of the images. Run git lfs install once on a new machine before cloning.
No automated tests. Verify: yarn build (typecheck + bundle) is the primary gate; yarn dev to eyeball changes locally, or yarn deploy --dry-run for config/asset sanity; curl -I https://stuff.flopbut.pl after a deploy; preview the profile README's Markdown and open the SVG in a browser. When adding/removing a project, update src/data/projects.ts, profile/README.md, and (optionally) src/content/<slug>.md together.