Staart is a Node.js backend starter for SaaS startups written in TypeScript. It has built-in user management and authentication, billing, organizations, GDPR tools, and more.
Works with Staart UI, the frontend starter for SaaS.
โญ Features
๐ Security
- Authentication and user management with JWT
- Two-factor authentication with TOTP
- Setup multiple emails for each account
- OAuth2 login with third-party accounts
- Location-based login verification
- Security event logging and history
๐ณ SaaS
- Subscriptions management with Stripe
- Organizations, teams, and user permissions
- Invoices, billing, credit cards, payments
- Rich HTML transactional emails with SES
- GDPR-proof data export and delete
- Affiliates and commission management
- API key management with rate limiting
๐ฉโ๐ป Developer utilities
- Decorators and class syntax with OvernightJS
- Injection-proof helpers for querying databases
- Data pagination and CRUD utilities for all tables
- Authorization helpers (can a user do this?)
- TypeScript interfaces for tables (ORM)
- Caching and invalidation for common queries
- User impersonation for super-admin
- Easy redirect rules in YAML
๐ Usage
- Fork this repository
- Install dependencies with
yarn
ornpm i
- Add a
.env
file based on config.ts. - Create MariaDB/MySQL tables based on schema.sql
- Add your controllers in the
./src/controllers
directory - Generate your
app.ts
file usingyarn generate-routes
- Build with
yarn build
and deploy withyarn start
๐ป API
Staart comes with tens of helper and CRUD methods for users, organizations, and more.
๐ฅ Contributors
Thanks goes to these wonderful people (emoji key):
Anand Chowdhary ๐ป ๐ ๐จ | reallinfo ๐จ |
This project follows the all-contributors specification. Contributions of any kind welcome!