0.11.0 • Published 5 years ago

staq v0.11.0

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

staq

Staq is a Javascript library for creating Software-as-a-Service (SaaS) businesses.

The staq package contains a set of React components that implement standard SaaS features including:

  • User accounts
  • Landing page
  • Pricing page
  • Subscription management (via Stripe Customer Portal)

The package also ships with a set of NodeJS functions to be used with Google Firebase to implement the backend logic necessary for features like subscription billing with Stripe.

Quickstart

  1. Install

    yarn add staq
  2. Initialize and configure

    In your index.js, add the following import:

    import { initStaq, withStaq } from staq

    Call initStaq and pass in a configuration object specifying the name of your site and your Firebase config object.

    initStaq({
      siteTitle: 'Test App',
      firebaseConfig: {
        // your firebase config
      }
    })
  3. Also in index.js, wrap your app in withStaq Take the first argument to ReactDOM.render and pass it to the withStaq function.

    ```jsx
    ReactDOM.render(
      withStaq(<App />),
      document.getElementById('root')
    )
    ```
  4. Use staq to install standard SaaS features In your App.js[x], import StaqRoutes and render them inside your router.

    ```jsx
    import React from 'react'
    import { BrowserRouter as Router } from 'react-router-dom'
    
    import { StaqRoutes } from 'staq'
    
    function App(props) {
      return (
        <Router>
          <StaqRoutes />
        </Router>
      )
    }
    
    export default App
    ```

License

MIT © mroll

0.11.0

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.4.0

5 years ago

1.0.0

5 years ago