Skip to content

fix(content): persist CMS content with Prisma (#1095) - #1167

Merged
nanaf6203-bit merged 5 commits into
MettaChain:mainfrom
suleimanjem-hash:newci
Aug 31, 2026
Merged

nanaf6203-bit merged 5 commits into
MettaChain:mainfrom
suleimanjem-hash:newci

Conversation

@suleimanjem-hash

@suleimanjem-hash suleimanjem-hash commented Aug 30, 2026 •

Copy link
Copy Markdown

Summary
This PR addresses three backend issues affecting data persistence, search functionality, analytics correctness, and tracking-data security.

Changes
Persist CMS pages, banners, FAQs, and legal documents using Prisma/PostgreSQL instead of process-local memory.
Add durable image-search indexing backed by the database and connect it to the image indexing flow.
Replace fabricated search analytics with persisted records and deterministic database-backed aggregations.
Protect GET /track/stats with JWT authentication and role-based authorization while keeping public click and email-open tracking routes accessible.
Add database/integration tests covering persistence, indexing, analytics aggregation, and tracking authorization.
Issues Fixed
closes #1095
closes #1096
closes #1097
close #1098

Testing
npx prisma format
npx prisma validate
npx prisma generate
npm run build
npm run test:database
npm test -- --runInBand

@nanaf6203-bit
nanaf6203-bit merged commit 5c55985 into MettaChain:main Aug 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment