A modern React-based frontend for analyzing government policy documents. Built with Vite, Tailwind CSS, Ant Design, Zustand, and other powerful tools to provide an intuitive interface for document upload, summarization, evaluation, and reporting.
- 📄 Upload and analyze policy documents
- ✅ Document validation and evaluation flow
- 💬 Summarization and prompt-based Q&A
- 📊 Score analysis with visual charts (Recharts)
- 📥 Downloadable report (PDF)
- 💡 Responsive, interactive UI with Ant Design + Tailwind CSS
- 🔧 Zustand for global state management
- ⚙️ Local mock API server using Express (in
/mock-server
)
Category | Tools / Libraries |
---|---|
Frontend | React 19, React Router, Vite |
Styling | Tailwind CSS, Ant Design |
State Management | Zustand |
Charts | Recharts |
PDF Export | jsPDF, html2canvas |
Form Handling | react-hook-form |
Icons | lucide-react, @ant-design/icons |
Mock Server | Express.js in /mock-server/document-mock-server.js |
Dev Tools | TypeScript, ESLint, Vite |
policy-analyser-ui/
│
├── src/ # React application source code
│ ├── components/ # Reusable UI components
│ ├── pages/ # Route-based pages
│ ├── stores/ # Zustand state management
│ ├── services/ # API service modules
│ ├── constants/ # Step keys and status enums
│ └── ... # Other support files
│
├── mock-server/
│ └── document-mock-server.js # Express-based mock server
│
├── public/ # Static assets
├── tailwind.config.js # Tailwind CSS configuration
├── tsconfig.json # TypeScript config
└── vite.config.ts # Vite configuration
git clone https://github.com/civis-vote/draft-analyzer-fe
cd draft-analyzer-fe
npm install
or
yarn install
npm run dev
Vite will start at http://localhost:5173
cd mock-server
npm install
node document-mock-server.js
.env
file in the root with:
VITE_BASE_URL="http://localhost:9000" #local mock express server
# Server runs at http://localhost:9000
Make sure your `.env` or API base URL points to `http://localhost:9000` when testing with the mock server.
---
## 🧹 Available Scripts
npm run dev # Start Vite dev server npm run build # Build for production npm run preview # Preview production build npm run lint # Run ESLint
---
#VITE_BASE_URL="http://localhost:8000/api" #Local python backend sevice