Skip to content

wallacemartinss/core_tenant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. Creation of Plans, Prices, and Features stored in the database and integrated via the Stripe API.
  2. Admin Panel for Managing Tenants and Subscriptions.
  3. API-based Client Creation when registering the Tenant
  4. Modal for Tenant to choose Plans and Complete the Subscription (Stripe Management)
  5. Feature for Tenant to create tickets for the Tenant's manager.
  6. Profile editing with theme color customization.
  7. Integration of Icons with FontAwesome.
  8. Tested and working with MySQL and Postgresql

Videos:

  1. See Video - Administrative panel presentation

video

  1. See Video - Creation of Products, prices and Features

video

  1. See Video - Registering a new tenant

video

The plugins used in this project may include:

Prerequisites

  1. Create a Stripe account and enable trial mode - Stripe

  2. Docker and docker-compose (The Dockerfile for this project already includes all the necessary resources to run the project.)

Dockerfile includes the following functionalities:

  1. The Docker File include all resources for execute this project.

Installation

  1. Clone the repository
git clone https://github.com/wallacemartinss/core_tenant.git
cd core_tenant
  1. Copy .ENV file
cp .env.example .env
  1. 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

  1. Configure Stripe keys in .env

STRIPE_KEY=your_stripe_key
STRIPE_SECRET=your_stripe_secret


  1. Run Docker
docker compose up -d
  1. Access docker App container
docker compose exec app bash
  1. Inside the container, Install PHP dependencies
composer install
  1. Inside the container, configure environment variables
php artisan key:generate
  1. Inside the container, Run migrations and seeders
php artisan migrate --seed
  1. Inside the container, Link storage for file uploads
php artisan storage:link
  1. 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
  1. 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

http://localhost:8025/

Contributing

  1. Fork the repository
  2. Create your feature changes in your branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

Security

If you discover any security-related issues, please email [email protected] 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 [email protected] or create an issue in the GitHub repository.


🚧 Project 🚀 under construction... 🚧