https://github.com/maureen-keter/testing-policy-backend
Backend insurance testing policy with crud operations
https://github.com/maureen-keter/testing-policy-backend
flask-api flask-restful flask-sqlalchemy python sqlite
Last synced: 11 months ago
JSON representation
Backend insurance testing policy with crud operations
- Host: GitHub
- URL: https://github.com/maureen-keter/testing-policy-backend
- Owner: Maureen-keter
- License: mit
- Created: 2025-03-21T07:50:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-21T11:42:21.000Z (over 1 year ago)
- Last Synced: 2025-07-19T14:06:39.136Z (11 months ago)
- Topics: flask-api, flask-restful, flask-sqlalchemy, python, sqlite
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Insurance Policy Management System - Backend
This is the backend for the **Insurance Policy Management System**, designed to handle API requests, database operations, and business logic for managing insurance policies. The backend is built with **Python** and **Flask**, with data persistence handled via **SQLite** (or your chosen database).
## Features
- Create, read, update, and delete (CRUD) operations for insurance policies.
- Basic search and filter functionality.
- RESTful API design for seamless integration with the frontend.
## Tech Stack
- **Flask**: python runtime for the server-side.
- **SQLite**: Database for data persistence.
-
---
## Table of Contents
1. Installation
2. Environment Variables
3. API Endpoints
4. Folder Structure
5. Usage
6. Contributing
7. License
---
## Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/insurance-management-backend.git
cd insurance-management-backend
```
2. Install dependencies:
```bash
npm install
```
3. Set up the database:
- Install SQLite
4. Start the server:
```bash
flask run
```
## API Endpoints
| HTTP Method | Endpoint | Description
|-------------|-------------------|-----------------------------------
| GET | `/api/policies` | Fetch all insurance policies
| GET | `/api/policies/:id` | Fetch a single policy by ID
| POST | `/api/policies` | Create a new insurance policy
| PATCH | `/api/policies/:id` | Update an existing policy
| DELETE | `/api/policies/:id` | Delete an insurance policy
---
## Folder Structure
```
insurance-management-backend/
├── src/
│ ├── models/ # Database schemas (e.g., Policy model)
│ ├── routes/ # API route definitions
│ ├── server.js # Main server file
├── package.json # Project dependencies and scripts
├── README.md # Project documentation
└── .gitignore # Ignored files for version control
```
---
## Usage
1. Start the backend server:
```bash
npm start
```
2. Access the API via `http://localhost:5000/api`.
3. Test endpoints using tools like **Postman** or **cURL**.
---
## Contributing
We welcome contributions to improve this project! Please follow these steps:
1. Fork the repository.
2. Create a new feature branch:
```bash
git checkout -b feature-name
```
3. Commit your changes:
```bash
git commit -m "Add feature-name"
```
4. Push to your branch:
```bash
git push origin feature-name
```
5. Open a pull request.
---
## License
This project is licensed under the [MIT License](LICENSE).