Builder Book logo

Book: SaaS Boilerplate

  1. Introduction. Project structure.
  2. GitHub. VS Code Editor. Node. Yarn. TypeScript. TSLint. Next.js. Environmental variables.
  3. Material-UI. Theme. Dark theme. Shared layout. Shared styles. Shared components. Mobile browser.
  4. HTTP. APP server. Next-Express server. Fetch method. API methods. async/await. API server. Express server. Environmental variables. Logs.
  5. User model. Logger. Mongoose and MongoDB. Jest testing. Your Settings page. File upload to AWS S3.
  6. Store. MobX. Store HOC withStore. Authentication HOC withAuth. Login page. Index page.
  7. Google OAuth. Mailchimp.
  8. AWS SES. EmailTemplate. Welcome email.
  9. Passwordless OAuth.
  10. Team. Invitation. Invitation email.
  11. Stripe. Customer. Subscription. Invoice.
  12. Discussion. Post.
  13. Web sockets.
  14. Create Post via email. AWS Lambda. AWS API Gateway.
  15. Deploy to AWS Elastic BeanStalk.

Chapter 4: User model. Logger. Mongoose and MongoDB. Jest testing. Your Settings page. File upload to AWS S3.

Available for pre-order for $99. The price becomes $199 once published.


In Chapter 4, you will start with the codebase in the 4-begin folder of our saas repo and end up with the codebase in the 4-end folder.

We will cover the following topics in this chapter:

  • Infrastructure for User
    - User Schema and Model. Type interface.
    - Static methods and Mongoose methods
    - Express routes, router and API methods
  • MongoDB database
    - MongoDB Atlas
    - Connecting database
    - Testing connection
  • Jest testing
    - Slugify method
  • Winston logger for API
  • Your Settings page
    - Form and Input
  • File upload and AWS S3 upload
    - API methods and Express route
    - Third-party API: AWS S3
    - S3 bucket and testing
    - resizeImage

Available for pre-order for $99. The price becomes $199 once published.


format_list_bulleted
help_outline
lens