Commit Graph

163 Commits

Author SHA1 Message Date
soroush.asadi 14cdb772b4 feat(frontend): migrate dashboard projects flow off Supabase to V2 Studio
User-saved projects now read/write through the gateway /v1/saved-projects
(studio schema) using the Identity access-token cookie, replacing the
Supabase `projects` table. Adds src/lib/api/saved-projects.ts client that
maps studio snake_case DTOs into the existing DashboardProject shape.

- DashboardProjectsContent: lists via studio service, degrades gracefully
- /api/projects GET: studio list; POST: copy-from-template create
  (studio requires original_project_id; falls back to scene_data.templateId)
- /api/projects/[projectId] GET/PATCH: proxy to studio with JWT

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 05:56:25 +03:30
soroush.asadi f366d73697 chore: harden frontend npm ci with retry loop for flaky Nexus proxy
The Nexus npm-group proxy intermittently returns 500s / corrupted
tarballs while back-filling its cache. Wrap npm ci in a 5-attempt retry
loop with raised fetch-retry budget so successive passes converge.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 05:45:10 +03:30
soroush.asadi e8c1587695 fix: satisfy next build ESLint in admin-api (unused param)
next build runs ESLint (stricter than tsc --noEmit), which failed on the
unused `type` param in fetchCategories with no-unused-vars, breaking the
frontend production build. Reference it via `void type;` while keeping
the signature for API compatibility.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 05:45:10 +03:30
soroush.asadi 7f03ad1d03 chore: add demo content seed for V2 content service
Idempotent SQL seed (deterministic UUIDs, ON CONFLICT DO NOTHING) that
inserts 4 categories and 8 published template containers linked to them,
so the public site shows real data through the gateway /v1/* routes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 05:22:47 +03:30
soroush.asadi fa013b2305 feat: repoint admin-api content reads to V2 gateway
src/lib/admin-api.ts now reads categories/templates/projects from the
V2 content service via the gateway (/v1/*) instead of the legacy
admin-api (:5000). Maps V2 snake_case DTOs (CategoryResponse tree,
PagedResponse<ContainerSummaryResponse>) into the existing camelCase
AdminCategory/AdminProject shapes, so call sites are unchanged and the
hardcoded fallback still applies when the gateway is unreachable.

V2 containers are video templates (primary_mode is a render mode, not a
type), so all map to type "video". Query params use camelCase
(pageSize/isPublished) since .NET binds query strings by property name,
not the snake_case used in response bodies.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 05:15:45 +03:30
soroush.asadi 8b86f17645 fix: make plans list public, fix frontend healthcheck IPv6
PlansController had a class-level [Authorize] that gated the public
plans list, contradicting the gateway's optionalAuth on /plans. Mark
List/GetById [AllowAnonymous] and resolve tenant optionally so
anonymous callers receive global plans (purchase/current-plan stay
authenticated).

Frontend container stayed "unhealthy" because busybox wget resolves
localhost to IPv6 [::1] while the Next.js standalone server binds
IPv4 only. Use 127.0.0.1 in the healthcheck.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 00:24:53 +03:30
soroush.asadi 90ac0b81d1 feat: V2 microservices stack — backend services, gateway, JWT auth
Add full V2 architecture: identity, content, studio (.NET 10) and file,
render, notification, gateway (Go) services with vendored deps, plus DB
migrations, event/API contracts, and an init-db script.

Wire the Next.js frontend to the gateway: server-side JWT auth routes
(login/register/refresh/logout/me), gateway fetch helper, and session/
cookie/jwt helpers under src/lib.

Containerize the stack via docker-compose.v2.yml and per-service
Dockerfiles. Base images resolve through a Nexus mirror (Docker Hub) and
MCR directly; npm/NuGet pull from Nexus groups. Self-host fonts via
next/font/local to avoid Google Fonts (geo-blocked).

Add CI workflow and ignore .env.v2, *.stackdump, and .NET bin/obj.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 23:29:31 +03:30
Soroush.Asadi 53ea78a00d chore: dockerize Next.js app (multi-stage build, standalone output)
- Dockerfile: 3-stage build (deps → builder → runner) using node:20-alpine
- .dockerignore: excludes node_modules, .next, secrets, graphify-out
- docker-compose.yml: runtime secrets via env, build-time NEXT_PUBLIC_* via args
- Render worker service pre-wired (commented out, opt-in)
2026-05-27 10:17:07 +03:30
Soroush.Asadi 36e264f3e3 feat: admin API integration, LogoMark, settings page, i18n, RTL font, docs
- Wire admin API into homepage + templates page (ISR 60s, null fallback)
- Add src/lib/admin-api.ts with safeFetch helper
- Add adminProjectToTemplateItem + adminProjectToCatalogTemplate mappers
- Add LogoMark SVG component, replace Sparkles icon in Navbar/Footer/Sidebar
- Add public/favicon.svg (SVG brand mark)
- Rewrite opengraph-image.tsx with FlatRender branding
- Add RTL/Persian font cascade: unlayered [dir=rtl] block forces Vazirmatn
- Dashboard Settings page: Profile, Security, Billing, Notifications sections
- Add src/lib/supabase/client.ts browser client
- Admin API: GET /me, PATCH /profile, POST /change-password endpoints
- Admin API DTOs: AdminUserDto, UpdateProfileRequest, ChangePasswordRequest
- Admin UI Settings page with TanStack Query + mutations
- Add CLAUDE.md + README.md to both repos for new-machine onboarding
- Update PROJECT_MEMORY.md with session log
- Add appsettings.Development.json.example template
2026-05-27 09:06:51 +03:30
Soroush.Asadi 4875e468fe i18n: wire useTranslations for video-maker, image-maker, and pricing heading
- Add videoMaker + imageMaker namespace to en.json and fa.json
  (hero, features x5, use-cases x4, CTA per section)
- Pricing.tsx: replace hardcoded heading with t('pricing.heading')
- VideoMakerHero/Features/UseCases/Cta: full useTranslations wiring
- ImageMakerHero/Features/UseCases/Cta: full useTranslations wiring
- Features/UseCases arrays moved inside components; icons kept as
  module-level constants to avoid per-render allocation
2026-05-25 07:40:26 +03:30
Soroush.Asadi 39a86b93d4 fix: konva Image alt prop + useMemo dep array corrections 2026-05-25 07:29:40 +03:30
Soroush.Asadi c61f587767 feat: full studio build -- light theme, canvas thumbnails, i18n (fa/en) 2026-05-24 17:37:31 +03:30
Soroush.Asadi d962483359 Initial commit from Create Next App 2026-05-21 12:17:29 +03:30