Skip to content

Mouryakoti/python-library-app-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 

Repository files navigation

πŸ“š Python Library App (Dockerized)

This project is a Python-based Library Management Application containerized with Docker Compose.
It demonstrates a microservices architecture with separate services for authentication, book management, borrowing system, and a frontend, all connected through custom Docker networks.


πŸš€ Features

  • Database (MySQL) for storing user, book, and borrowing data.
  • Authentication Service for managing user logins and sessions.
  • Book Service for managing available books.
  • Borrow Service for handling borrow/return transactions.
  • Frontend App Service to interact with the system.
  • Uses Docker volumes for persistent database storage.
  • Custom Docker bridge networks for secure service communication.

πŸ—οΈ Architecture

The system consists of the following services:

  1. Database (db)

    • Runs MySQL
    • Persists data with a named Docker volume
    • Exposes port 3306
  2. Auth Service (auth_service)

    • Handles user authentication
    • Connects to both db and app networks
    • Runs on port 5001
  3. Book Service (book_service)

    • Manages book records
    • Connects with the database
    • Runs on port 5002
  4. Borrow Service (borrow_service)

    • Manages borrowing and returning of books
    • Connects with the database
    • Runs on port 5003
  5. Frontend App (frontend)

    • Main entry point for users
    • Connects with auth_service, book_service, and borrow_service
    • Runs on port 5000

πŸ—‚οΈ Project Structure

β”œβ”€β”€ docker-compose.yml β”œβ”€β”€ database/ # MySQL Dockerfile & init scripts β”œβ”€β”€ auth/ # Auth service code & Dockerfile β”œβ”€β”€ book/ # Book service code & Dockerfile β”œβ”€β”€ borrow/ # Borrow service code & Dockerfile └── frontend/ # Frontend app code & Dockerfile

πŸ”Œ Networks

dbnet β†’ Used for communication with the database.

middlenet β†’ Internal communication between backend services.

appnet β†’ Connects the frontend with backend services.

πŸ’Ύ Volumes

db_volume β†’ Persists MySQL data so it is not lost when containers are restarted or removed.

About

microservices project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published