All Projects → async-labs → Saas

async-labs / Saas

Licence: mit
Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to Saas

Builderbook
Open source web application to learn JS stack: React, Material-UI, Next.js, Node.js, Express.js, Mongoose, MongoDB database.
Stars: ✭ 3,015 (+10.85%)
Mutual labels:  google-api, mongoose, mongodb, nextjs, mailchimp, passport, boilerplate, material-ui, aws-ses
Mern Boilerplate
Fullstack boilerplate with React, Redux, Express, Mongoose, Passport Local, JWT, Facebook and Google OAuth out of the box.
Stars: ✭ 112 (-95.88%)
Mutual labels:  mongoose, mongodb, express, passport, boilerplate
Express Boilerplate
🚀 Starter project for a RESTful API in Node with Express & mongoose component-based
Stars: ✭ 9 (-99.67%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Es6 Express Mongoose Passport Rest Api
Lightweight boilerplate for Node RESTful API, ES6, Express, Mongoose and Passport 🎁
Stars: ✭ 36 (-98.68%)
Mutual labels:  mongoose, express, passport, boilerplate
Node Express Mongoose
A boilerplate application for building web apps using node and mongodb
Stars: ✭ 1,221 (-55.11%)
Mutual labels:  mongoose, express, passport, boilerplate
Meantorrent
meanTorrent - MEAN.JS BitTorrent Private Tracker - Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js, A BitTorrent Private Tracker CMS with Multilingual, and IRC announce support, CloudFlare support. Demo at:
Stars: ✭ 438 (-83.9%)
Mutual labels:  mongoose, mongodb, express, passport
Node Express Mongoose Demo
A simple demo app using node and mongodb for beginners
Stars: ✭ 4,976 (+82.94%)
Mutual labels:  mongoose, mongodb, express, passport
Next Graphql Blog
🖊 A Blog including a server and a client. Server is built with Node, Express & a customized GraphQL-yoga server. Client is built with React, Next js & Apollo client.
Stars: ✭ 152 (-94.41%)
Mutual labels:  mongoose, mongodb, express, nextjs
Jianshu
仿简书nx+nodejs+nestjs6+express+mongodb+angular8+爬虫
Stars: ✭ 296 (-89.12%)
Mutual labels:  mongoose, mongodb, express, passport
Angular Full Stack
Angular Full Stack project built using Angular, Express, Mongoose and Node. Whole stack in TypeScript.
Stars: ✭ 1,261 (-53.64%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (-22.35%)
Mutual labels:  mongoose, mongodb, passport, boilerplate
Nodejs Api Boilerplate
A boilerplate for kickstart your nodejs api project with JWT Auth and some new Techs :)
Stars: ✭ 364 (-86.62%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Bulletproof Nodejs
Implementation of a bulletproof node.js API 🛡️
Stars: ✭ 4,369 (+60.63%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Node Express Boilerplate
A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose
Stars: ✭ 890 (-67.28%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Nest Angular
NestJS, Angular 6, Server Side Rendering (Angular Universal), GraphQL, JWT (JSON Web Tokens) and Facebook/Twitter/Google Authentication, Mongoose, MongoDB, Webpack, TypeScript
Stars: ✭ 307 (-88.71%)
Mutual labels:  mongoose, mongodb, express, passport
Wertik Js
💪 A library that powers your app with GraphQL + Rest API
Stars: ✭ 56 (-97.94%)
Mutual labels:  saas, mongoose, mongodb, boilerplate
Node Rem
Node REM - NodeJS Rest Express MongoDB and more: typescript, passport, JWT, socket.io, HTTPS, HTTP2, async/await, nodemailer, templates, pagination, docker, etc. Live Demo: https://node-rem-ngduc.vercel.app
Stars: ✭ 192 (-92.94%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (-89.41%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Fullstack Shopping Cart
MERN stack shopping cart, written in TypeScript
Stars: ✭ 82 (-96.99%)
Mutual labels:  mongoose, mongodb, express, material-ui
Express Rest Boilerplate
⌛️ Express starter for building RESTful APIs
Stars: ✭ 1,794 (-34.04%)
Mutual labels:  mongoose, mongodb, express, boilerplate

SaaS Boilerplate

Open source web app that saves you many days of work when building your own SaaS product. The boilerplate comes with many basic SaaS features (see Features below) so that you can focus on features that differentiate your product.

If you want to learn how to build this project from scratch, check out our book: https://builderbook.org/book

The open source project is located in the saas folder. If you purchased our book, codebases for each of the book's chapters are located in the book folder.

Live demo:

Sponsors

aws-activate-logo

1password-logo

Showcase

Check out projects built with the help of this open source app. Feel free to add your own project by creating a pull request.

  • Retaino by Earl Lee: Save, annotate, review, and share great web content. Receive smart email digests to retain key information.
  • Async: Urgent vs non-urgent communication tool for small teams.
  • Builder Book: Open source web app to publish documentation or books. Built with React, Material-UI, Next, Express, Mongoose, MongoDB.

Contents

Features

  • Server-side rendering for fast initial load and SEO.
  • User authentication with Google OAuth API and Passwordless, cookie, and session.
  • Production-ready Express server with compression, parser, and helmet.
  • Transactional emails (AWS SES): welcome, team invitation, and payment.
  • Adding email addresses to newsletter lists (Mailchimp): new users, paying users.
  • File upload, load, and deletion (AWS S3) with pre-signed request for: Posts, Team Profile, and User Profile.
  • Websockets with socket.io v3.
  • Team creation, Team Member invitation, and settings for Team and User.
  • Opinionated architecture:
    • keeping babel and webpack configurations under the hood,
    • striving to minimize number of configurations,
    • withAuth HOC to pass user prop and control user access to pages,
    • HOC extensions MyApp and MyDocument
    • server-side rendering with Material-UI,
    • model-specific components in addition to common components.
  • Universally-available environmental variables at runtime.
  • Custom logger (configure what not to print in production).
  • Useful components for any web app: ActiveLink, Confirm, Notifier, MenuWithLinks, and more.
  • Analytics with Google Analytics.
  • Production-ready, scalable architecture:
    • app - user-facing web app with Next/Express server, responsible for rendering pages (either client-side or server-side rendered). app sends requests via API methods to api Express server.
    • api - server-only code, Express server, responsible for processing requests for internal and external API infrastructures.
    • we prepared both apps for easy deployment to now by vercel.
  • Subscriptions with Stripe:
    • subscribe/unsubscribe Team to plan,
    • update card information,
    • verified Stripe webhook for failed payment for subscription.

Running api locally:

  • Before running, create a .env file inside the api folder with the environmental variables listed below.
    This file must have values for the required variables.
    To use all features and third-party integrations, also add the optional variables.

    api/.env:

    # Used in api/server/server.ts
    MONGO_URL_TEST=
    MONGO_URL=
    SESSION_NAME=
    SESSION_SECRET=
    COOKIE_DOMAIN=
    
    # Used in api/server/google.ts
    GOOGLE_CLIENTID=
    GOOGLE_CLIENTSECRET=
    
    # Used in api/server/aws-s3.ts and api/server/aws-ses.ts
    AWS_REGION=
    AWS_ACCESSKEYID=
    AWS_SECRETACCESSKEY=
    
    # Used in api/server/models/Invitation.ts and api/server/models/User.ts
    EMAIL_SUPPORT_FROM_ADDRESS=
    
    # Used in api/server/mailchimp.ts
    MAILCHIMP_API_KEY=
    MAILCHIMP_REGION=
    MAILCHIMP_SAAS_ALL_LIST_ID=
    
    # All env variables above this line are needed for successful user signup
    
    # Used in api/server/stripe.ts
    STRIPE_TEST_SECRETKEY=sk_test_xxxxxx
    STRIPE_LIVE_SECRETKEY=sk_live_xxxxxx
    
    STRIPE_TEST_PLANID=plan_xxxxxx
    STRIPE_LIVE_PLANID=plan_xxxxxx
    
    STRIPE_LIVE_ENDPOINTSECRET=whsec_xxxxxx
    
    # Optionally determine the URL
    URL_APP="http://localhost:3000"
    URL_API="http://localhost:8000"
    PRODUCTION_URL_APP="https://saas-app.async-await.com"
    PRODUCTION_URL_API="https://saas-api.async-await.com"
    

    Important: use your values for PRODUCTION_URL_APP and PRODUCTION_URL_API. These are values for domain name that you own.

    Important: The above environmental variables are available on the server only. You should add your .env file to .gitignore inside the api folder so that your secret keys are not stored on a remote Github repo.

  • Once .env is created, you can run the api app. Navigate to the api folder, run yarn install to add all packages, then run the command below:

    yarn dev
    

Running app locally:

  • Navigate to the app folder, run yarn to add all packages, then run yarn dev and navigate to http://localhost:3000:

    • A .env file in the app folder is not required to run, but you can create one to override the default variables:
      NEXT_PUBLIC_STRIPE_TEST_PUBLISHABLEKEY="pk_test_xxxxxxxxxxxxxxx"
      NEXT_PUBLIC_STRIPE_LIVE_PUBLISHABLEKEY="pk_live_xxxxxxxxxxxxxxx"
    
      NEXT_PUBLIC_BUCKET_FOR_POSTS=
      NEXT_PUBLIC_BUCKET_FOR_TEAM_AVATARS=
      NEXT_PUBLIC_BUCKET_FOR_TEAM_LOGOS=
    
      NEXT_PUBLIC_URL_APP="http://localhost:3000"
      NEXT_PUBLIC_URL_API="http://localhost:8000"
      NEXT_PUBLIC_PRODUCTION_URL_APP=
      NEXT_PUBLIC_PRODUCTION_URL_API=
    
    
      NEXT_PUBLIC_API_GATEWAY_ENDPOINT=
      NEXT_PUBLIC_GA_MEASUREMENT_ID=
    

    Important: use your values for PRODUCTION_URL_APP and PRODUCTION_URL_API. These are values for domain name that you own.

    • To get NEXT_PUBLIC_GA_MEASUREMENT_ID, set up Google Analytics and follow these instructions to find your tracking ID.
    • To get NEXT_PUBLIC_STRIPE_TEST_PUBLISHABLEKEY, go to your Stripe dashboard, click Developers, then click API keys.
  • For successful file uploading, make sure your buckets have proper CORS configuration. Go to your AWS account, find your bucket, go to Permissions > CORS configuration, add:

[
  {
    "AllowedHeaders":[
      "*"
    ],
    "AllowedMethods":[
      "PUT",
      "POST",
      "GET",
      "HEAD",
      "DELETE"
    ],
    "AllowedOrigins":[
      "http://localhost:3000",
      "https://saas-app.async-await.com"
    ],
    "ExposeHeaders":[
      "ETag",
      "x-amz-meta-custom-header"
    ]
  }
]
  • Make sure to update allowed origin with your actual values for NEXT_PUBLIC_URL_APP and NEXT_PUBLIC_PRODUCTION_URL_APP.

  • Once .env is created, you can run the app app. Navigate to the app folder, run yarn install to add all packages, then run the command below:

    yarn dev
    

Deploy to Heroku, AWS Elastic Beanstalk, API Gateway and AWS Lambda

We give detailed instructions inside Chapter 9 and 10 of our SaaS Boilerplate book: https://builderbook.org/book

Built with

For more detail, check package.json files in both app and api folders and project's root.

To customize styles, check this guide.

Screenshots

Google or passwordless login: 1_SaaS_login

Dropdown menu for settings: 2_SaaS_DropdownMenu

Personal settings: 3_SaaS_PersonalSettings

Team settings: 4_SaaS_TeamSettings

Creating a Discussion: 5_SaaS_Discussion_Creation

Writing a Post, Markdown vs. HTML view: 6_SaaS_Discussion_Markdown

7_SaaS_Discussion_HTML

Discussion between team members: 8_SaaS_Discussion_Dark

Billing settings: 9_SaaS_Billing

Purchasing a subscription: 10_SaaS_BuySubscription

Payment history: 12_SaaS_PaymentHistory

Contributing

Want to support this project? Consider buying our books. If you represent company, consider becoming a recurring sponsor for this repo. Our two most popular repos get >1000 unique visitor per week, mostly comprised of people who are building their SaaS web applications.

Team

You can contact us at [email protected]

If you are interested in hiring our team to help build your SaaS web application, please fill out our form at Async Labs.

License

All code in this repository is provided under the MIT License.

Project structure

├── .elasticbeanstalk
│   └── config.yml
├── .github
│   └── FUNDING.yml
├── .vscode
│   ├── extensions.json
│   ├── launch.json
│   └── settings.json
├── api
│   ├── .elasticbeanstalk
│   │   └── config.yml
│   ├── server
│   │   ├── api
│   │   │   ├── index.ts
│   │   │   ├── public.ts
│   │   │   ├── team-leader.ts
│   │   │   └── team-member.ts
│   │   ├── models
│   │   │   ├── Discussion.ts
│   │   │   ├── EmailTemplate.ts
│   │   │   ├── Invitation.ts
│   │   │   ├── Post.ts
│   │   │   ├── Team.ts
│   │   │   └── User.ts
│   │   ├── utils
│   │   │   ├── slugify.ts
│   │   │   └── sum.ts
│   │   ├── aws-s3.ts
│   │   ├── aws-ses.ts
│   │   ├── google-auth.ts
│   │   ├── logger.ts
│   │   ├── mailchimp.ts
│   │   ├── passwordless-auth.ts
│   │   ├── passwordless-token-mongostore.ts
│   │   ├── server.ts
│   │   ├── sockets.ts
│   │   └── stripe.ts
│   ├── static
│   │   └── robots.txt
│   ├── test/server/utils
│   │   ├── slugify.test.ts
│   │   └── sum.test.ts
│   ├── .eslintignore
│   ├── .eslintrc.js
│   ├── .gitignore
│   ├── package.json
│   ├── tsconfig.json
│   ├── tsconfig.server.json
│   └── yarn.lock
├── app
│   ├── .elasticbeanstalk
│   │   └── config.yml
│   ├── components
│   │   ├── common
│   │   │   ├── Confirmer.tsx
│   │   │   ├── LoginButton.tsx
│   │   │   ├── MemberChooser.tsx
│   │   │   ├── MenuWithLinks.tsx
│   │   │   ├── MenuWithMenuItems.tsx
│   │   │   └── Notifier.tsx
│   │   ├── discussions
│   │   │   ├── CreateDiscussionForm.tsx
│   │   │   ├── DiscussionActionMenu.tsx
│   │   │   ├── DiscussionList.tsx
│   │   │   ├── DiscussionListItem.tsx
│   │   │   └── EditDiscussionForm.tsx
│   │   ├── layout
│   │   │   ├── index.tsx
│   │   ├── posts
│   │   │   ├── PostContent.tsx
│   │   │   ├── PostDetail.tsx
│   │   │   ├── PostEditor.tsx
│   │   │   └── PostForm.tsx
│   │   ├── teams
│   │   │   └── InviteMember.tsx
│   ├── lib
│   │   ├── api
│   │   │   ├── makeQueryString.ts
│   │   │   ├── public.ts
│   │   │   ├── sendRequestAndGetResponse.ts
│   │   │   ├── team-leader.ts
│   │   │   └── team-member.ts
│   │   ├── store
│   │   │   ├── discussion.ts
│   │   │   ├── index.ts
│   │   │   ├── invitation.ts
│   │   │   ├── post.ts
│   │   │   ├── team.ts
│   │   │   └── user.ts
│   │   ├── confirm.ts
│   │   ├── isMobile.ts
│   │   ├── notify.ts
│   │   ├── resizeImage.ts
│   │   ├── sharedStyles.ts
│   │   ├── theme.ts
│   │   └── withAuth.tsx
│   ├── pages
│   │   ├── _app.tsx
│   │   ├── _document.tsx
│   │   ├── billing.tsx
│   │   ├── create-team.tsx
│   │   ├── discussion.tsx
│   │   ├── invitation.tsx
│   │   ├── login-cached.tsx
│   │   ├── login.tsx
│   │   ├── team-settings.tsx
│   │   └── your-settings.tsx
│   ├── public
│   │   └── pepe.jpg
│   ├── server
│   │   ├── robots.txt
│   │   ├── routesWithCache.ts
│   │   ├── server.ts
│   │   └── setupSitemapAndRobots.ts
│   ├── .babelrc
│   ├── .eslintignore
│   ├── .eslintrc.js
│   ├── .gitignore
│   ├── next.env.d.ts
│   ├── next.config.js
│   ├── package.json
│   ├── tsconfig.json
│   ├── tsconfig.server.json
│   └── yarn.lock
├── book
├── lambda
│   ├── .estlintignore
│   ├── .eslintrc.js
│   ├── .gitignore
│   ├── api
│   ├── handler.ts
│   ├── package.json
│   ├── serverless.yml
│   ├── tsconfig.json
│   └── yarn.lock
├── .gitignore
├── LICENSE.md
├── README.md
├── package.json
├── yarn.lock
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].