Project 2


Github Repositiry Link - https://github.com/MykhailoKononov/recipe-share-fastapi


RecipeShare API Platform

RecipeShare is a production‑ready, microservices‑style recipe‑sharing backend built with FastAPI and PostgreSQL. Designed for high throughput and reliability, it features robust API design, comprehensive test coverage, CI/CD automation, and full observability with Prometheus & Grafana.


Table of Contents

  1. Features
  2. Architecture & Tech Stack
  3. API Endpoints & Testing
  4. Monitoring & Observability
  5. Deployment & CI/CD
  6. Setup & Run
  7. Screenshots & Code Snippets
  8. Future Improvements

Features

  • RESTful API
    • CRUD for recipes, comments, ratings, and user profiles
    • JWT‑based authentication and role‑based access control
  • Microservices Architecture
    • Separate services for API, Auth, and Image handling
    • Cloudinary integration for image uploads
  • Test Coverage
    • Pytest suite with fixtures, parametrized tests, and mocks
    • 90% endpoint coverage

  • Observability
    • Prometheus metrics exported by each service
    • Grafana dashboards with key performance indicators
  • Scalable & Containerized
    • Docker Compose orchestration (Kubernetes‑ready)
    • Stateless API pods, shared PostgreSQL database

Architecture & Tech Stack

  • FastAPI: high‑performance ASGI framework for all services
  • Pytest: testing framework with coverage reporting
  • PostgreSQL: relational data store, SQLAlchemy ORM
  • Docker & Docker Compose: containerization and orchestration
  • GitLab CI: pipelines for linting, type checks, tests, builds, and deploys
  • Prometheus & Grafana: metrics collection and visualization

API Endpoints & Testing

Routes

Pytest: