DEV Community

Chaoming Li
Chaoming Li

Posted on

Fireact v2.1 release, the open-source project built on React + Firebase + Stripe

I have released a new version of Fireact, the version 2.1.0.

If you haven't heard of Fireact, it's an open source project for building SaaS web applications. It's built on React, Firebase and Stripe. It comes with out-of-the-box features that includes:

  • Single-sign-on supporting Google, Facebook, Microsoft and a wild range of sign-in methods.
  • Stripe integration to manage subscription accounts and payments.
  • Supporting multiple subscription accounts per user
  • User permission management in subscription accounts
  • User permission framework for the development of your SaaS functionalities

Here is an introduction article of the project https://dev.to/chaoming/react-firebase-stripe-fireact-the-open-source-project-for-your-next-saas-product-1b84

Here is project Github URL: https://github.com/chaoming/fireact

What's new in version 2.1.0

The new version included a new feature to support tax rates for implementing sales tax, GST and VAT for subscriptions based on the country and state the users are in.

As a developer, you don't need to worry about the complexity of the subscription payments and taxes as the project will take care of them. All you need to do is to configure the tax rates in Stripe and Firestore database.

Adding a tax rate in Stripe

You can add a tax rate in Stripe UI under the Products menu. Once a tax rate is added, there is tax rate ID generated by Stripe.

Adding a tax rate in Firebase

Create a new collection called “taxes” in Firestore, and use the Stripe tax rate ID as the document ID for each tax rate document in Firestore.

Below is the JSON object of the Australia GST tax rate in Firestore:

{
    "applicable": [
        "AU"
    ],
    "rate": 10
}
Enter fullscreen mode Exit fullscreen mode

Below is the JSON object of the California Sales Tax rate in Firestore:

{
    "applicable": [
        "US:CA"
    ],
    "rate": 7.25
}
Enter fullscreen mode Exit fullscreen mode

Each tax can be applied to multiple countries or states. For country wide tax, put in the 2-character country code in the applicable array. For state specific tax, put in the 2-character country code and state code with a colon as separator in the applicable array.

You can find all the available country code and state code in the /src/inc/country.json file.

Top comments (0)