wallacemartinss / core_tenant
The skeleton application for the Laravel framework.
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 44
Watchers: 2
Forks: 18
Open Issues: 0
Type:project
Requires
- php: ^8.2
- croustibat/filament-jobs-monitor: ^2.5
- filament/filament: ^3.2
- ibrahimbougaoua/filament-rating-star: ^1.0
- joaopaulolndev/filament-edit-profile: *
- laravel/cashier: ^15.6
- laravel/fortify: ^1.25
- laravel/framework: ^11.31
- laravel/tinker: ^2.9
- leandrocfe/filament-ptbr-form-fields: ^3.0
- novadaemon/filament-pretty-json: ^2.3
- owenvoke/blade-fontawesome: ^2.8
- stripe/stripe-php: ^16.4
Requires (Dev)
- captainhook/captainhook: ^5.24
- fakerphp/faker: ^1.23
- laravel/pail: ^1.1
- laravel/pint: ^1.20
- laravel/sail: ^1.26
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.1
- phpunit/phpunit: ^11.0.1
This package is auto-updated.
Last update: 2025-05-09 13:24:11 UTC
README
FilamentPHP Tenant Based in Organization/Company (Single Database)
About this Project
An example project demonstrating a MultiTenant Single Database system fully built in Laravel and Filament, integrated with Stripe for Subscription management. The system includes the following features:
- Creation of Plans, Prices, and Features stored in the database and integrated via the Stripe API.
- Admin Panel for Managing Tenants and Subscriptions.
- API-based Client Creation when registering the Tenant
- Modal for Tenant to choose Plans and Complete the Subscription (Stripe Management)
- Feature for Tenant to create tickets for the Tenant's manager.
- Profile editing with theme color customization.
- Integration of Icons with FontAwesome.
- Tested and working with MySQL and Postgresql
Videos:
- See Video - Administrative panel presentation
- See Video - Creation of Products, prices and Features
- See Video - Registering a new tenant
The plugins used in this project may include:
Prerequisites
-
Create a Stripe account and enable trial mode - Stripe
-
Docker and docker-compose (The Dockerfile for this project already includes all the necessary resources to run the project.)
Dockerfile includes the following functionalities:
- The Docker File include all resources for execute this project.
Installation
- Clone the repository
git clone https://github.com/wallacemartinss/core_tenant.git
cd core_tenant
laravel new core_tenant --using=wallacemartinss/core_tenant
cd core_tenant
- Copy .ENV file
cp .env.example .env
- Configure your database in
.env
:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db_coretenant_system
DB_USERNAME=your_username
DB_PASSWORD=your_password
- Configure Stripe keys in
.env
STRIPE_KEY=your_stripe_key
STRIPE_SECRET=your_stripe_secret
- Run Docker
docker compose up -d
- Access docker App container
docker compose exec app bash
- Inside the container, Install PHP dependencies
composer install
- Inside the container, configure environment variables
php artisan key:generate
- Inside the container, Run migrations and seeders
php artisan migrate --seed
- Inside the container, Link storage for file uploads
php artisan storage:link
- Inside the container run the command below (To Listen Webhook stripe events) Ip 172.17.0.1 It is the default gateway for containers to communicate with the host.
stripe listen --forward-to http://172.17.0.1/stripe/webhook
- The first time you run it, it will generate your webhook key. copy and paste it into your env file.
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
Tips
When a user is registered (new tenant) they are asked to validate their email. use the address below to access the mailpit
Contributing
- Fork the repository
- Create your feature changes in your branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Security
If you discover any security-related issues, please email wallacemartinss@gmail.com instead of using the issue tracker.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Credits
Support
For support, please email wallacemartinss@gmail.com or create an issue in the GitHub repository.