Skip to content

release(App): Devices, avatars & caching - #101

Merged
risixdzn merged 45 commits into
mainfrom
develop
Sep 19, 2026
Merged

risixdzn merged 45 commits into
mainfrom
develop

Conversation

@risixdzn

Copy link
Copy Markdown
Member

Summary

  • Devices catalog: categories, makers and models CRUD with company-scoped models
  • Avatar upload flow (presign, crop dialog, update/remove) and a purpose-based upload presign route
  • Redis caching via @Cached/@InvalidateCache decorators across Account, Auth, Companies, Credentials, Models, Categories, Makers, Employees and ServiceOrders repos
  • GET /health endpoint with MySQL, Redis and Workers probes
  • UI/UX pass: sidebar, colors, spacing, font sizes, intercepted parallel routes for dialog forms, downscaled ServiceOrder tables
  • Fix: JWT refresh redirect loop and F5 revalidation
  • Repo/OSS docs: AGENTS.md, CLAUDE.md, MIT license, CONTRIBUTING.md

risixdzn added 30 commits May 27, 2026 14:15
…used columns

- Flatten modelMinimalListSelect to fix 500 error with nested selects + $dynamic()
- Remove imageLocalPath and imageUrl references (columns dropped from DB)
- Source primary image from model_images table; return presigned URL as imageUrl
- Remove originalUrl from model_images response, schema, and insert
- Add batch queryPrimaryImages + generateImagePresignedUrl helpers
- Add "Available" status fallback for null status in all model endpoints
- Add 416 code to httpStatusCodes to fix page_out_of_bounds serialization
- Create migration 0010 for FULLTEXT index on models (name, models_text, ...)
feat(Devices): Categories, models and makers for known devices
…ching

Enable experimentalDecorators in tsconfig and create CacheService
(fail-open Redis wrapper), @cached, and @InvalidateCache decorators
under src/shared/infra/cache/.

Relates to FIXR-13
Apply @cached to queryModelById, queryModelBySlug, queryModelImages.
Apply @InvalidateCache to insertModel, updateModel, deleteModel,
insertModelImage, deleteModelImageRecord.

Relates to FIXR-13
Replace manual redis.get/set/del with declarative decorators.
Add @cached to queryUserById, queryUserByEmail, queryJWTPayloadByUserId.
Add @InvalidateCache to setUserVerified, deleteUser, updateUserWithGoogleData.

Relates to FIXR-13
Replace manual redis.get/set with @cached on queryAccountById.

Relates to FIXR-13
Replace manual redis.get/set with @cached on queryCompanyById
and queryCompanyBySubdomain. Add @InvalidateCache to createOrgWithAdmin.

Relates to FIXR-13
Replace manual redis.del with @InvalidateCache on updateUserPassword.

Relates to FIXR-13
…ers repos

Add @cached decorators to read-heavy methods and @InvalidateCache
to write methods across remaining repositories for transparent Redis caching.

Relates to FIXR-13
All cache key helpers and CACHE_TTL have been replaced by
@cached and @InvalidateCache decorator options.

Relates to FIXR-13
- Public GET /health returning ok/degraded/unavailable per service
- MySQL ping via SELECT 1, Redis ping via PING, Workers via BullMQ queue
- Latency measurement with threshold-based health classification
- OpenAPI docs under Health tag (visible in Scalar/Swagger)
- Parallel health checks via Promise.allSettled

FIXR-42
- Use headers.getSetCookie() instead of headers.get('Set-Cookie')
  to forward all Set-Cookie headers (was missing second cookie)
- Use NextResponse.next() instead of redirect on success to prevent loop
- Add !payload guard so malformed JWTs also trigger revalidation

Fixes FIXR-43
… spacings

feat(UI): Improvements on forms UX, app colors, font sizes and spacings
refactor(Cache): Annotation abstracted cache and invalidation methods
risixdzn and others added 15 commits September 14, 2026 19:22
… route

- Unified three separate presign endpoints into a single /:purpose/presign
- Added purpose enum (avatar, service_orders, model_image) to uploads table
- Replaced model_images.r2Key with uploadId FK to uploads table
- Removed redundant columns from service_order_images (imageUrl, fileName, sizeInBytes, contentType)
- Made uploads.company_id and employee_id nullable for avatar uploads
- Added upload size validation with UPLOAD_SIZE_EXCEEDED error
- Simplified upload schemas and deprecated createModelImageUploadPresignSchema
- Updated docs, repositories, services, and controllers to use unified flow
Merge conflict markers were left in the file after merging the cache
refactor with the avatar upload feature, breaking type-checking. Uses
the new InvalidateCache decorator, consistent with other repositories,
instead of the removed core/lib/cache helpers.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
docs(Repo): Add AGENTS.md, CLAUDE.md and per-app guardrails for AI agents
Adds LICENSE (MIT), CONTRIBUTING.md, CODE_OF_CONDUCT.md, GitHub issue
and pull request templates, and links them from the README.
The README told contributors to create a single root .env, but each
app/package loads its own local .env (no root .env.example exists).
Also documents the missing env vars (ADMIN_URL, Turnstile, R2), adds
the missing bun run dev:admin step, and lists bun run db:seed.
@risixdzn
risixdzn merged commit 850986d into main Sep 19, 2026
1 of 2 checks passed
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.

1 participant