Feature #11137
openImplementing the Blog module APIs
Subtasks
Related issues
Updated by Ajit A 7 days ago
1. Impact & Regression Analysis
Aspect Analysis & Verification Status
Existing APIs & Routing All modifications in
app.module.ts
and
main.ts
are purely additive. Global route prefixes (/api), Swagger setup, authentication guards, and exception filters remain fully intact. ✅ Safe
S3 & Storage Service
s3.service.ts
was extended with deleteFile() without altering signatures or behavior of existing uploadFile, uploadFileBuffer, or getFile methods. ✅ Safe
Static Asset Serving
main.ts
safely mounts /uploads and /api/uploads for local disk fallback without conflicting with other middleware. ✅ Safe
Frontend Profile & Auth Removing stale AuthContext.js resolves the TypeError: updateUser is not a function regression.
Profile.tsx
now defensively handles context updates and localStorage syncing. ✅ Safe
2. Elaborate Redmine Task Summary
Repository 1: Noxa-Jewellery-be (Backend)
Key Features & New Modules:
Blog Management Module (src/blogs/):
Implemented complete Mongoose model & schema (
blog.schema.ts
) supporting title, slug, HTML rich text content, cover images/videos, author, reading time, publication status (Draft/Published), timestamps, and SEO metadata.
Added comprehensive class-validator DTOs (
create-blog.dto.ts
,
update-blog.dto.ts
,
query-blog.dto.ts
).
Built
blogs.controller.ts
&
blogs.service.ts
with full CRUD, slug lookups, status filtering, and bandwidth-optimized queries (omitting heavy content field unless requested).
Implemented slug-based upsert logic with automated fallback for metaTitle and metaDescription.
Media Upload & Storage Engine (src/blogs/media.*):
Built
media.controller.ts
and
media.service.ts
supporting image and video uploads up to 250MB.
Configured hybrid storage strategy: uploads directly to AWS S3 when credentials/bucket are configured, with automatic fallback to local disk storage (./uploads/).
Added media deletion endpoint supporting removal by filename, S3 key, or URL.
Technical Enhancements & Bug Fixes:
Added deleteFile implementation to
s3.service.ts
using @aws-sdk/client-s3 DeleteObjectCommand.
Registered
BlogsModule
into root
app.module.ts
.
Added static file middleware in
main.ts
to serve local media files under /uploads and /api/uploads.
Fixed NestJS 11 route parameter compatibility with path-to-regexp v8+.
Repository 2: Noxa-Jewellery-fe (Admin Frontend)
Bug Fixes & Reliability:
Profile Update Error Toast Fix:
Deleted outdated, unreferenced build artifact src/auth/AuthContext.js which was causing updateUser is not a function runtime error after PUT /user/profile completed with HTTP 200.
Updated
Profile.tsx
handleSave to defensively check updateUser existence and sync user state directly to localStorage, ensuring the green success notification displays properly.