Document Validation Playground
A modern React application built with Vite and TypeScript for performing quick business verifications using the Parcha API. The app features a clean UI built with Mantine components and includes PDF viewing capabilities.
🚀 Prerequisites
- Node.js (v18 or higher)
- npm or yarn package manager
- Parcha API credentials (API key and agent key)
📦 Installation
- Clone the repository:
git clone https://github.com/Parcha-ai/parcha-api.git
cd parcha-api/typescript/examples/flash_check
- Install dependencies:
npm install
# or if you use yarn
yarn install
- Configure environment variables:
Create a .env
file in the project root with the following variables:
# Required: Your Parcha API key from the dashboard
VITE_API_KEY=your_api_key_here
# Required: Your agent key for document validation
# Please ask the Parcha team for your unique agent key.
VITE_AGENT_KEY=parcha-poa-v1
# Optional: API URL - defaults to https://demo.parcha.ai/api/v1
VITE_API_URL=http://localhost:8001/api/v1
💡 Note: You can get your API credentials from the Parcha Dashboard. If you don't have access yet, contact our team.
🛠️ Development
To run the development server:
npm run dev
# or with yarn
yarn dev
This will start the development server at http://localhost:5173
. The app features hot module replacement (HMR) for a smooth development experience.
🏗️ Building for Production
To create a production build:
npm run build
# or with yarn
yarn build
To preview the production build locally:
npm run preview
# or with yarn
yarn preview
🧰 Tech Stack
- React 18
- TypeScript
- Vite
- Mantine UI Components
- PDF.js for PDF handling
- Axios for API requests
📝 Available Scripts
npm run dev
- Start development server
npm run build
- Create production build
npm run lint
- Run ESLint
npm run preview
- Preview production build
📚 Features
- Modern React with TypeScript
- Fast development with Vite
- Beautiful UI with Mantine components
- PDF file handling and preview
- File drag and drop support
- Real-time notifications
- Type-safe development experience
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add some amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.