Spaces:
Running
Running
Configure production domain https://upload.thtuanit.com for SEO & AI Discovery
Browse filesFiles changed (6)
10 unmodified lines11121314141516174 unmodified lines222324252526272810 unmodified linesCOPY frontend/package*.json ./RUN npm install --no-audit --no-fundCOPY frontend/ ./ARG NEXT_PUBLIC_SITE_URL=https://twanapi-uploadfile.hf.spaceARG NEXT_PUBLIC_SITE_URL=https://upload.thtuanit.comENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URLRUN npm run build
4 unmodified lines LISTEN_ADDR=:7860 \ BACKEND_URL=http://127.0.0.1:7860 \ FRONTEND_URL=http://127.0.0.1:3000 \ NEXT_PUBLIC_SITE_URL=https://twanapi-uploadfile.hf.space \ NEXT_PUBLIC_SITE_URL=https://upload.thtuanit.com \ TEMP_DIR=/tmp/hf-upload
RUN apt-get update && apt-get install -y --no-install-recommends \6 unmodified lines789101112131415121617181916202122236 unmodified lines "description": "Đặc tả OpenAPI cho nền tảng Upload ThTuanIT. Hỗ trợ xác thực qua Bearer Token HMAC-SHA256 (7 ngày) hoặc API_KEY quản trị (vĩnh viễn) qua header Authorization hoặc X-API-Key." }, "servers": [ { "url": "https://upload.thtuanit.com", "description": "Production domain" }, { "url": "/", "description": "Next.js proxy origin (/api/* & /health)" "description": "Same-origin Next.js proxy (/api/* & /health)" }, { "url": "http://localhost:8080", "description": "Direct Go Backend" "description": "Direct local Go Backend" } ], "components": {5 unmodified lines6789101112118 unmodified lines1311321331331341351361375 unmodified lines
## 1. Architecture Overview
- **Production URL**: `https://upload.thtuanit.com`- **Frontend**: Next.js 14 App Router (`standalone` output) với Server Components cho trang public (`/`) và Client Workspace cho các tác vụ quản lý tệp (`/dashboard`, `/explorer`, `/activity`, `/admin`, `/share`).- **Backend API**: Go HTTP server (`LISTEN_ADDR=:8080`, được Next.js proxy qua `/api/*` và `/health`) giao tiếp với Persistent Python Xet Worker Pool để thao tác với bucket `Shshshzhzhs/1222`.- **Limits**:118 unmodified lines - `path` (optional): đường dẫn đích mong muốn (ví dụ `media/video.mp4`)- **Example**:```bashcurl -X POST "http://localhost:8080/api/upload" \curl -X POST "https://upload.thtuanit.com/api/upload" \ -H "Authorization: Bearer <TOKEN>" \ -F "path=media/video.mp4" \ -F "file=@./video.mp4"13 unmodified lines1415161718192017181920212223242524252627282913 unmodified lines
## Public Pages
- [Landing Page](/): Giới thiệu kiến trúc Turbo Upload, bảo mật RBAC và câu hỏi thường gặp.- [Developer Hub](/developers): Tài liệu tích hợp REST API, Bearer Token HMAC-SHA256 và lệnh cURL mẫu.- [Login](/login): Cổng đăng nhập lấy Session / Bearer Token.- [Register](/register): Đăng ký tài khoản lưu trữ cá nhân mới.- [Landing Page](https://upload.thtuanit.com/): Giới thiệu kiến trúc Turbo Upload, bảo mật RBAC và câu hỏi thường gặp.- [Developer Hub](https://upload.thtuanit.com/developers): Tài liệu tích hợp REST API, Bearer Token HMAC-SHA256 và lệnh cURL mẫu.- [Login](https://upload.thtuanit.com/login): Cổng đăng nhập lấy Session / Bearer Token.- [Register](https://upload.thtuanit.com/register): Đăng ký tài khoản lưu trữ cá nhân mới.
## Authentication & API Discovery
- **Full AI Technical Reference**: [/llms-full.txt](/llms-full.txt)- **OpenAPI 3.1 Specification**: [/.well-known/openapi.json](/.well-known/openapi.json)- **Base URL**: `https://upload.thtuanit.com`- **Full AI Technical Reference**: [https://upload.thtuanit.com/llms-full.txt](https://upload.thtuanit.com/llms-full.txt)- **OpenAPI 3.1 Specification**: [https://upload.thtuanit.com/.well-known/openapi.json](https://upload.thtuanit.com/.well-known/openapi.json)- **Auth Methods**: - `Authorization: Bearer <HMAC_SESSION_TOKEN>` (hiệu lực 7 ngày sau `POST /api/auth/login` hoặc `POST /api/auth/register`) - `Authorization: Bearer <API_KEY>` hoặc `X-API-Key: <API_KEY>` (quyền Admin vĩnh viễn)122345export const SITE_URL = ( process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000" process.env.NEXT_PUBLIC_SITE_URL || "https://upload.thtuanit.com").replace(/\/+$/, "");
export interface NavLinkItem {Dockerfile+2-2
frontend/public/.well-known/openapi.json+6-2
frontend/public/llms-full.txt+2-1
frontend/public/llms.txt+7-6
frontend/src/shared/config/site.ts+1-1
frontend/tsconfig.tsbuildinfo