/startersaas-react-spa

React SPA for a SaaS boilerplate

Primary LanguageJavaScriptMIT LicenseMIT

StarterSaaS React SPA

This project contains everything you need to setup a fully featured SaaS SPA in 5 minutes.

Installation

Copy .env.example into .env.

Build the application

Create a startersaas newtwork typing:

docker network create startersaas-network

Then build the container

docker compose build

And finally, run the application

docker compose up

Application will be reachable on

http://localhost:3010

Configuring .env

Below the meaning of every environment variable you can setup.

REACT_APP_API_HOST=http://localhost:3000 the host of StarterSaaS API

REACT_APP_API_PATH=/api/v1 don't change it

REACT_APP_JWT_TOKEN_NAME=startersaas-jwt the name of the jwt token

REACT_APP_SIGNUP_WITH_ACTIVATE=true set this value as true if you want to log the new registered user directly, without asking for email confirmation

REACT_APP_ENABLE_CUSTOMER_PORTAL=false, if true the UI will forward the customer to the Stripe Customer Portal to handle subscriptions and credit card management

Features

API and Frontend

  • user registration of account with subdomain, email and password
  • user email activation with 6 characters code and account creation
  • resend activation code if not received
  • user password reset through code sent by email
  • user login
  • user logout
  • user change password once logged in
  • account trial period
  • edit of account billing information
  • subscription creation
  • plan change
  • add new credit card
  • remove credit card
  • subscription cancel
  • subscription re enable
  • 3D Secure ready payments
  • subscription handling via Stripe customer portal
  • account's users list (by admins only)
  • account's user create (by admins only)
  • account's user update (by admins only)
  • account's user delete (by admins only)

API only

  • stripe webhooks handling
  • events notifications by email:
    • new user subscribed
    • successful payments
    • failed payments
  • daily notifications by email:
    • expiring trials
    • failed payments
    • account suspension due to failed payments

TODO

  • signup with Google
  • teams handling

CREDITS

Author: Stefano Mancini stefano.mancini@devinterface.com

Company: DevInterface SRL (https://www.devinterface.com)

License

Licensed under the MIT License