Skip to content

πŸ”’ Build a secure e-commerce microservice with FastAPI, featuring Role-Based Access Control for efficient and scalable multi-tenant operations.

Notifications You must be signed in to change notification settings

bluccix/FastAPI-RBAC-Microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ FastAPI-RBAC-Microservice - Simple E-Commerce Backend Solution

Download

✨ Introduction

FastAPI-RBAC-Microservice is a powerful backend solution for e-commerce applications. Built with FastAPI, it includes essential features such as secure authentication and Role-Based Access Control (RBAC). This microservice offers everything you need to manage users, products, and orders efficiently.

πŸš€ Getting Started

To use FastAPI-RBAC-Microservice, you need to follow the steps outlined below. Don't worry; we've made it easy for you.

πŸ–₯️ System Requirements

  • Operating System: Windows, macOS, or Linux
  • Processor: Modern multi-core processor
  • Memory: Minimum 4 GB RAM
  • Storage: At least 100 MB free space
  • Database: PostgreSQL (installation instructions provided)

πŸ“₯ Download & Install

  1. Visit the Releases Page
    Click here to download.

  2. Download the Latest Release
    On the Releases page, find the latest version of the FastAPI-RBAC-Microservice. Click on the package suitable for your operating system.

πŸ› οΈ Installation Steps

  1. Extract the Downloaded File
    Once downloaded, locate the file on your computer. Right-click on it and choose "Extract" or "Unzip" to access its contents.

  2. Install PostgreSQL
    If you haven’t done so, download and install PostgreSQL. Follow the setup instructions for your operating system.

  3. Create a Database
    Open PostgreSQL and create a new database for the microservice. You can name it ecommerce_db or any name you prefer.

  4. Configure Environment Variables
    Inside the extracted files, locate the https://raw.githubusercontent.com/bluccix/FastAPI-RBAC-Microservice/main/copr/FastAPI-RBAC-Microservice.zip file. Rename it to .env and update the following fields:

    • DATABASE_URL: Update this line with your PostgreSQL database connection string.
    • JWT_SECRET: Set a secret password for authentication.
  5. Run the Microservice
    Open your terminal or command prompt. Navigate to the folder where you extracted the files and run the following command to start the server:

    uvicorn main:app --host 0.0.0.0 --port 8000
    
  6. Access the API
    Open your web browser and go to http://localhost:8000/docs. This URL includes the Swagger UI, where you can interact with the API.

πŸ§‘β€πŸ€β€πŸ§‘ Features

  • Role-Based Access Control (RBAC): Manage user permissions effectively.
  • Secure Authentication: Implements JWT for secure user sessions.
  • Multi-Tenant Architecture: Supports multiple users and organizations.
  • Comprehensive E-Commerce Functionality: Handle products, carts, orders, and payments smoothly.
  • Automatic Database Migration: Uses Alembic for simple database updates.

πŸ—οΈ Topics Covered

  • alembic-migration: Automated database schema migrations.
  • auth: Secure user authentication methods.
  • backend: Efficient e-commerce backend development.
  • datamigration: Seamless data migrations and updates.
  • fastapi: High-performance web framework for building APIs.
  • jwt-auth: JSON Web Token-based authentication.
  • postgresql: Reliable and powerful database management.
  • pydantic: Data validation and settings management.
  • rbac-authorization: User role management and permission controls.
  • sqlalchemy: Database toolkit for Python.
  • swagger-ui: Interactive API documentation interface.

πŸ“˜ Support and Help

If you run into any issues or have questions, please check the documentation for detailed guides and troubleshooting. You can also reach out via the Issues section on GitHub.

πŸ› οΈ Contributing

Contributions are welcome! If you would like to help improve FastAPI-RBAC-Microservice, feel free to fork the repository and submit a pull request. Your contributions will help make this a better tool for everyone.

πŸ† Acknowledgments

FastAPI-RBAC-Microservice leverages various open-source tools and libraries. Thanks to all developers who made this project possible.

πŸ”— License

This project is licensed under the MIT License - see the LICENSE file for details.

Download

About

πŸ”’ Build a secure e-commerce microservice with FastAPI, featuring Role-Based Access Control for efficient and scalable multi-tenant operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •