Skip to content

A backend service for generating and managing invoices for businesses. Built with FastAPI, Redis, Celery, Jinja2. the API provides endpoints for creating, sending, and tracking invoices, with support for future extensions like email notifications and background processing.

Notifications You must be signed in to change notification settings

dahnny/invoice_api

Repository files navigation

INVOICE API

This is a simple invoice API built with FastAPI, PostgreSQL, and Docker. It allows you to create, retrieve, update, and delete invoices. The API also supports user authentication and authorization.

Features

  • Create, retrieve, update, and delete invoices
  • User authentication and authorization
  • PDF generation for invoices
  • Email notifications for invoice events
  • Docker support for easy deployment
  • Celery for background tasks

Requirements

  • Python 3.8 or higher
  • PostgreSQL
  • Docker (for deployment)
  • Docker Compose (for local development)

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/invoice-api.git
    cd invoice-api
  2. Create a .env file in the root directory and set the required environment variables. You can use the .env.example file as a reference.
  3. Install the required Python packages:
    pip install -r requirements.txt
  4. Run the database migrations:
    alembic upgrade head
  5. Start the application:
    uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
  6. (Optional) If you want to run the application using Docker, use the following command:
    docker-compose up --build

Usage

You can access the API at http://localhost:8000. The API documentation is available at http://localhost:8000/docs.

Running Tests

To run the tests, use the following command:

pytest

About

A backend service for generating and managing invoices for businesses. Built with FastAPI, Redis, Celery, Jinja2. the API provides endpoints for creating, sending, and tracking invoices, with support for future extensions like email notifications and background processing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published