feat: production deployment - full update with providers, admin, glossaries, pricing, tests

Major changes across backend, frontend, infrastructure:
- Provider system with model selection (Google, DeepL, OpenAI, Ollama, Google Cloud)
- Admin panel: user management, pricing, settings
- Glossary system with CSV import/export
- Subscription and tier quota management
- Security hardening (rate limiting, API key auth, path traversal fixes)
- Docker compose for dev, prod, and IONOS deployment
- Alembic migrations for new tables
- Frontend: dashboard, pricing page, landing page, i18n (en/fr)
- Test suite and verification scripts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Sepehr Ramezani
2026-04-25 15:01:47 +02:00
parent 2ba4fedfc8
commit 26bd096a06
1178 changed files with 136435 additions and 3047 deletions

View File

@@ -0,0 +1,14 @@
import type { Metadata } from "next"
export const metadata: Metadata = {
title: "Admin - Office Translator",
description: "System administration and user management dashboard.",
}
export default function AdminLayout({
children,
}: {
children: React.ReactNode
}) {
return <>{children}</>
}

View File

@@ -0,0 +1,36 @@
"use client"
import { AdminSidebar } from "@/components/admin-sidebar"
import { AdminHeader } from "@/components/admin-header"
import { SystemHealthCards } from "@/components/admin-system-health"
import { ProviderStatus } from "@/components/admin-provider-status"
import { UserManagementTable } from "@/components/admin-user-table"
export default function AdminPage() {
return (
<div className="flex h-screen bg-background">
<AdminSidebar />
<div className="flex flex-1 flex-col overflow-hidden">
<AdminHeader />
<main className="flex-1 overflow-y-auto">
<div className="mx-auto max-w-6xl px-4 py-4 lg:px-6 lg:py-5">
{/* System Health Row */}
<SystemHealthCards />
{/* Provider Status Row */}
<div className="mt-3">
<ProviderStatus />
</div>
{/* User Management Table */}
<div className="mt-4">
<UserManagementTable />
</div>
</div>
</main>
</div>
</div>
)
}

View File

@@ -0,0 +1,15 @@
import type { Metadata } from "next"
export const metadata: Metadata = {
title: "Dashboard - Office Translator",
description:
"Manage your API keys, glossaries, and translation settings.",
}
export default function DashboardLayout({
children,
}: {
children: React.ReactNode
}) {
return <>{children}</>
}

View File

@@ -0,0 +1,43 @@
"use client"
import { DashboardSidebar } from "@/components/dashboard-sidebar"
import { DashboardHeader } from "@/components/dashboard-header"
import { ApiAutomationCard } from "@/components/api-automation-card"
import { GlossaryContextCard } from "@/components/glossary-context-card"
export default function DashboardPage() {
return (
<div className="flex h-screen bg-background">
{/* Sidebar */}
<DashboardSidebar />
{/* Main area */}
<div className="flex flex-1 flex-col overflow-hidden">
{/* Top Header */}
<DashboardHeader />
{/* Content */}
<main className="flex-1 overflow-y-auto">
<div className="mx-auto max-w-5xl px-4 py-6 lg:px-8 lg:py-8">
{/* Page heading */}
<div className="mb-6">
<h2 className="text-xl font-semibold tracking-tight text-foreground">
Overview
</h2>
<p className="mt-1 text-sm text-muted-foreground">
Monitor your usage, manage API keys, and configure translation
preferences.
</p>
</div>
{/* Feature cards */}
<div className="flex flex-col gap-6">
<ApiAutomationCard />
<GlossaryContextCard />
</div>
</div>
</main>
</div>
</div>
)
}

View File

@@ -0,0 +1,94 @@
@import 'tailwindcss';
@import 'tw-animate-css';
@custom-variant dark (&:is(.dark *));
:root {
--background: oklch(0.985 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.145 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.965 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.96 0 0);
--muted-foreground: oklch(0.5 0 0);
--accent: oklch(0.555 0.17 250);
--accent-foreground: oklch(1 0 0);
--destructive: oklch(0.577 0.245 27.325);
--destructive-foreground: oklch(0.577 0.245 27.325);
--border: oklch(0.91 0 0);
--input: oklch(0.91 0 0);
--ring: oklch(0.555 0.17 250);
--chart-1: oklch(0.555 0.17 250);
--chart-2: oklch(0.6 0.118 184.704);
--chart-3: oklch(0.398 0.07 227.392);
--chart-4: oklch(0.828 0.189 84.429);
--chart-5: oklch(0.769 0.188 70.08);
--radius: 0.625rem;
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
--success: oklch(0.59 0.16 145);
--success-foreground: oklch(1 0 0);
}
@theme inline {
--font-sans: 'Geist', 'Geist Fallback';
--font-mono: 'Geist Mono', 'Geist Mono Fallback';
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-chart-1: var(--chart-1);
--color-chart-2: var(--chart-2);
--color-chart-3: var(--chart-3);
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--color-success: var(--success);
--color-success-foreground: var(--success-foreground);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}

View File

@@ -0,0 +1,45 @@
import type { Metadata } from 'next'
import { Geist, Geist_Mono } from 'next/font/google'
import { Analytics } from '@vercel/analytics/next'
import './globals.css'
const _geist = Geist({ subsets: ["latin"] });
const _geistMono = Geist_Mono({ subsets: ["latin"] });
export const metadata: Metadata = {
title: 'Office Translator - Translate Documents, Keep the Format',
description: 'Translate Excel, Word, and PowerPoint documents with zero formatting loss. Fast, private, and accurate document translation.',
generator: 'v0.app',
icons: {
icon: [
{
url: '/icon-light-32x32.png',
media: '(prefers-color-scheme: light)',
},
{
url: '/icon-dark-32x32.png',
media: '(prefers-color-scheme: dark)',
},
{
url: '/icon.svg',
type: 'image/svg+xml',
},
],
apple: '/apple-icon.png',
},
}
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<html lang="en">
<body className="font-sans antialiased">
{children}
<Analytics />
</body>
</html>
)
}

View File

@@ -0,0 +1,20 @@
import { SiteHeader } from "@/components/site-header"
import { HeroSection } from "@/components/hero-section"
import { TranslationCard } from "@/components/translation-card"
export default function Home() {
return (
<div className="flex min-h-screen flex-col">
<SiteHeader />
<main className="flex flex-1 flex-col">
<HeroSection />
<TranslationCard />
</main>
<footer className="border-t border-border py-6 text-center text-xs text-muted-foreground">
<div className="mx-auto max-w-5xl px-6">
Office Translator &middot; Enterprise-grade document translation &middot; SOC 2 Compliant
</div>
</footer>
</div>
)
}