An open API service indexing awesome lists of open source software.

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

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).