{"id":13559018,"url":"https://github.com/staart/api","last_synced_at":"2025-10-02T14:31:59.255Z","repository":{"id":37502817,"uuid":"182489950","full_name":"staart/api","owner":"staart","description":"🏁🛠️ SaaS backend \u0026 API framework based on @nestjs","archived":true,"fork":false,"pushed_at":"2023-04-18T22:15:13.000Z","size":15638,"stargazers_count":1033,"open_issues_count":10,"forks_count":193,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-04-14T01:32:06.902Z","etag":null,"topics":["admin","auth","nest","nestjs","nodejs","saas","saas-startups","staart","starter-kit","stripe","typescript"],"latest_commit_sha":null,"homepage":"https://staart.js.org/api","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/staart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-04-21T04:35:19.000Z","updated_at":"2024-04-12T12:50:52.000Z","dependencies_parsed_at":"2023-09-29T08:54:36.947Z","dependency_job_id":null,"html_url":"https://github.com/staart/api","commit_stats":{"total_commits":2954,"total_committers":17,"mean_commits":"173.76470588235293","dds":0.54739336492891,"last_synced_commit":"075b30d5e4aa4d65fea107334c2b6a42314fc6a3"},"previous_names":["anandchowdhary/staart"],"tags_count":75,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staart%2Fapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staart%2Fapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staart%2Fapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staart%2Fapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/staart","download_url":"https://codeload.github.com/staart/api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":218464906,"owners_count":16335114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin","auth","nest","nestjs","nodejs","saas","saas-startups","staart","starter-kit","stripe","typescript"],"created_at":"2024-08-01T12:05:17.716Z","updated_at":"2025-10-02T14:31:58.816Z","avatar_url":"https://github.com/staart.png","language":"TypeScript","funding_links":["https://opencollective.com/staart"],"categories":["TypeScript","nodejs"],"sub_categories":[],"readme":"[![Staart API](https://raw.githubusercontent.com/staart/staart.js.org/master/assets/svg/api.svg?sanitize=true)](https://staart.js.org/api)\n\nStaart 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.\n\n|           | Status                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Build     | [![Node CI](https://github.com/koj-co/template/workflows/Node%20CI/badge.svg)](https://github.com/koj-co/template/actions?query=workflow%3A%22Node+CI%22) [![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/koj-co/template)](https://snyk.io/test/github/koj-co/template) [![Dependencies](https://img.shields.io/david/staart/api.svg)](https://david-dm.org/staart/api) [![Dev dependencies](https://img.shields.io/david/dev/staart/api.svg)](https://david-dm.org/staart/api)                                                                                         |\n| PRs       | [![Pull Request Labeler](https://github.com/koj-co/template/workflows/Pull%20Request%20Labeler/badge.svg)](https://github.com/koj-co/template/actions?query=workflow%3A%22Pull+Request+Labeler%22) [![PR Generator CI](https://github.com/koj-co/template/workflows/PR%20Generator%20CI/badge.svg)](https://github.com/koj-co/template/actions?query=workflow%3A%22PR+Generator+CI%22) [![Merge PRs](https://github.com/koj-co/template/workflows/Merge%20PRs/badge.svg)](https://github.com/koj-co/template/actions?query=workflow%3A%22Merge+PRs%22)                                                               |\n| Community | [![Contributors](https://img.shields.io/github/contributors/staart/api.svg)](https://github.com/staart/api/graphs/contributors) [![GitHub](https://img.shields.io/github/license/staart/api.svg)](https://github.com/staart/api/blob/master/LICENSE) ![Type definitions](https://img.shields.io/badge/types-TypeScript-blue.svg) [![npm package version](https://img.shields.io/npm/v/@staart/api)](https://www.npmjs.com/package/@staart/api) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) |\n\nStaart API is build to work with [Staart UI](https://github.com/staart/ui), the frontend PWA starter for SaaS startups.\n\n**⚠️ v3 BETA WARNING:** The `master` branch and all 3.x releases are currently in beta. For production, use v1.x instead.\n\n## ⭐ Features\n\n### 🆕 New in v2\n\n- Casbin-powered permission management\n- JWT-powered single-use coupon codes\n- Redis-powered queues for outbound emails and logs\n- Cloud agnostic, no longer specific to AWS\n- Staart scripts for building and deploying\n- Async JSON response and smart controller injection\n\n### 🔐 Security\n\n- JWT-powered authentication and user management\n- TOTP-powered two-factor authentication (2FA)\n- OAuth2 login with third-party accounts\n- Location-based login verification\n- Security event logging and history\n\n### 💳 SaaS\n\n- Stripe-powered recurring billing\n- Teams with managed user permissions\n- CRUD invoices, methods, transactions, etc.\n- Rich HTML transactional emails\n- GDPR-compliant data export and delete\n- API gateway with API keys and rate limiting\n- Domain verification with auto-approve members\n\n### 👩‍💻 Developer utilities\n\n- OvernightJS-powered decorators and class syntax\n- Injection-proof helpers for querying databases\n- Data pagination and CRUD utilities for all tables\n- Authorization helpers\n- Caching and invalidation for common queries\n- User impersonation for super-admin\n- Easy redirect rules in YAML\n- ElasticSearch-powered server and event logs\n\n## 🛠 Usage\n\n1. Use this template or fork this repository\n1. Install dependencies with `npm install`\n1. Add a `.env` file based on [config.ts](https://github.com/staart/api/blob/master/src/config.ts).\n1. Create MariaDB/MySQL tables based on [schema.sql](https://github.com/staart/api/blob/master/schema.sql)\n1. Add your controllers in the `./src/controllers` directory\n1. Generate your `app.ts` file using `staart controllers`\n1. Build with `staart build` and deploy with `staart launch`\n\n### Updating Staart\n\nTo update your installation of Staart, run the following:\n\n```bash\nstaart update api\n```\n\nIf 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.\n\n## 💻 Docs\n\n- [Getting started](https://staart.js.org/api/getting-started.html)\n- [Setting up environment variables](https://staart.js.org/api/setting-up-environment-variables.html)\n- [Creating a controller](https://staart.js.org/api/creating-a-controller.html)\n- [Updating Staart](https://staart.js.org/api/update.html)\n- [Response headers](https://staart.js.org/api/response-headers.html)\n- [Throwing errors](https://staart.js.org/api/throwing-errors.html)\n- [Authorization](https://staart.js.org/api/authorization.html)\n- [API key authentication](https://staart.js.org/api/api-key-authentication.html)\n- [Redirects](https://staart.js.org/api/redirects.html)\n- [Serving static files](https://staart.js.org/api/serving-static-files.html)\n\n**[View docs site →](https://staart.js.org/api)**\n\n**[View TypeDoc →](https://staart-typedoc.netlify.com)**\n\n**[View API demo →](http://staart.prod.oswaldlabs.com)**\n\n**[View frontend demo →](https://staart-demo.o15y.com)**\n\n## 🏗️ Built with Staart\n\n- [Oswald Labs Platform](https://github.com/OswaldLabsOpenSource/platform-v3)\n- [Speakup Developer](https://github.com/speakupnl/staart)\n- [**Add your Staart-based project**](https://github.com/staart/api/edit/master/README.md)\n\n## [🏁 Staart Ecosystem](https://staart.js.org)\n\nThe Staart ecosystem consists of open-source projects to build your SaaS startup, written in TypeScript.\n\n| Package                                                  |                                         |                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| -------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [🛠️ Staart API](https://github.com/staart/api)           | Node.js backend with RESTful APIs       | [![Build status](https://img.shields.io/circleci/build/github/staart/api)](https://circleci.com/gh/staart/api) [![Docs](https://img.shields.io/endpoint?url=https%3A%2F%2Fstaart.js.org%2Fshield-schema%2Fapi.json)](https://staart.js.org/api) [![npm package version](https://img.shields.io/npm/v/@staart/api)](https://www.npmjs.com/package/@staart/api)                                                         |\n| [🌐 Staart UI](https://github.com/staart/ui)             | Frontend Vue.js Progressive Web App     | [![Build status](https://img.shields.io/circleci/build/github/staart/ui)](https://circleci.com/gh/staart/ui) [![Docs](https://img.shields.io/endpoint?url=https%3A%2F%2Fstaart.js.org%2Fshield-schema%2Fui.json)](https://staart.js.org/ui) [![npm package version](https://img.shields.io/npm/v/@staart/ui)](https://www.npmjs.com/package/@staart/ui)                                                               |\n| [📑 Staart Site](https://github.com/staart/site)         | Static site generator for docs/helpdesk | [![Build status](https://img.shields.io/circleci/build/github/staart/site)](https://circleci.com/gh/staart/site) [![Docs](https://img.shields.io/endpoint?url=https%3A%2F%2Fstaart.js.org%2Fshield-schema%2Fsite.json)](https://staart.js.org/site) [![npm package version](https://img.shields.io/npm/v/@staart/site)](https://www.npmjs.com/package/@staart/site)                                                   |\n| [📱 Staart Native](https://github.com/staart/native)     | React Native app for Android and iOS    | [![Build status](https://img.shields.io/circleci/build/github/staart/native)](https://circleci.com/gh/staart/native) [![Docs](https://img.shields.io/endpoint?url=https%3A%2F%2Fstaart.js.org%2Fshield-schema%2Fnative.json)](https://staart.js.org/native) [![npm package version](https://img.shields.io/npm/v/@staart/native)](https://www.npmjs.com/package/@staart/native)                                       |\n| [🎨 Staart.css](https://github.com/staart/css)           | Sass/CSS framework and utilities        | [![Build status](https://img.shields.io/circleci/build/github/staart/css)](https://circleci.com/gh/staart/css) [![Docs](https://img.shields.io/endpoint?url=https%3A%2F%2Fstaart.js.org%2Fshield-schema%2Fcss.json)](https://staart.js.org/css) [![npm package version](https://img.shields.io/npm/v/@staart/css)](https://www.npmjs.com/package/@staart/css)                                                         |\n| [📦 Staart Packages](https://github.com/staart/packages) | Helper functions and utility packages   | [![Build status](https://img.shields.io/circleci/build/github/staart/packages)](https://circleci.com/gh/staart/packages) [![Custom badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fservices.anandchowdhary.now.sh%2Fapi%2Fgithub-files%3Frepo%3Dstaart%2Fpackages%26path%3Dpackages%26label%3Dstaart%26message%3D%25241%2524%2520package%2524S%2524%26color%3Dblueviolet)](https://www.npmjs.com/org/staart) |\n\n## 💝 Sponsors\n\nThe development of Staart projects is supported by these wonderful companies. [Find us on OpenCollective](https://opencollective.com/staart)\n\n\u003c!-- prettier-ignore --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/OswaldLabsOpenSource\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/21421587?v=4\" width=\"100px\" alt=\"\"/\u003e\u003cbr\u003e\u003csub\u003e\u003cb\u003eOswald Labs\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/O15Y\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/48348500?v=4\" width=\"100px\" alt=\"\"/\u003e\u003cbr\u003e\u003csub\u003e\u003cb\u003eO15Y\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/speakupnl\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/33686381?v=4\" width=\"100px\" alt=\"\"/\u003e\u003cbr\u003e\u003csub\u003e\u003cb\u003eSpeakup\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/netlify\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/7892489?v=4\" width=\"100px\" alt=\"\"/\u003e\u003cbr\u003e\u003csub\u003e\u003cb\u003eNetlify\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/koj-co\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/65495851?v=4\" width=\"100px\" alt=\"\"/\u003e\u003cbr\u003e\u003csub\u003e\u003cb\u003eKoj\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## 📄 License\n\n- Code: [MIT](https://github.com/staart/api/blob/master/LICENSE)\n- Logo and assets: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)\n- [GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/): [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)\n- [GeoNames](http://www.geonames.org/): [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaart%2Fapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstaart%2Fapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaart%2Fapi/lists"}