A full-stack web application for managing insurance policy data.
- Backend: Django 5.2.8 + Django REST Framework + SQLite
- Frontend: React 18 + Vite + Axios
policy_system/
├── backend/
│ ├── config/ # Django project settings
│ ├── policies/ # Policies app (models, views, serializers)
│ ├── db.sqlite3 # SQLite database
│ └── manage.py
├── frontend/
│ ├── src/
│ │ ├── components/ # PolicyForm, PolicyTable
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── index.css
│ ├── package.json
│ └── vite.config.js
└── MIS Format.xlsx # Reference Excel file
-
Navigate to backend directory:
cd backend -
Activate virtual environment:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process venv\Scripts\activate
-
Run migrations (already done):
python manage.py migrate
-
Start Django server:
python manage.py runserver
Backend will run on: http://localhost:8000
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start development server:
npm run dev
Frontend will run on: http://localhost:5173
- ✅ Add new insurance policies with 25 fields
- ✅ View all policies in a responsive table
- ✅ Export policies to Excel (.xlsx)
- ✅ Premium dark-themed UI with smooth animations
- ✅ Real-time data persistence with SQLite
- ✅ CORS-enabled API for frontend-backend communication
GET /api/policies/- List all policiesPOST /api/policies/- Create new policyGET /api/policies/{id}/- Get specific policyPUT /api/policies/{id}/- Update policyDELETE /api/policies/{id}/- Delete policyGET /api/policies/export_excel/- Export to Excel
- Start both backend and frontend servers
- Open http://localhost:5173 in your browser
- Fill in the policy form and click "Save Policy"
- View policies in the table below
- Click "Export to Excel" to download all policies
- The backend uses SQLite for simplicity (no additional database setup required)
- CORS is enabled for localhost:5173
- All 25 fields from the MIS Format.xlsx are supported