Spaces:
Running
Running
Configure production domain https://upload.thtuanit.com for SEO & AI Discovery
Browse filesFiles changed (6)
10 unmodified lines111213141516174 unmodified lines2223242526272810 unmodified linesCOPY frontend/package*.json ./RUN npm install --no-audit --no-fundCOPY frontend/ ./ARG NEXT_PUBLIC_SITE_URL=https://twanapi-uploadfile.hf.spaceENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URLRUN npm run build4 unmodified linesLISTEN_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 \TEMP_DIR=/tmp/hf-uploadRUN apt-get update && apt-get install -y --no-install-recommends \10 unmodified lines111213141516174 unmodified lines2223242526272810 unmodified linesCOPY frontend/package*.json ./RUN npm install --no-audit --no-fundCOPY frontend/ ./ARG NEXT_PUBLIC_SITE_URL=https://upload.thtuanit.comENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URLRUN npm run build4 unmodified linesLISTEN_ADDR=:7860 \BACKEND_URL=http://127.0.0.1:7860 \FRONTEND_URL=http://127.0.0.1:3000 \NEXT_PUBLIC_SITE_URL=https://upload.thtuanit.com \TEMP_DIR=/tmp/hf-uploadRUN apt-get update && apt-get install -y --no-install-recommends \
6 unmodified lines789101112131415161718196 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": "/","description": "Next.js proxy origin (/api/* & /health)"},{"url": "http://localhost:8080","description": "Direct Go Backend"}],"components": {6 unmodified lines78910111213141516171819202122236 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": "Same-origin Next.js proxy (/api/* & /health)"},{"url": "http://localhost:8080","description": "Direct local Go Backend"}],"components": {
5 unmodified lines67891011118 unmodified lines1301311321331341351365 unmodified lines## 1. Architecture Overview- **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" \-H "Authorization: Bearer <TOKEN>" \-F "path=media/video.mp4" \-F "file=@./video.mp4"5 unmodified lines6789101112118 unmodified lines1311321331341351361375 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 "https://upload.thtuanit.com/api/upload" \-H "Authorization: Bearer <TOKEN>" \-F "path=media/video.mp4" \-F "file=@./video.mp4"
13 unmodified lines14151617181920212223242526272813 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.## 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)- **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)13 unmodified lines1415161718192021222324252627282913 unmodified lines## Public Pages- [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- **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)
12345export const SITE_URL = (process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000").replace(/\/+$/, "");export interface NavLinkItem {12345export const SITE_URL = (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