Skip to main content

7. Architecture and Infrastructure

Overview of the System's Architecture

Our system's architecture is designed to provide a balance of efficiency, scalability, and security. Below is a high-level overview of how our systems interconnect:

System Architecture

Key Components and Their Interactions

  1. Google Domains DNS: Our primary DNS service, directing incoming traffic to our Nginx Reverse Proxy.

  2. Nginx Reverse Proxy: This component is responsible for evaluating incoming requests and routing them based on their nature:

    • API Requests: If a request hits an endpoint starting with /api/v1/, it's deemed to be an API call and is forwarded to our ExpressJS backend.
    • Static/Other Requests: All other requests are served by our ReactJS application.
  3. ExpressJS App: This backend application handles data processing, business logic, and interaction with our databases and services.

    • Amazon S3: Express interacts with S3 primarily for storing and retrieving uploaded assets, like images.
    • PostgreSQL on Amazon RDS: Our primary database. ExpressJS queries this database for data storage, retrieval, and manipulation.
  4. ReactJS App: Our frontend application. This application presents data to the users and communicates with our ExpressJS backend for data retrieval and actions. Additionally:

    • It interacts directly with Amazon S3 to retrieve certain assets, such as images.
    • It communicates with the ExpressJS app for dynamic data needs.

Key Design Choices and Reasoning

  • Separation of API and Static Content with Nginx: Using Nginx as a reverse proxy allows us to efficiently route traffic based on its purpose. It ensures that our ExpressJS backend only handles the API calls it needs to, while our ReactJS frontend serves static content and user interfaces.

  • Using Amazon S3 for Asset Management: Leveraging S3 for asset storage gives us scalable, secure, and performant storage solutions without the need for extensive infrastructure management.

  • PostgreSQL on Amazon RDS: We chose this because of its reliability, scalability, and ease of management on the AWS platform. RDS allows us to focus on application logic without being bogged down by database maintenance tasks.

We continuously evaluate our architecture and make adjustments based on performance metrics, evolving requirements, and emerging technologies to ensure optimal performance and user satisfaction.