2025-06-05 07:45:16 +00:00

88 lines
1.6 KiB
Markdown

# General Communication Service
A FastAPI-based general purpose communication service with SQLite integration.
## Features
- FastAPI-based REST API
- SQLite database integration
- Alembic migrations
- CORS enabled with all origins allowed
- Health check endpoint
- API documentation at default paths
## Project Structure
```
/
├── app/
│ ├── api/
│ │ ├── routes/
│ │ │ ├── health.py
│ │ │ └── api.py
│ ├── core/
│ ├── db/
│ │ └── session.py
│ ├── models/
│ │ └── base.py
│ └── schemas/
├── migrations/
│ ├── versions/
│ ├── env.py
│ └── script.py.mako
├── storage/
│ └── db/
├── alembic.ini
├── main.py
├── requirements.txt
└── README.md
```
## Installation
1. Clone the repository
2. Install dependencies:
```bash
pip install -r requirements.txt
```
## Running the Application
```bash
uvicorn main:app --reload
```
The application will be available at http://localhost:8000
## API Documentation
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- OpenAPI JSON: http://localhost:8000/openapi.json
## Database Migrations
Generate a new migration:
```bash
alembic revision --autogenerate -m "description"
```
Apply migrations:
```bash
alembic upgrade head
```
## Environment Variables
None required for basic setup, as SQLite database path is configured internally.
## Database Configuration
SQLite database is configured to be stored at:
```
/app/storage/db/db.sqlite
```