AI-Automated Auto Insurance Claims Platform.
- Backend: FastAPI, PostgreSQL, Redis, Celery (Todo), LangChain (Todo)
- Frontend: Next.js 14, Shadcn UI, Tailwind CSS
- AI: Claude 4.5 Sonnet (Planned), Computer Vision (Planned)
- Docker & Docker Compose
- Python 3.11+
- Node.js 20+
- Python 3.11+
- Node.js 20+
- Docker & Docker Compose
- PostgreSQL Client (e.g., TablePlus)
-
Clone the Repository:
git clone <repository_url> cd <project_directory>
-
Start Infrastructure (PostgreSQL, Redis):
docker compose up -d
-
Python Environment: Navigate to the backend directory, create a virtual environment, and install dependencies.
cd backend python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Environment Variables: Copy the example environment file and customize it.
cp ../.env.example ../.env
Ensure
DATABASE_URLis set correctly to your local PostgreSQL instance provided by Docker (e.g.,postgresql+asyncpg://postgres:postgres@localhost:5432/insurance). -
Database Migrations: Run Alembic to apply the latest database schema migrations.
alembic -c backend/alembic.ini upgrade head
-
Seed Test Data (Optional but Recommended): Populate the database with sample claims to test the application.
python backend/seed_data.py
-
Start the Development Server:
uvicorn app.main:app --reload
The backend should now be running at
http://localhost:8000. You can test this by visiting the health check endpoint:http://localhost:8000/health.
-
Node.js Environment: Open a new terminal window and navigate to the frontend directory.
cd frontend -
Install Dependencies:
npm install
-
Environment Variables: Copy the example environment file.
cp .env.example .env.local
Ensure
NEXT_PUBLIC_API_URLis pointing to your local backend server (e.g.,http://localhost:8000/api/v1). -
Start the Development Server:
npm run dev
The frontend application should now be accessible at
http://localhost:3000.
Before submitting any code, please ensure you run the project's formatters and linters.
Backend:
cd backend
ruff check .
pylint $(git ls-files '*.py')
pytest tests/Frontend:
cd frontend
npm run lint
npm test- Connect to Vercel: Push to GitHub, import in Vercel
- Add Vercel Postgres: Dashboard → Storage → Create PostgreSQL
- Set Environment Variables:
FIRST_ADMIN_EMAIL=admin@widle.com FIRST_ADMIN_PASSWORD=your_secure_password ANTHROPIC_API_KEY=sk-ant-... SECRET_KEY=<generate with: openssl rand -hex 32> BACKEND_CORS_ORIGINS=https://your-app.vercel.app NEXT_PUBLIC_API_URL=https://your-app.vercel.app - Deploy: Migrations run automatically via postbuild script
After first deployment:
- ✅ Database tables created automatically
- ✅ Admin user created with credentials from env vars
- ✅ Health check shows database status
vercel env pull .env
cd backend
alembic upgrade head
python scripts/create_admin.py- "Port already in use": Ensure no other instances of the backend/frontend are running using
lsof -i :8000orlsof -i :3000. Kill existing processes if necessary. - "Connection Refused" (Database): Check if Docker containers are running (
docker ps). VerifyDATABASE_URLin your.env.
- FastAPI Project Scaffolding
- PostgreSQL Schema & Migrations
- Next.js 14 + Shadcn UI Setup
- Backend <-> Frontend Connection