Building a SaaS application using the Twelve Factor App methodology

15%

Increased in team productivity

99.99%

System Uptime and Redundant

100%

Development and Production parity
Twelve-Factor compliant SaaS Application Development

Scaling Enterprise Saas

Click here to download

Customer Overview

Our client, a startup, wanted to build an enterprise-grade SaaS application that centralizes critical information such as utilities, bank statements, medical records, and tax papers into one secure, easily accessible platform. The product vision included secure document sharing with professional providers, real-time alerts on account changes, and co-management features for families. With this ambitious concept, the client partnered with TenUp for saas application development that could turn their ideas into reality.

Project Overview

The client aimed to build a robust SaaS platform deployable across any cloud environment, with seamless scalability to handle demand fluctuations. They also required high process automation to reduce administrative effort and multitenancy to serve multiple users efficiently. To meet these saas application development requirements, we evaluated various design and architecture patterns and chose the Twelve Factor App methodology, a framework for developing scalable SaaS systems.

Challenges

As the approach of saas application development using the 12 factor app methodology is very different from conventional development methodologies, the TenUp team encountered the following challenges:

  • Managing a shared codebase across multiple deployments.
  • Handling dependencies for both a private library (closed source) and the public Java library (open source).
  • Managing environment variables carefully to prevent accidental changes or deployments, while ensuring proper documentation and coordination with the DevOps team.
  • Selecting and managing backing services (databases, caches, queues, etc.) to optimize performance across self-hosted, production, and development environments.
  • Making sure backend services access the same set of configuration files and libraries across all environments, whether self-hosted or third-party hosted.
  • Streamlining DevOps operations and delivery pipelines for multiple applications and repositories across the define, build, and run stages.
  • Designing stateless, timezone-aware applications to ensure the system could serve clients globally.
  • Exposing application services over a port while ensuring REST APIs function correctly with the web server.
  • Developing the application to scale independently while configuring and maintaining concurrency in environments where scaling must occur dynamically at runtime.
  • Building the system to start up quickly and shut down gracefully, while supporting instant dynamic loading and maintaining resilience against potential failures.
  • Ensuring development and production parity by configuring all backing services on-premise and maintaining a tool stack and build/release operations closely aligned with the production environment.
  • Aggregating, storing, and searching log events by implementing a cloud-based logging tool that allows developers to access, troubleshoot, and easily ship log streams.
  • Automating administrative processes to minimize day-to-day monitoring and reduce the overall admin workload through maximum process automation.

Solution

We combined the Twelve Factor App methodology with saas application development best practices to build a robust product ahead of schedule, overcoming key challenges along the way.

  • Created a separate GIT repository to manage the library of code that is shared between modules. This shared code acts as dependency for other modules.
  • Used JFrog Artifactory to manage the Maven dependencies for both closed source and open source artifacts. Published our shared library on JFrog and configured the Maven repository to utilize the JFrog instance.
  • Defined a clear path for developers, ensuring they accessed config information only via environment variables and documented all their changes.
  • Selected backing services to ensure all the application environments (dev/staging/production) could be installed on-premises, connecting with a similar set of configuration files and libraries.
  • Leveraged Atlassian Bamboo to establish a continuous integration and continuous deployment (CI/CD) pipeline.
  • Developed stateless services capable of scaling out by continuously reviewing the code to avoid stateful processes, validating behavior through smoke tests on multiple instances, and leveraging AWS S3 for storage along with Hazelcast IMDG for distributed caching and process locking.
  • Exposed all services over specified ports using the Spring Boot framework, enabling self-contained services to communicate seamlessly with other components.
  • Achieved dynamic scalability and concurrency by configuring AWS Auto Scaling Groups (ASG) with an Application Load Balancer (ALB), allowing node instances to automatically scale up or down based on demand.
  • Improved system startup and shutdown times by implementing a lazy loading design, deferring object initialization until needed, and enforcing an internal policy for the system to start within 15–20 seconds under any conditions.
  • Maintained development and production parity by installing all backing services consistently across environments, enabling automated infrastructure provisioning and build/deployment processes.
  • Implemented Splunk Storm as a cloud-based log aggregator and management tool to centralize logs and facilitate troubleshooting.
  • Utilized Flyway for database migration, automating default data setup for admin processes, detecting pending database operations, preventing server startup on script changes to avoid data errors, and reducing manual database tasks to accelerate deployment, startup, and shutdown.

Business

Our saas application development efforts using the Twelve Factor App methodology provided the following advantages to our client:

  • The twelve factor app is highly portable and can be deployed on any cloud service the client chooses.
  • A 100% stateless design eliminates session stickiness, enabling seamless scaling for both high and low traffic, while optimizing resource usage and reducing costs.
  • It provides high resiliency, remaining operational 24/7 even in disaster recovery scenarios.
  • The twelve factor app is easily maintainable with efficient dependency management and process automation, simplifying ongoing maintenance.
  • Sensitive information and user credentials are handled following improved security and code practices, storing them in environment variables instead of code repositories.
  • Automated and efficient operational tasks reduce administrative effort and DevOps workload, cutting operational costs and improving overall efficiency.

Technology

  • Git
  • JFrog Artifactory
  • Maven
  • Atlassian Bamboo
  • AWS S3
  • Hazelcast IMDG (In-Memory Data Grid)
  • Spring Boot framework
  • AWS Auto Scaling Groups (ASG)
  • AWS Application Load Balancer (ALB)
  • Splunk Storm
  • Flyway

Industry

  • SaaS
Time-bound SaaS Application Development

Conclusion

Tenup Software Services undertook the development of a robust, cost-effective, and future-proof SaaS application that empowered our client to compete with the biggest players in its industry. Despite having to change our mindset and development approach to adopt the Twelve Factor App methodology, we were able to meet all of our client’s goals in record time. The successful outcome of the project made all the effort worthwhile.

Frequently asked questions

What is the Twelve Factor App methodology in SaaS application development?

faq arrow

The Twelve Factor App methodology is a cloud-native framework for building scalable, maintainable, and portable SaaS applications. It defines twelve best practices, including covering codebase, dependencies, configuration, processes, and deployment, to ensure consistency, automation, and rapid scaling across development, staging, and production environments.

Why is the Twelve Factor App important when building a SaaS application?

faq arrow

The Twelve Factor App is vital for SaaS development because it ensures scalability, portability, and reliability across cloud environments. By standardizing configuration, deployment, and automation, it enables faster CI/CD, reduces technical debt, and supports resilient, cost-efficient SaaS applications that adapt easily to growing user demands.

What are the main benefits of adopting the twelve factor app methodology?

faq arrow

Adopting the Twelve Factor App methodology enhances scalability, portability, and maintainability for cloud-native SaaS applications. It streamlines deployments, improves configuration management, supports CI/CD automation, and ensures consistent performance across environments, helping teams deliver updates faster while maintaining reliability and developer efficiency.

How does the Twelve Factor App help in modern cloud-based SaaS application development?

faq arrow

The Twelve Factor App methodology enables cloud-native SaaS applications to scale seamlessly, deploy faster, and remain portable across platforms, like AWS, Azure, and Google Cloud. By promoting stateless design, automation, and consistent environments, it ensures reliability, agility, and cost-efficient scaling for modern, high-traffic SaaS products.

How does the Twelve Factor methodology impact SaaS scalability?

faq arrow

The 12 factor app methodology enhances SaaS scalability by promoting stateless processes, externalized configurations, and horizontal scaling. This allows applications to handle growing traffic seamlessly, deploy across multiple cloud platforms, and scale individual components independently, ensuring consistent performance, elasticity, and efficient resource utilization in modern cloud-native environments.

What are some real-world use cases of the Twelve Factor App in SaaS development?

faq arrow

Many SaaS leaders, such as Slack, Shopify, and Salesforce, adopt principles consistent with the Twelve Factor methodology to build scalable, portable, and resilient applications. These practices enable seamless cloud deployment, consistent updates, efficient CI/CD integration, and smooth management of distributed teams, ensuring high availability and faster feature delivery in modern SaaS environments.

How can businesses start implementing the Twelve Factor App methodology?

faq arrow

Businesses can start by auditing their codebase and applying key Twelve Factor App practices: version-control a single repository, explicitly manage dependencies, externalize configuration via environment variables, treat backing services as attachable resources, separate build and run stages, and design stateless processes for scalable, cloud-ready SaaS applications.

What are some of the development practices that we can adopt to build Twelve Factor applications?

faq arrow

Key practices for building Twelve Factor applications include maintaining a single version-controlled codebase, explicitly managing dependencies, using environment variables for configuration, treating backing services as external resources, separating build and run stages, designing stateless processes, enabling fast startup and graceful shutdown, and automating deployments for scalable SaaS applications.

Download Case Study
Contact us