feat: AI SEO generator, full admin panel, i18n sweep, new logo + auth/RTL fixes
Build backend images / build content-svc (push) Failing after 3m39s
Build backend images / build file-svc (push) Failing after 52s
Build backend images / build gateway (push) Failing after 58s
Build backend images / build identity-svc (push) Failing after 1m21s
Build backend images / build notification-svc (push) Failing after 1m0s
Build backend images / build render-svc (push) Failing after 58s
Build backend images / build studio-svc (push) Failing after 55s

AI SEO content generator
- content-svc: per-tenant OpenAI config (ai_settings) + /v1/ai endpoints
  (settings GET/PUT, seo-post) with SEO-expert prompt → structured article
- admin UI to configure token/base-url/model and generate + save as blog
- configurable base URL for restricted networks

Full data-driven admin panel
- generic /api/admin/resource proxy + reusable AdminResource component
- categories/tags/fonts/blogs (CRUD), users (list + ban), plans/slides
- AI content section; nav + i18n

i18n localization sweep
- localized 116 user-facing + studio/editor components to next-intl (fa+en)
  under the auto.* namespace; merge tooling in scripts/merge-i18n.js

Branding + assets
- Monoline F logo (LogoMark + favicon)
- offline SVG placeholder generator (/api/placeholder), dropped picsum.photos

Fixes
- JWT issuer mismatch on content/studio (flatrender → flatrender-identity)
- missing role claim → [Authorize(Roles="Admin")] now works (RBAC)
- Secure cookies broke HTTP sessions → gated behind AUTH_COOKIE_SECURE
- Radix RTL via DirectionProvider (right-aligned menus in fa)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-02 09:35:14 +03:30
parent bcc69f0a2e
commit 3fc7bf2b97
160 changed files with 4397 additions and 767 deletions
+4 -1
View File
@@ -11,7 +11,10 @@ export function setAuthCookies(
refreshToken: string,
accessExpiresIn: number
): NextResponse {
const secure = process.env.NODE_ENV === "production";
// Only mark cookies Secure when explicitly behind TLS — otherwise the app is
// unusable over plain HTTP (the browser drops Secure cookies). Set
// AUTH_COOKIE_SECURE=true in HTTPS/production deployments.
const secure = process.env.AUTH_COOKIE_SECURE === "true";
const base = { httpOnly: true, sameSite: "lax", secure, path: "/" } as const;
res.cookies.set(ACCESS_TOKEN_COOKIE, accessToken, {
...base,
+15
View File
@@ -0,0 +1,15 @@
/**
* Offline, deterministic placeholder image source.
*
* Replaces picsum.photos (unreachable in restricted / offline networks) with a
* same-origin SVG generated by `/api/placeholder/[w]/[h]?seed=…`. Each seed yields
* a stable, distinct gradient, so demo/fallback art still looks varied — and it
* works with `next/image` with no external requests.
*/
export function placeholderSrc(
seed: string | number,
width: number,
height: number
): string {
return `/api/placeholder/${width}/${height}?seed=${encodeURIComponent(String(seed))}`;
}
+3 -1
View File
@@ -1,3 +1,5 @@
import { placeholderSrc } from "@/lib/placeholder";
export type ProjectType = "video" | "image" | "trimmer";
export type ProjectStatus = "draft" | "rendering" | "ready";
@@ -82,5 +84,5 @@ export function formatLastEdited(isoDate: string): string {
}
export function getProjectThumbnailSrc(seed: string): string {
return `https://picsum.photos/seed/${seed}/480/270`;
return placeholderSrc(seed, 480, 270);
}
+3 -1
View File
@@ -1,3 +1,5 @@
import { placeholderSrc } from "@/lib/placeholder";
export const TEMPLATE_CATEGORIES = [
"All",
"Video",
@@ -110,7 +112,7 @@ export const TEMPLATES_CATALOG = buildCatalog();
export const TEMPLATES_PAGE_SIZE = 24;
export function getTemplateImageSrc(id: string): string {
return `https://picsum.photos/seed/${id}/480/360`;
return placeholderSrc(id, 480, 360);
}
export interface TemplateFilters {
+5 -3
View File
@@ -1,3 +1,5 @@
import { placeholderSrc } from "@/lib/placeholder";
export type VideoSidebarCategoryId =
| "all"
| "animation"
@@ -94,14 +96,14 @@ export function getVideoTemplateStyleImageSrc(
templateId: string,
styleIndex: number
): string {
return `https://picsum.photos/seed/${templateId}-style${styleIndex}/240/135`;
return placeholderSrc(`${templateId}-style${styleIndex}`, 240, 135);
}
export function getVideoTemplateExampleImageSrc(
templateId: string,
exampleIndex: number
): string {
return `https://picsum.photos/seed/${templateId}-example${exampleIndex}/520/325`;
return placeholderSrc(`${templateId}-example${exampleIndex}`, 520, 325);
}
const templatesByCategory: Record<
@@ -374,7 +376,7 @@ export function filterVideoCatalog(
}
export function getVideoTemplateImageSrc(id: string): string {
return `https://picsum.photos/seed/${id}/640/360`;
return placeholderSrc(id, 640, 360);
}
export interface VideoTemplateSection {