Refac/domain driven #1

Merged
fsylvain merged 40 commits from refac/domain-driven into main 2026-09-25 16:15:15 +02:00
40 Commits
Author SHA1 Message Date
fsylvain 24f95a8fd7 chore: Vitest + Vue Test Utils test runner exposed as task test:web 2026-09-25 16:12:50 +02:00
fsylvain 64f50074bd chore: setup design references 2026-09-25 16:04:12 +02:00
fsylvain 2a64991916 refac: GET /v1/auth/registration 2026-09-25 15:54:42 +02:00
fsylvain 61828783a1 refac: GET /static/uploadedImages/{filename} 2026-09-25 15:40:21 +02:00
fsylvain 8d17a12e92 refac: GET /v1/auth/me 2026-09-25 15:17:39 +02:00
fsylvain 0e050c36ff fix: rate limiting X-Real-IP from the real peer 2026-09-25 06:49:55 +02:00
fsylvain 9b47685002 refac: split the auth handler into registration and login, account verification, and password reset handlers, each with its own dependencies 2026-09-25 06:14:53 +02:00
fsylvain 3282b0580c fix: remove the unused user use cases, fix the specs that no longer match the code, include api/middleware and api/pkg/claims in mutation testing, log failures that password reset requests currently ignore, and reject user_id claims that don't fit a user id 2026-09-25 05:58:37 +02:00
fsylvain cbb403011a fix: login and password reset requests are rate-limited per client (not in the README; there is currently no brute-force protection on the public auth routes) 2026-09-25 05:33:02 +02:00
fsylvain f3ec3d2fa2 fix: resetting the password or cancelling a registration ends existing sessions: a token issued before the change is refused 2026-09-25 05:03:34 +02:00
fsylvain 81c4b62175 fix: reading a single article follows the same rule as the list: anyone can read an online article, a verified user can also read an offline one, and an unknown or hidden id returns 404 2026-09-24 16:32:40 +02:00
fsylvain 2ee28203ab fix: API responses never include a user's password, verification code or reset code hashes, or their expiry dates; verifying an account returns only the public user fields 2026-09-24 15:39:50 +02:00
fsylvain aa865af2e9 refac: reamaining auth surface rewrite, T0 2026-09-24 05:11:49 +02:00
fsylvain 6d510d2805 refac: register only open while no verified acc exists, enforced by a use case rather than handler & sends verification email whose link uses the conf pub URL whose code expires after 2h 2026-09-24 03:36:37 +02:00
fsylvain 6e9e108033 refac: several unverified users can exist at once: an empty reset or verification code is stored as no value so it doesn't break the unique constraint, and deleting a user removes the row so the same username and email can register again 2026-09-24 01:59:24 +02:00
fsylvain 0b4e614ec9 refac: runtime settings are read once at startup and passed in through the composition root; no handler, router or repository reads environment variables 2026-09-24 01:30:00 +02:00
fsylvain e474f03d91 refac: authenticated user can upload an image to an existing article and receives its public location; an unknown article returns 404 and a disallowed type returns 400 2026-09-24 00:33:26 +02:00
fsylvain 5992c8598b refac: allowed image types and the size limit are a domain rule checked by the use case, not by the persistence layer 2026-09-24 00:03:29 +02:00
fsylvain 8a8a24434a refac: deleting an article also deletes its images, and deleting a missing article returns 404 2026-09-23 23:42:18 +02:00
fsylvain c16fdbd26d refac: authenticated user can edit an article's body; an unknown id returns 404 2026-09-23 23:24:03 +02:00
fsylvain 8822bdddd0 refac: authenticated user can publish and unpublish an article; an unknown id returns 404 2026-09-23 22:54:44 +02:00
fsylvain 790d4e6da6 refac: authenticated user can list all articles, including offline ones, while the public list only shows online ones 2026-09-23 22:36:41 +02:00
fsylvain 6a2ca07b66 refac: repository updates, image attachment and deletes report the domain not-found error for an unknown id, the same for articles, users and images, and the test fakes stop returning GORM errors 2026-09-23 22:09:06 +02:00
fsylvain 4278d96882 refac: article title rules are the same in the API request and the domain; an invalid title returns 400 instead of 500 2026-09-23 20:04:09 +02:00
fsylvain ff8cd5f0ec refac: password and code hashing & checking go through a domain hasher interface used by the use cases instead of bcrypt in the user repository and the auth handler 2026-09-23 19:29:20 +02:00
fsylvain 8460a078e3 refac: missing user or article is reported with a domain not-found error instead of a raw GORM error, and the API answers 404 for it 2026-09-23 18:55:05 +02:00
fsylvain 7c57173497 feat: characterized the existing use cases as a baseline; every repo fake behaves like the real ones and can be told to fail, every use case is covered; gremlins runs clean on useCases 2026-09-23 18:21:46 +02:00
fsylvain 09bd5afa4a refac: rethought the complete workflow and deployement flow ; docs etc. 2026-09-23 17:36:36 +02:00
Floriansylvain 4a6209a8db feat: api serve frontend, build workflow, router readyness 2025-12-24 01:05:58 +01:00
Floriansylvain aee595dee9 feat: primevue base 2025-12-23 23:14:04 +01:00
Floriansylvain 9ecaa80fcf feat: initial vuejs frontend commit 2025-12-22 17:45:19 +01:00
Floriansylvain fbbce403e2 fix: allowed register condition 2025-12-22 03:07:30 +01:00
Floriansylvain 9c80cb9885 feat: unit testing mocked repos / domain 2025-12-22 02:49:57 +01:00
Floriansylvain ce787d26ff fix: remove low file code from domain 2025-12-22 02:41:09 +01:00
Floriansylvain 76245c47c9 fix: added some business rules to article creation 2025-12-22 01:18:50 +01:00
Floriansylvain 5282770caa refac: better error handling & moved IsOnline logic to cleaner place 2025-12-22 00:59:36 +01:00
Floriansylvain b50efae8a8 refac: mappers, file names 2025-12-22 00:06:17 +01:00
Floriansylvain e0a6706d4e fix: removed domain article coupling with infra 2025-12-21 21:53:29 +01:00
Floriansylvain 0eba18e367 fix: removed useless file 2025-12-21 21:34:07 +01:00
Floriansylvain 61a84201d8 refac: remove frontend & clearer DDD 2025-12-21 21:31:30 +01:00