Frontend application for the translation service.
- Install dependencies:
npm install- Create
.env.localfile:
NEXT_PUBLIC_API_URL=http://localhost:3001/api- Start development server:
npm run devThe application will run on http://localhost:3000.
NEXT_PUBLIC_API_URL- Backend API URL (default:http://localhost:3001/api)
translated-ksa-frontend/
├── app/
│ ├── page.tsx # Home page
│ ├── review-order/ # Order review
│ ├── submission-success/ # Success page
│ └── viewer/ # File viewer
├── components/
│ ├── document-upload-form-new.tsx
│ ├── header.tsx
│ ├── footer.tsx
│ └── ui/ # UI components
├── lib/
│ ├── api-client.ts # API client
│ └── utils.ts
└── public/ # Static assets
All API calls are made through the apiClient in lib/api-client.ts.
Example:
import { api } from '@/lib/api-client'
// Get pricing
const pricing = await api.getPricing()
// Submit request
const result = await api.submitRequest(formData)