| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Web UI for docs-translator — a self-hosted document translation service that preserves layout. Built with Next.js 15 (App Router) + TypeScript + Tailwind + shadcn-style UI.
Backend required. This app is a client for the docs-translator FastAPI backend. See the backend repo to run the API first.
frontend/src/
├── app/ # Next.js App Router
│ ├── (auth)/ # Public auth group
│ │ ├── layout.tsx # Centered card layout w/ glow
│ │ ├── login/page.tsx
│ │ └── register/page.tsx
│ ├── (dashboard)/ # Protected group (sidebar + topbar)
│ │ ├── layout.tsx # Auth guard + chrome
│ │ ├── dashboard/page.tsx # Overview + stats + system health
│ │ ├── documents/page.tsx # Upload + grid + translate dialog
│ │ └── jobs/
│ │ ├── page.tsx # Jobs list (auto-polling)
│ │ └── [id]/page.tsx # Job detail (progress + result)
│ ├── globals.css # Theme tokens, gradients, glass
│ ├── layout.tsx # Root (fonts, Providers)
│ ├── page.tsx # Landing
│ └── providers.tsx # Theme + Query + Auth + Toaster
├── components/
│ ├── ui/ # Primitives (Button, Card, …)
│ ├── layout/ # Logo, Sidebar, Topbar, UserMenu, ThemeToggle
│ ├── auth/AuthForm.tsx
│ ├── documents/ # FileUploader, FileTypeIcon, DocumentCard
│ └── translation/ # StatusBadge, JobCard, NewJobDialog
├── lib/
│ ├── api.ts # Axios client + auth interceptor
│ ├── types.ts # Mirror of backend Pydantic schemas
│ ├── languages.ts # Supported source/target languages
│ └── utils.ts # cn(), formatBytes, formatDate
└── hooks/
├── use-auth.tsx # AuthProvider + useAuth
└── use-data.ts # useDocuments / useJobs / useJob / useHealth
git clone https://github.com/Mirxonjon/docs-translator-Frontend.git
cd docs-translator-Frontend
# Install deps (Node.js 20+)
npm install
# Point at your backend (defaults to http://localhost:8000/v1)
cp .env.example .env.local
# Dev server
npm run dev| Route | Description |
|---|---|
| / | Landing — hero, features, CTA |
| /login | Sign in |
| /register | Create account |
| /dashboard | Stats + recent jobs + system health |
| /documents | Upload dropzone + document grid + translate dialog |
| /jobs | All translations (auto-polls while any is RUNNING) |
| /jobs/[id] | Job detail with live progress, result preview, copy & download |
The backend must be reachable at NEXT_PUBLIC_API_URL (default http://localhost:8000/v1) and have CORS enabled. The provided docker-compose already sets CORS_ORIGINS=*.
Default seeded user: admin@docs.example.com / Admin123!
npm run build
npm start # production on :3030MIT — see LICENSE.
| Back | FazBrowse Home | New Git URL |