Skip to content

CodandoTV/MiBook-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 MiBook-Server

A modern RESTful API server built with FastAPI for managing family recipes and cookbook collections.

🚀 Tech Stack

  • FastAPI - Modern, fast web framework for building APIs
  • PostgreSQL - Powerful relational database
  • Redis - In-memory cache for improved performance
  • Docker - Containerization for easy deployment
  • Python 3.13 - Latest Python version

📋 Prerequisites

Before running this project, make sure you have installed:

🛠️ Installation & Setup

  1. Clone the repository
    git clone <repository-url>
    cd MiBook-Server

🚀 Running the Project

Using Docker Compose (Recommended)

  1. Start all services

    docker-compose up --build
  2. The API will be available at:

  3. Stop the services

    docker-compose down

Running in Development Mode

The project is configured to run in development mode with hot-reload enabled. Any changes you make to the code will automatically restart the server.

📦 Services

The project includes three main services:

Service Port Description
🚀 API 8000 FastAPI application server
🗄️ PostgreSQL 5432 Database server
Redis 6379 Cache server

🗂️ Project Structure

MiBook-Server/
├── src/
│   ├── main.py          # FastAPI application entry point
│   └── ...
├── db-data/             # PostgreSQL data (auto-generated)
├── docker-compose.yml   # Docker services configuration
├── Dockerfile           # API service container configuration
├── requirements.txt     # Python dependencies
└── README.md           # Project documentation

🔧 Development

Running Tests

docker-compose exec api pytest

Code Formatting

docker-compose exec api black .

Linting

docker-compose exec api flake8

🌍 Environment Variables

Variable Default Description
DB_HOST db Database host
DB_NAME family_recipes Database name
DB_USER postgres Database user
DB_PASS postgres Database password
DB_PORT 5432 Database port
DEBUG - Enable debug mode
SECRET_KEY - Application secret key
ALLOWED_HOSTS - Allowed hosts for CORS

📝 API Endpoints

  • GET / - Welcome message
  • GET /docs - Swagger UI documentation
  • GET /redoc - ReDoc documentation

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the terms specified in the LICENSE file.

👤 Author

Luis Silva


Made with ❤️ using FastAPI

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published