64 Commits

Author SHA1 Message Date
ordinarthur
94fdb37dc3 fix(admin): render visual editor as ui field inside default form
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 2m48s
The views.edit.default override replaced Payload's <Form> wrapper, so
useField had no form-state context — every field returned undefined
and setValue threw "N is not a function" during autosave.

Flatten the collection into a single ui field that renders
ProductPreviewEditor, with every real field marked admin.hidden:true.
The panel now lives inside Payload's default form, so useField gets
real values and autosave works.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 14:17:26 +02:00
ordinarthur
8f3a26e883 fix(admin): sync inline-editable DOM text imperatively
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 2m45s
React 19 does not reconcile children of contentEditable elements
after mount, so fields whose useField value arrives async (on most
paths under the tabs wrapper) stayed visually empty even though the
form state had the right value.

Drive textContent from a useLayoutEffect keyed on value, skip updates
while the element has focus (user typing), and let commit() write back
on blur. Same fix applied to PriceEditable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 14:04:12 +02:00
ordinarthur
f5671008a7 feat(admin): replace default edit view with visual preview editor
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 2m39s
Overriding admin.components.views.edit.default makes /admin/collections/
products/:id and /create render the product-detail panel directly —
text fields are contentEditable, the image is click-to-upload, and
price is inline-editable in the checkout-price-line. Fields that don't
fit the public template (slug, name, currency, availability, SEO,
isPublished, sortOrder, stripeID) live in a collapsible "Réglages
avancés" drawer below the panel.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 13:54:50 +02:00
ordinarthur
7962975dbd fix(admin): unblock product create page
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 2m39s
Two bugs compounded to render /admin/collections/products/create blank:

1. Dockerfile's STRIPE_SECRET_KEY build-time placeholder was too short
   (11 chars) to pass the regex that gates Stripe plugin sync. Build
   produced an importMap missing plugin-stripe components like LinkToDoc,
   warning at runtime and failing to render.

2. With autosave enabled, Payload creates a blank draft on page load.
   Plugin-stripe's beforeValidate hook fired against empty data, calling
   Stripe products.create with no name, throwing a 500 that aborted the
   page render.

Fix: use a 20+ char placeholder in the Dockerfile so the build-time
importMap mirrors runtime, and add a beforeValidate hook that sets
skipSync=true whenever productDisplayName is empty so Stripe sync
waits until the product has content.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 13:00:29 +02:00
ordinarthur
1caf66bf79 chore: retrigger CI (previous run OOM-killed during type-check)
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 3m2s
2026-04-21 12:44:17 +02:00
ordinarthur
8fc3b2365a feat(admin): click-to-edit visual editor for products
Some checks failed
Build & Deploy to K3s / build-and-deploy (push) Failing after 14m11s
New "Édition visuelle" tab on the product edit view renders the
product panel with each text field wrapped in a contentEditable
InlineEditable that calls useField.setValue on blur. Combined with
the collection's existing autosave, changes persist automatically
without a manual save.

- InlineEditable: contentEditable wrapper backed by useField
- ProductPanelInfo: presentational product-panel JSX
- ProductPreviewEditor: default-exported custom view component
  registered at admin.components.views.edit.livePreview
- Image is read-only; slug/price/SEO still edited via default form tab

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 12:09:45 +02:00
ordinarthur
aeabd79ac6 fix: regenerate migration with stripe plugin fields
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 3m6s
Previous run generated the initial migration without STRIPE_SECRET_KEY
set, so the stripe plugin's sync was disabled and the stripeID/skipSync
columns were omitted. Prod then crashed on queries referencing
products.stripe_i_d. Regenerated with a placeholder key so the plugin
contributes its fields to the schema.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 11:02:19 +02:00
ordinarthur
955dbeb63b feat: add initial migration and run it on container start
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 3m6s
Payload's postgresAdapter `push: true` only runs in dev. Prod needs
committed migrations; the container now runs `payload migrate` before
starting Next.js so the schema is created on first deploy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 10:45:03 +02:00
ordinarthur
bf5bf977e9 feat: replace Astro + Sanity + Fastify with Next.js + Payload CMS
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 4m13s
Single Next.js 15 app now serves frontend SSR, admin CMS, and Stripe API.
Replaces the Sanity quota-limited headless CMS with self-hosted Payload 3.0
on Postgres, removing the split-service topology (ssr/api/proxy → web).

- nextjs/: Next.js 15 app with Payload 3.0, Postgres adapter, Stripe plugin
- k8s/: new single-pod deployment + Postgres StatefulSet + PVCs (media, db)
- .gitea/workflows/deploy.yml: single-image build, tears down legacy pods

New Gitea secrets required: PAYLOAD_SECRET, POSTGRES_PASSWORD.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 10:28:29 +02:00
ordinarthur
e14732ef2c fix: read env vars from process.env for K8s compatibility
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 57s
Astro import.meta.env doesn't see K8s configmap env vars.
Fall back to process.env which works in SSR Node runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 18:05:24 +02:00
ordinarthur
6782e4d40b feat: add Dockerfiles for K3s deployment
Some checks failed
Build & Deploy to K3s / build-and-deploy (push) Failing after 3m34s
Dockerfile.ssr for Astro SSR, Dockerfile.api for Fastify API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 17:54:26 +02:00
ordinarthur
9a9519ce29 update site 2026-04-11 17:42:39 +02:00
ordinarthur
1b53e04b5d feat: switch to SSR for live Sanity updates
Migrate from SSG to SSR with @astrojs/node adapter so Sanity CMS
changes are reflected immediately without rebuild. Separate ports
for Astro SSR (4321) and Fastify API (3000) in production.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 11:41:34 +02:00
ordinarthur
7c77ac6c19 stylé de ouf 2 2026-04-04 11:15:58 +02:00
ordinarthur
f0042e49ec stylé de ouf 2026-04-04 11:15:54 +02:00
ordinarthur
4e2adf1afb fix: Safari mobile compatibility 2026-03-30 18:22:37 +02:00
ordinarthur
209d222eb0 remove: all scan/tech overlay effects 2026-03-30 18:19:20 +02:00
ordinarthur
15d7f856cb fix: smooth zoom reveal on product panel image 2026-03-30 18:16:37 +02:00
ordinarthur
0e07c4acd6 fix: remove scan effect on product panel image 2026-03-30 18:14:10 +02:00
ordinarthur
5257e53487 correct 2026-03-30 18:12:47 +02:00
ordinarthur
ea865574b7 new site 2026-03-30 18:03:12 +02:00
ordinarthur
39f7db84fb fix: add ComponentLoader for @adminjs/upload v4 compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:42:31 +01:00
ordinarthur
f4ac81dac3 feat: full product management from admin with image upload
- Add @adminjs/upload for image management (JPEG/PNG/WebP, max 5MB)
- Auto-compute imagePath, ogImage, slug, seoTitle, seoDescription
- Stripe price auto-sync on product create/edit
- Serve uploads via Fastify + nginx /uploads/ location
- Add imageKey/imageMime fields to schema
- Hide technical fields from admin edit form
- Add uploads/ and SQLite DB to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:38:11 +01:00
ordinarthur
4bb9ed86d4 feat: auto-sync product prices to Stripe from admin + UI fixes
- Admin edit hook syncs prices to Stripe (create/archive)
- "Prochainement disponible" disabled button for products without price
- Seed no longer hardcodes stripePriceId
- Fix nginx port mismatch (3001 → 3000)
- Coord tag background color + sound auto-start fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:30:39 +01:00
ordinarthur
d0b9242b89 change db type 2026-03-20 23:18:24 +01:00
ordinarthur
fc771aa2c1 feat: Enable ambient sound by default with autoplay on user interaction and update UI to reflect its active state. 2026-03-20 22:57:52 +01:00
ordinarthur
338efc548e feat: implement a contact modal with form submission functionality and minor style adjustments to card tags. 2026-03-20 22:57:23 +01:00
ordinarthur
801342a0bd update performance from lighthouse 2026-03-20 22:47:01 +01:00
ordinarthur
64e5159a55 correct seo 2026-03-20 22:31:12 +01:00
ordinarthur
39e2c7a1a0 new style rastafari 2026-03-20 22:27:12 +01:00
ordinarthur
90e229a763 add style frerot le boss 2026-03-20 22:15:18 +01:00
ordinarthur
5698eba6a8 ok prod 2026-03-13 10:23:05 +01:00
ordinarthur
76209f1e5d deploy: switch from Coolify to direct VPS deploy (nginx + systemd)
- nginx.conf: add proxy for /api, /admin, /robots.txt, /sitemap.xml to Fastify:3001
- deploy.sh: one-command rsync + build + restart
- deploy/setup.sh: first-time VPS setup (node, pnpm, nginx, systemd)
- deploy/rebours.service: systemd unit for Fastify server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 09:52:48 +01:00
ordinarthur
5ef1e88f9a correct 2026-03-12 20:27:54 +01:00
ordinarthur
090a61d452 correct config 2026-03-12 20:20:56 +01:00
ordinarthur
9175004893 correct config 2026-03-12 20:13:00 +01:00
ordinarthur
eeb9025210 correct config 2026-03-12 20:03:57 +01:00
ordinarthur
8a96286551 correct 2026-03-12 19:57:16 +01:00
ordinarthur
8793113b65 fix: add @babel/plugin-syntax-import-assertions for AdminJS build
AdminJS requires this Babel plugin during the Astro build step.
Without it, Rollup fails to process .adminjs/entry.js.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:54:08 +01:00
ordinarthur
e3fb2752b7 fix: connect fastify to coolify network for DB access
The Docker Compose app creates its own isolated network, so the
fastify container cannot reach the PostgreSQL database managed
separately by Coolify. Adding the external 'coolify' network
allows inter-container communication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:47:34 +01:00
ordinarthur
e8b71e7603 correcgt 2026-03-12 16:14:28 +01:00
ordinarthur
05b49baae9 correct docker compose 2026-03-12 16:11:30 +01:00
ordinarthur
542202883c remote pg for prod 2026-03-12 16:08:10 +01:00
ordinarthur
9537c0342c re-deploy 2026-03-12 15:37:59 +01:00
ordinarthur
4fdeacd19e feat: Add database with Prisma, AdminJS panel, Dockerization, Stripe integration, and migrate to pnpm. 2026-03-12 14:09:55 +01:00
ordinarthur
dd087d8826 add receipt 2026-02-27 18:37:58 +01:00
ordinarthur
598cb49b61 modify responsive 2026-02-27 18:36:09 +01:00
ordinarthur
7109ba44d7 add favicon logo 2026-02-27 18:28:00 +01:00
ordinarthur
5e540dc0bb add seo 2026-02-27 18:20:54 +01:00
ordinarthur
8be3338265 refactor using astro 2026-02-27 18:14:08 +01:00