In this post, we’ll explore how we built a multi-tenant telemedicine SaaS application by leveraging two powerful accelerators: SaaS Builder Toolkit for AWS and ARC by SourceFuse. We’ll dive into the architecture and implementation details, showcasing how these tools can streamline the development process and provide a scalable and secure solution for your SaaS needs.

Introduction to SaaS and the Challenges

SaaS (Software-as-a-Service) is a business and software delivery model that enables organizations to offer their solutions in a low-friction, service-centric model that maximizes value for customers and providers. It relies on agility and operational efficiency as pillars of a business strategy that promotes growth, reach and innovation.

Typical modern day SaaS applications are hosted on the cloud and accessed by customers over the internet through a web browser or dedicated application. Instead of installing and maintaining software locally, users can access and use the applications on-demand, often paying a subscription fee based on usage or features. This cloud-based delivery approach has revolutionized how businesses consume and utilize software, offering many benefits such as lower upfront costs, automatic updates, and access from virtually anywhere with an internet connection.

The SaaS model has gained adoption across industries, helping them to leverage enterprise-grade software without complex installations or maintenance. However, building and managing SaaS applications presents several challenges.

One of the primary challenges is the need to support multi-tenancy, where a single instance of the application serves multiple customers (tenant), each with their own data, configurations, and plans. Ensuring secure isolation between tenants’ data and resources is crucial for maintaining privacy and compliance.

Another significant challenge is scalability. As the customer base grows, SaaS providers must have that robust and flexible architecture in place that is capable of automatically provisioning and deprovisioning resources in response to their new customer (tenants) requests.

Furthermore, SaaS providers must address challenges related to deployment, updates, and maintenance. Deploying application updates and patches across multiple tenants without disrupting service or compromising data integrity is a complex task. Automation and robust deployment strategies are very important for minimizing downtime and ensuring seamless customer experience.

To overcome these challenges and deliver a successful SaaS solution, SaaS providers require a comprehensive suite of tools and frameworks that streamline the development, deployment, and management of multi-tenant applications. This is where solutions like the SaaS Builder Toolkit for AWS and SourceFuse’s ARC Framework come into play, offering powerful capabilities to address the unique requirements of SaaS applications.

SaaS Builder Toolkit for AWS

The SaaS Builder Toolkit for AWS is an open-source project developed in partnership with AWS partners to accelerate the development and deployment of multi-tenant SaaS applications on AWS. This is built on top of the AWS Cloud Development Kit (CDK) and provides a structured approach to building SaaS applications by identifying and codifying the distinct responsibilities of the Control Plane and the Application Plane.

The Control Plane is responsible for managing the multi-tenant aspects of the SaaS application, such as tenant onboarding, offboarding, user management, billing, and metrics. The Application Plane, on the other hand, focuses on the core functionality of the SaaS application itself. The SaaS Builder Toolkit for AWS establishes a clear separation of concerns between these two planes and provides a framework for communication between them through Amazon EventBridge, a serverless event bus.

SaaS Builder Toolkit for AWS defines the interfaces of the messages exchanged between the Control Plane and the Application Plane, ensuring a consistent and standardized approach to multi-tenant SaaS application development.

The SaaS Builder Toolkit for AWS also includes utilities and abstractions to assist with common SaaS workflows, such as tenant provisioning and deprovisioning. These utilities are designed to help developers quickly and easily implement the necessary functionality to respond to events from the Control Plane and manage tenant-specific resources and configurations.

With this, SaaS providers can benefit from a best-practice approach to building multi-tenant SaaS applications on AWS, while maintaining the flexibility to customize and extend the framework to meet their specific requirements.

SourceFuse's ARC Framework

ARC, an open-source rapid application development framework from SourceFuse, is designed to accelerate the development of modern, cloud-native enterprise applications. It provides a comprehensive solution that leverages a catalog of pre-built microservices and a standardized reference architecture for deployment on both private and public clouds.

The ARC framework consists of three key branches: Infrastructure as Code (IaC), API (Backend), and UI (Frontend), each playing a crucial role in building and deploying cloud-native applications with ease and efficiency.

  1. Infrastructure: The IaC branch of ARC focuses on managing and provisioning the underlying infrastructure required to deploy applications. With reusable Terraform modules, developers can define their infrastructure requirements and deploy them consistently across both private and public clouds. This branch ensures the scalability, resilience, and security of the application’s foundation.
  2. Backend: The API branch of ARC provides a collection of reusable microservices and components that power the backend functionality of applications. These microservices, such as authentication, payment, and audit logs, are built on the robust LoopBack framework and designed to reduce development time and enhance productivity. The ARC API enables rapid application development and seamless integration of pre-built services.
  3. Frontend: The UI branch of ARC offers pre-configured boilerplates and components for building modern and responsive user interfaces. Whether developers prefer Angular or React, ARC UI provides a solid foundation to kickstart frontend development. With reusable components like search, navigation, and form elements, developers can accelerate UI development and deliver engaging user experiences.

By leveraging the ARC Stack, developers can focus on building innovative features and business logic without the overhead of repetitive and time-consuming tasks. With a standardized reference architecture and a rich ecosystem of reusable components, ARC empowers developers to build cloud-native enterprise applications with speed, efficiency, and scalability.

ARC’s open-source nature fosters collaboration and encourages community contributions, enabling developers to unlock the potential for rapid application development, seamless integration, and unparalleled productivity.

The Telemedicine Application: A Showcase

As a proof-of-concept (POC), we built a telemedicine SaaS application to showcase the power of combining the SaaS Builder Toolkit for AWS and the SourceFuse ARC Framework. The decision to utilize both the SaaS Builder Toolkit for AWS and ARC was driven by the need to leverage the strengths of both solutions, enabling rapid development of a scalable, multi-tenant SaaS application.

This example application provides a platform for healthcare providers and patients to connect remotely for virtual consultations.

On the control plane side, we incorporated a SaaS Admin portal for managing tenants (which in this case represents individual healthcare organizations or clinics). The SaaS Admin can onboard new tenants, assign them to different tiers based on their subscription plans, and automatically provision the necessary resources on AWS for each tenant.

The deployment of the telemedicine application follows a serverless approach, leveraging AWS CDK to streamline infrastructure provisioning and management. This serverless architecture ensures scalability, cost-efficiency, and reduced operational overhead.

Architecture and Implementation Details

The telemedicine application adheres to the separation of concerns principle, with the SaaS Builder Toolkit for AWS serving as the Control Plane, responsible for multi-tenant management, and the SourceFuse ARC Framework acting as the Application Plane, handling the core functionality of the application.

Above architecture consists of two main components: the Control Plane, powered by SaaS Builder Toolkit for AWS, and the Application Plane, built using ARC by SourceFuse. The Control Plane is responsible for managing tenants and their life cycles, while the Application Plane handles the core functionality of the Telemedicine application.

The Control Plane includes a SaaS Admin Web App built using ARC UI’s React Boilerplate, which allows the SaaS provider to add and manage tenants. Tenant information is stored in Amazon DynamoDB.

In the Application Plane, the telemedicine SaaS App is built using ARC UI’s Angular Boilerplate and leverages various Prebuilt ARC Backend Services, such as Authentication Service, Notification Service, Video Conferencing Service etc. These services are deployed as AWS Lambda functions.

The architecture also includes separate databases for each backend service to ensure data isolation and scalability. Amazon Aurora Serverless is used to automatically scale the database resources based on demand, providing cost-efficiency and performance benefits.

The communication between the Control Plane and the Application Plane is facilitated by Amazon EventBridge. When a tenant is on-boarded or off-boarded, the Control Plane publishes events to EventBridge, which triggers the corresponding Tenant Operation Workflows in the Application Plane. These workflows are orchestrated using AWS Step Functions triggers the AWS CodeBuild process and are responsible for provisioning or deprovisioning tenant-specific resources based on the selected tier (Basic, Standard, or Premium).

In this PoC, we implemented three tenant tiers: Basic, Standard, and Premium. Each tier corresponds to a different resource provisioning strategy:

  1. Basic Tier: Tenants in the Basic tier share a pooled infrastructure, utilizing shared compute resources and databases.
  2. Standard Tier: Tenants in the Standard tier have dedicated databases, while compute resources and frontend deployments are shared among tenants.
  3. Premium Tier: Tenants in the Premium tier enjoy a fully isolated environment, with dedicated compute resources, databases, and frontend deployments, ensuring complete separation from other tenants.

Check out our GitHub Repository to know more about the technical details of this example SaaS Solution.

The combination of the SaaS Builder Toolkit for AWS and the SourceFuse ARC Framework enabled us to rapidly build and deploy the Telemedicine application with a robust multi-tenant architecture, leveraging pre-built components and best practices from both solutions.

Benefits and Advantages

The combination of the SaaS Builder Toolkit for AWS and SourceFuse’s ARC Framework offers numerous advantages for building and deploying multi-tenant SaaS applications. By using the strengths of both solutions, SaaS providers can accelerate their development cycles, ensure scalability, and reduce a big part of architectural overhead.

Accelerated Development: One of the primary advantages of using the ARC Framework is the ability to leverage pre-built microservices it has and so many components for every part of the app with plug and play mechanism. And the SaaS Builder Toolkit for AWS provides a standardized control plane for managing multi-tenant aspects, such as tenant onboarding and offboarding.

By utilizing these, development teams can significantly reduce the time and effort required to build and maintain core functionalities.

Adherence to Best Practices and Architectural Standards: Both the SaaS Builder Toolkit for AWS and the ARC Framework are built on industry best practices and architectural standards. The SaaS Builder Toolkit follows the principles of separating the control plane and the application plane, ensuring a clear separation of concerns and facilitating scalability and maintainability.

Similarly, the ARC Framework promotes a standardized and a consistent approach to development. The automation tooling in ARC for code scaffolding/generation, standardized modules and architectures further helps in following the best practices.

Scalability and Cost-Efficiency: The serverless architecture supported by both the SaaS Builder Toolkit for AWS and the ARC Framework enables scalability and cost-efficiency as also shown in the POC App. By leveraging AWS services like Lambda, API Gateway, and Aurora Serverless, the application can automatically scale resources based on demand, minimizing overhead and reducing operational costs.

Seamless Integration and Extensibility: The SaaS Builder Toolkit for AWS and the ARC Framework are designed with extensibility in mind, developers can customize and extend the functionality as needed.

SaaS providers can leverage this extensibility to integrate third-party services, incorporate custom business logic, or modify the solutions to their specific requirements.

Conclusion

The development of multi-tenant SaaS applications have unique challenges, including the need for efficient tenant management, scalability, and resource isolation. By combining the SaaS Builder Toolkit for AWS and SourceFuse’s ARC Framework, organizations can address these challenges while accelerating the development process.

The SaaS Builder Toolkit for AWS provides a robust control plane for managing multi-tenant aspects, such as tenant onboarding, offboarding, and user management, while the ARC Framework offers a comprehensive set of reusable components and a standardized reference architecture for building cloud-native applications. Together, these solutions enable the rapid development of scalable, secure, and cost-effective SaaS applications.

By leveraging the pre-built components, best practices, and architectural standards embedded in both tools, development teams can focus their efforts on delivering innovative features and business logic, rather than reinventing the wheel for common functionalities.

We invite you to dive into the world of rapid SaaS application development by exploring the following resources:

While the Telemedicine SaaS POC demonstrated the power of combining the SaaS Builder Toolkit for AWS and the ARC Framework in a Serverless environment. Another area of exploration could be the ARC SaaS EKS solution, which provides a container-based approach to multi-tenant SaaS application deployment and management, built by SourceFuse.

Let's talk about accelerating your next SaaS project.