Frontend UI for the PR Agent platform.
This repository contains the React + Vite web application used to manage campaigns, collaborations, task queues, and selected workflow actions such as collaboration approval, shipping confirmation, and script review.
This repo is the product frontend.
Its responsibilities are to:
- present task-oriented UI for operators
- display dashboard task counts
- show campaign and collaboration views
- call backend APIs for task actions and data loading
This repo does not:
- own the business database
- process inbound messages
- run the reply-generation workflow
- send WeChat messages directly
Typical UI-facing chain:
- user opens the frontend in the browser
- frontend calls
pragent-api-backendthrough/v1/... - backend returns dashboard, task, campaign, and collaboration data
- frontend renders the operator workflow
In short:
- upstream: browser / human operator
- main backend dependency:
pragent-api-backend
For most local development work, this repo is paired directly with pragent-api-backend.
- My Tasks summary
- task tabs for:
need_confirmneed_shipneed_script_review
- collaboration actions:
- approve collaboration
- confirm shipping with tracking number
- approve script
- campaign plan view
- pending task badge in the sidebar
This frontend currently uses APIs such as:
GET /v1/dashboard/my-tasksGET /v1/tasks?type=need_confirmGET /v1/tasks?type=need_shipGET /v1/tasks?type=need_script_reviewPOST /v1/tasks/{collaboration_id}/actions/approve-collaborationPOST /v1/tasks/{collaboration_id}/actions/confirm-shipPOST /v1/tasks/{collaboration_id}/actions/approve-scriptGET /v1/campaignsPOST /v1/campaignsPOST /v1/campaigns/{campaign_id}/publishGET /v1/collaborations
This means the main integration target for this repo is:
pragent-api-backend
- React 18
- Vite 7
- Ant Design 5
- React Router 6
- Install
pnpmglobally if needed:npm install -g pnpm
- Install project dependencies:
pnpm install
- Do not use
npm installin this project.
Using pnpm helps avoid platform-specific Rollup lock issues when switching between macOS and Windows.
VITE_API_BASE_URL=https://your-backend-service.example.comVITE_API_BASE_URL=http://localhost:8000Behavior:
- if
VITE_API_BASE_URLis unset, the frontend uses same-origin/v1/...requests - if
VITE_API_BASE_URLis set, the frontend sends API requests to that backend origin
You can start from .env.example and create .env.local.
Install dependencies:
pnpm installStart the dev server:
pnpm run devBuild for production:
pnpm run buildPreview the production build:
pnpm run previewRun tests:
pnpm run testRun pragent-api-backend locally on:
http://localhost:8000
Then set:
VITE_API_BASE_URL=http://localhost:8000Start the frontend and verify that:
- dashboard task counts load
- task tabs load data successfully
- campaign list loads successfully
- task actions return successful responses
This repo is primarily intended to be run together with:
pragent-api-backend
That is the clearest and most stable local integration path in the current workspace.
This frontend is not the direct UI for the lower-level message orchestration services such as:
conversation-engineai_mvp_agentic_workflowchannel-senderchannel-gateway
Those services belong to the automation side of the system and should be documented separately in the system overview.
- task-oriented UI exists
- campaign plan view exists
- task actions are wired to backend APIs
- backend base URL can be configured through env
- frontend can run independently from a separately deployed backend
- this repo depends on backend API availability for meaningful testing
- it does not by itself validate the lower-level message automation chain
- full system behavior still depends on backend data quality and server-side integrations
- Import the repository into Vercel.
- Set the build command to
pnpm run build. - Set the output directory to
dist. - Add the
VITE_API_BASE_URLenvironment variable for Production and Preview. - Deploy.
For handoff and integration understanding, read these next:
pragent-api-backend— the main backend used by this frontend- system-level overview doc — for repository map, current development status, and local integration guidance across the workspace