Frontend: The B2B SaaS application’s frontend is built using React with TypeScript for type safety and leverages Material UI (MUI) for a consistent and modern user interface.
Backend: The backend utilizes Next.js, a framework for building server-side rendered React applications.
Database: The database is PostgreSQL, by default hosted on Firebase. PostgreSQL provides the flexibility to migrate to other hosting providers in the future. If a document style database is needed for any given function or object we counsel the use of the JSON column format in PostgreSQL.
Testing: Testing employs Jest for unit and integration tests, primarily conducted manually. Firebase Test Lab is used for automated testing across various devices.
Deployment: Deployment is handled through Firebase Hosting.
Source Control: GitHub is the chosen platform for source code management.
CI/CD: Continuous integration and continuous deployment are automated using GitHub Actions, streamlining builds, testing, and deployments.
Development Environment: Developers use Cursor as their primary development environment. Code quality is maintained through ESLint, with rulesets tailored for TypeScript and React.
User Authentication: The application supports first-party authentication with username/password combinations. Primary federated authentication is provided via LinkedIn, Google Workspace, or Microsoft Entra. Secondary federated authentication with other social networks will be added over time. The primary focus is getting the users to sign-up using Federated approaches with the username / password as a fallback option. Implementation would use the Firebase standard Authentication models.
Design and User Interface: Figma is used for design and user interface development.
Monitoring: Monitoring is comprehensive, incorporating Google Analytics for Firebase to track user behavior, Firebase Performance Monitoring to analyze application performance, and the Google Cloud Functions logger SDK for logging. Error tracking will be implemented using a service like Google Cloud Functions and logging for now and conform to Firebase best practices.
Feature Flagging – Firebase Remote Config is used for feature flagging.
Project Management: Project tracking will be managed, initially, through included GitHub Projects. We expect to migrate to Jira as we get more scale. As you get more advanced you can use Jira boards or Trello boards
Product and Development Documentation – Confluence.
Development Users: Development users are managed through Google Workspace and will be setup and configured by the DevOps Team
Cloud Administration: Cloud administration encompasses Google Cloud setup and administration, covering user management and deployment management, as well as federated identity services – notably Microsoft Entra and LinkedIn app setup and administration.
LLMs: Administration of Large Language Models (LLMs) involves setting up and tracking separate accounts per company, typically for Gemini, ChatGPT, and Perplexity. GenKit is used as the backend LLM library, while Vertex is used on the client side.
In System Messaging: Firebase Cloud Messaging is utilized for server-to-client notifications, including in-app user guidance and messages. Future native mobile app development will leverage Firebase’s in-app messaging capabilities for onboarding and user guidance.
Payments System Setup: Stripe and Stripe Billing are integrated for payment processing.
Third Party API Administration: API account setup and tracking for application-specific functions are handled as needed. Specific APIs include ProxyCURL, Diffbot, and Never Bounce for email verification.
Integration Management: Prismatic is used for integration management, providing a SaaS integration layer to avoid building integrations in-house.
Rationale for Technical Environment
This section outlines the reasoning behind the key technology choices for the technical environment. Each decision was made to balance scalability, developer productivity, maintainability, and cost-effectiveness. If any of these choices need to be revisited in the future due to evolving requirements, performance concerns, or cost constraints, this document serves as a reference point for why the decisions were originally made.
React + Node.js + Material UI
The frontend of our SaaS application is built with React and Material UI, while the backend utilizes Node.js. This choice was driven by several key factors:
- Industry-Standard Technologies: React, Node.js, and Material UI are widely used across the software development industry, ensuring long-term support and community-driven improvements.
- Developer Availability: These technologies have extensive adoption, making it easy to find and onboard developers with relevant experience.
- Standardized Development Environment: Using React and Node.js enables us to maintain a common source code layout and best practices, reducing the learning curve for new developers.
- Modern and Developer-Friendly: React and Material UI offer a sleek, component-based approach to UI development, while Node.js ensures flexibility and efficiency in handling backend services. This stack attracts developers who are excited to work with modern, in-demand technologies.
Why We Chose PostgreSQL as the Database
We selected PostgreSQL as the primary database due to its structured approach, flexibility, and long-term scalability:
- Structured Data Model: PostgreSQL enforces schema consistency, ensuring that the data model remains well-organized and thoughtfully architected.
- Flexible for Unstructured Data: While PostgreSQL is a relational database, it includes support for JSON fields, allowing us to store and query semi-structured data when needed, without the overhead of a separate document database.
- Optimized Performance: PostgreSQL offers powerful indexing, structured queries, and optimized performance for complex queries, making it a solid choice for analytics and transactional workloads.
- Forces Thoughtful Design: By requiring schema definitions, PostgreSQL encourages developers to plan data structures carefully, leading to better long-term maintainability and fewer technical debt issues.
Why We Chose Firebase but Want to Maintain Migration Path to Supabase
Our choice of Firebase for backend infrastructure is based on its scalability, security, and ease of deployment. However, we are also keeping an eye on Supabase as a potential alternative for cost-related reasons:
- Scalability: Firebase’s serverless environment allows us to scale effortlessly as demand grows, reducing operational overhead and infrastructure management.
- Security & Integration: Firebase integrates seamlessly with Google Workspace, Google Cloud IAM, and other security frameworks, providing a consistent approach to authentication and access control.
- Cost Considerations: While Firebase is cost-effective at small and medium scales, certain workloads could become expensive. Supabase offers a more traditional PostgreSQL-based backend with similar functionality, providing an alternative if cost concerns arise in the future.
- Migration Strategy: Since Supabase supports PostgreSQL, we maintain compatibility by designing our database architecture in a way that allows for an easy transition if needed.