All Projects → miracuthbert → Saas Boilerplate

miracuthbert / Saas Boilerplate

SaaS boilerplate built in Laravel, Bootstrap 4 and VueJs.

Projects that are alternatives of or similar to Saas Boilerplate

Laravel Hackathon Starter
💻 A hackathon/MVP boilerplate for laravel web applications. Start your hackathons without hassle.
Stars: ✭ 1,589 (+945.39%)
Mutual labels:  api, laravel, boilerplate
Laravel Api Boilerplate
Laravel API Boilerplate | Please consult the Wiki !
Stars: ✭ 300 (+97.37%)
Mutual labels:  api, laravel, boilerplate
Laraplans
SaaS style recurring plans for Laravel.
Stars: ✭ 163 (+7.24%)
Mutual labels:  saas, subscription, laravel
Plans
Laravel Plans is a package for SaaS apps that need management over plans, features, subscriptions, events for plans or limited, countable features.
Stars: ✭ 326 (+114.47%)
Mutual labels:  saas, subscription, laravel
Laravel Api Boilerplate Jwt
A Laravel 5.8 API Boilerplate to create a ready-to-use REST API in seconds.
Stars: ✭ 1,155 (+659.87%)
Mutual labels:  api, laravel, boilerplate
Invoice As A Service
💰 Simple invoicing service (REST API): from JSON to PDF
Stars: ✭ 106 (-30.26%)
Mutual labels:  api, saas, laravel
Restful Api With Laravel Definitive Guide
Repository with the base code for the course "RESTful API with Laravel - Definitive-Guide"
Stars: ✭ 156 (+2.63%)
Mutual labels:  api, restful-api, laravel
Wertik Js
💪 A library that powers your app with GraphQL + Rest API
Stars: ✭ 56 (-63.16%)
Mutual labels:  api, saas, boilerplate
Djaoapp
User login, billing, access control as part of a session proxy
Stars: ✭ 61 (-59.87%)
Mutual labels:  api, saas, subscription
Api Restful Con Laravel Guia Definitiva
Repositorio para el código base del curso "API RESTful con Laravel - Guía Definitiva"
Stars: ✭ 95 (-37.5%)
Mutual labels:  api, restful-api, laravel
Laravel Api Boilerplate
A Boilerplate Project For Laravel API's (NOT MAINTAINED)
Stars: ✭ 113 (-25.66%)
Mutual labels:  api, laravel, boilerplate
Wizard
Wizard是一款开源的文档管理工具,支持Markdown/Swagger/Table类型的文档。
Stars: ✭ 1,733 (+1040.13%)
Mutual labels:  api, laravel
Api Response
Simple and ready to use API response wrapper for Laravel.
Stars: ✭ 123 (-19.08%)
Mutual labels:  api, laravel
L5 Swagger
OpenApi or Swagger integration to Laravel
Stars: ✭ 1,781 (+1071.71%)
Mutual labels:  api, laravel
Tenancy
Automatic multi-tenancy for Laravel. No code changes needed.
Stars: ✭ 2,133 (+1303.29%)
Mutual labels:  saas, laravel
Remove Bg
Programmatically remove backgrounds from your images using the remove.bg api
Stars: ✭ 124 (-18.42%)
Mutual labels:  api, laravel
Laravel cities
Find any country/city in the world. Get Long/Lat etc. Deploy geonames.org database localy. Optimized DB tree
Stars: ✭ 133 (-12.5%)
Mutual labels:  api, laravel
Open Rest
Standard rest server, Base on restify and sequelize
Stars: ✭ 136 (-10.53%)
Mutual labels:  api, restful-api
Laravel Api Explorer
API explorer for laravel applications
Stars: ✭ 138 (-9.21%)
Mutual labels:  api, laravel
Dawn Api Demo
dawn-api-demo
Stars: ✭ 117 (-23.03%)
Mutual labels:  api, restful-api

saas-boilerplate

This is a SaaS boilerplate built on top of the Laravel framework. Built to provide developers with a template to kickoff their SaaS application, without the hustle for repetitive tasks such as user account setup, subscriptions and role management.

features

  • Authentication
    • Login / Registration
    • Email Activation
    • Two Factor Login (only when enabled)
  • Subscription with Stripe
    • User plans
    • Team plans
  • Account (User Account)
    • Profile Update
    • Change Password
    • Two Factor Authentication
    • Subscription
      • Cancel Subscription
      • Resume Subscription
      • Swap Plan
      • Update Card
    • API Tokens
  • Single Database Multi-tenancy
  • Admin
    • User Management
      • Manage User Roles
    • Role & Permissions Management
  • Developer Panel
    • Manage OAuth Clients
    • Manage Personal Access Tokens
  • Other features
    • Filtering (extendable)
    • API access (starter template)

Note: Some features may be subjected to change. Other features may not be listed since they are under development or do not qualify as a standard / main SaaS feature. Some common features will not be listed as well.

installation

  1. Fork, clone or download this repository.

  2. Run composer install if its the initial setup or composer update.

  3. Setup your environment keys in .env (If .env does not exist then copy / rename .env.example as .env)

  4. Run php artisan app:name to set the name (namespace) of your app. (Remember not to live any spaces)

  5. Run php artisan migrate for initial tables setup.

  6. Optional: Run php artisan db:seed --class=RoleTableSeeder to set the initial roles and permissions, then follow step 7 below to assign a user the initial permissions and roles.

  7. Optional: To create a super / root admin; Run php artisan admin:assign-role [email protected] admin-root. Substitute [email protected] with an existing user email. admin-root is the default root Admin role.

    Note: You must follow step 6 above first to setup the root admin.

usage

Custom Commands

  1. Admin: Assign user a role
    • Use php artisan admin:assign-role <email> <role-slug>: <email> is the user's email and <role-slug> is the slug of the role you wish to assign the user.

Force HTTPS

When pushing the project to a platform or production environment, assets or urls may be broken if the platform enforces HTTPS.

To enable urls to use HTTPS:

Set FORCE_HTTPS variable in .env file to true.

By default FORCE_HTTPS is false.

Note: If FORCE_HTTPS does not exist in your .env, just add it as a new variable and assign a boolean value true or false.

This dynamically tells Laravel to force urls to use HTTPS which is especially handy in fixing or preventing broken assets urls.

Single Database Multi-tenancy

Model setup

To start using single databse multi-tenancy call ForTenants trait on a model

use SAASBoilerplate\App\Tenant\Traits\ForTenants;

class Project extends Model
{
    use ForTenants;
}

Tenants CRUD Operations

Once you have setup the model as show above. Just call CRUD operations directly. Tenant relationships are handled automatically.

$projects = Project::create([
    'name' => 'Project 1'
]);
$projects = Project::get();

Normal CRUD Operations

To perform CRUD operations on models with ForTenants trait can be done by adding withoutForTenants scope when fetching records associated with that model.

$projects = Project::withoutForTenants()->get();

This comes in handy for example in: admin or moderation operations

Routing

All tenant routes are under the routes folder in the tenant.php file.

Note: Tenant routes follow the same structure as other routes

The main reason we place all tenant routes separately is to handle route binding and its much easier to know which routes are for tenants.

libraries & packages

  • Main
    • PHP (>=7.1.3)
    • Laravel (Minimal 5.6)
    • Laravel Cashier (can be switched)
  • UI (can be switched)
    • Bootstrap (v4)
    • Font awesome
    • Simple Line Icons
    • jQuery
    • VueJs
    • Development
      • nodejs
      • npm

services

  • Stripe (payment gateway)
  • Authy by Twilio (two factor authentication)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].