4.0.9 • Published 3 years ago

@staart/api v4.0.9

Weekly downloads
201
License
MIT
Repository
github
Last release
3 years ago

Staart API

Staart API is a Node.js backend starter for SaaS startups written in TypeScript. It has all the features you need to build a SaaS product, like user management and authentication, billing, organizations, GDPR tools, API keys, rate limiting, superadmin impersonation, and more.

Status
BuildNode CI Snyk Vulnerabilities for GitHub Repo Dependencies Dev dependencies
PRsPull Request Labeler PR Generator CI Merge PRs
CommunityContributors GitHub Type definitions npm package version semantic-release

Staart API is build to work with Staart UI, the frontend PWA starter for SaaS startups.

⚠️ v3 BETA WARNING: The master branch and all 3.x releases are currently in beta. For production, use v1.x instead.

⭐ Features

🆕 New in v2

  • Casbin-powered permission management
  • JWT-powered single-use coupon codes
  • Redis-powered queues for outbound emails and logs
  • Cloud agnostic, no longer specific to AWS
  • Staart scripts for building and deploying
  • Async JSON response and smart controller injection

🔐 Security

  • JWT-powered authentication and user management
  • TOTP-powered two-factor authentication (2FA)
  • OAuth2 login with third-party accounts
  • Location-based login verification
  • Security event logging and history

💳 SaaS

  • Stripe-powered recurring billing
  • Teams with managed user permissions
  • CRUD invoices, methods, transactions, etc.
  • Rich HTML transactional emails
  • GDPR-compliant data export and delete
  • API gateway with API keys and rate limiting
  • Domain verification with auto-approve members

👩‍💻 Developer utilities

  • OvernightJS-powered decorators and class syntax
  • Injection-proof helpers for querying databases
  • Data pagination and CRUD utilities for all tables
  • Authorization helpers
  • Caching and invalidation for common queries
  • User impersonation for super-admin
  • Easy redirect rules in YAML
  • ElasticSearch-powered server and event logs

🛠 Usage

  1. Use this template or fork this repository
  2. Install dependencies with npm install
  3. Add a .env file based on config.ts.
  4. Create MariaDB/MySQL tables based on schema.sql
  5. Add your controllers in the ./src/controllers directory
  6. Generate your app.ts file using staart controllers
  7. Build with staart build and deploy with staart launch

Updating Staart

To update your installation of Staart, run the following:

staart update api

If you've used the "Use this template" option on GitHub, you might have to force pull from staart/api the first time since the histories wouldn't match. You can use the flag --allow-unrelated-histories in this case.

💻 Docs

View docs site →

View TypeDoc →

View API demo →

View frontend demo →

🏗️ Built with Staart

🏁 Staart Ecosystem

The Staart ecosystem consists of open-source projects to build your SaaS startup, written in TypeScript.

Package
🛠️ Staart APINode.js backend with RESTful APIsBuild status Docs npm package version
🌐 Staart UIFrontend Vue.js Progressive Web AppBuild status Docs npm package version
📑 Staart SiteStatic site generator for docs/helpdeskBuild status Docs npm package version
📱 Staart NativeReact Native app for Android and iOSBuild status Docs npm package version
🎨 Staart.cssSass/CSS framework and utilitiesBuild status Docs npm package version
📦 Staart PackagesHelper functions and utility packagesBuild status Custom badge

💝 Sponsors

The development of Staart projects is supported by these wonderful companies. Find us on OpenCollective

📄 License

4.0.9

3 years ago

4.0.8

3 years ago

4.0.7

3 years ago

4.0.6

3 years ago

4.0.5

3 years ago

4.0.4

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.6.17

3 years ago

3.6.16

3 years ago

3.6.15

3 years ago

3.6.14

3 years ago

3.6.13

3 years ago

3.6.12

3 years ago

3.6.11

3 years ago

3.6.10

3 years ago

3.6.9

3 years ago

3.6.8

3 years ago

3.6.7

3 years ago

3.6.6

3 years ago

3.6.5

3 years ago

3.6.4

3 years ago

3.6.3

3 years ago

3.6.2

3 years ago

3.6.1

3 years ago

3.6.0

3 years ago

3.5.6

3 years ago

3.5.5

3 years ago

3.5.4

3 years ago

3.5.3

3 years ago

3.5.2

3 years ago

3.5.1

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.2

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.21.0

4 years ago

2.20.0

4 years ago

2.19.0

4 years ago

2.18.0

4 years ago

2.17.0

4 years ago

2.16.0

4 years ago

2.15.0

4 years ago

2.13.0

4 years ago

2.14.0

4 years ago

2.12.1

4 years ago

2.11.2

4 years ago

2.12.0

4 years ago

2.11.1

4 years ago

2.11.0

4 years ago

2.10.2

4 years ago

2.10.1

4 years ago

2.10.0

4 years ago

2.9.0

4 years ago

2.8.1

4 years ago

2.8.0

4 years ago

2.7.0

4 years ago

2.6.1

4 years ago

2.6.0

4 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago

1.3.70

4 years ago