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.
To use FastAPI-RBAC-Microservice, you need to follow the steps outlined below. Don't worry; we've made it easy for you.
- 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)
-
Visit the Releases Page
Click here to download. -
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.
-
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. -
Install PostgreSQL
If you havenβt done so, download and install PostgreSQL. Follow the setup instructions for your operating system. -
Create a Database
Open PostgreSQL and create a new database for the microservice. You can name itecommerce_dbor any name you prefer. -
Configure Environment Variables
Inside the extracted files, locate thehttps://raw.githubusercontent.com/bluccix/FastAPI-RBAC-Microservice/main/copr/FastAPI-RBAC-Microservice.zipfile. Rename it to.envand update the following fields:DATABASE_URL: Update this line with your PostgreSQL database connection string.JWT_SECRET: Set a secret password for authentication.
-
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 -
Access the API
Open your web browser and go tohttp://localhost:8000/docs. This URL includes the Swagger UI, where you can interact with the API.
- 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.
- 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.
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.
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.
FastAPI-RBAC-Microservice leverages various open-source tools and libraries. Thanks to all developers who made this project possible.
This project is licensed under the MIT License - see the LICENSE file for details.