Skip to main content

Backend - Tech Stack

Overview

OX Agry is built using a modern, cloud-native microservices architecture with GraphQL federation. This document outlines the complete technology stack and tooling decisions for the project.

Core Architecture

Backend Framework

  • NestJS - Node.js framework for building scalable server-side applications
  • GraphQL API - Query language and API standard for flexible data fetching
  • Apollo Federation - Distributed GraphQL architecture for microservices

Repository & Development

  • Nx Monorepo - Monorepo management with build system and dev tools
  • Microservices Architecture - Service-oriented architecture pattern
  • GitLab - Source code management and CI/CD platform

Container Orchestration & Cloud

  • Kubernetes - Container orchestration platform
  • Google Kubernetes Engine (GKE) - Managed Kubernetes service on Google Cloud
  • Helm - Kubernetes package manager for application deployment

Data Layer

Database & ORM

  • PostgreSQL - Primary relational database
  • Prisma ORM - Type-safe database client and query builder
  • Prisma Postgres - Managed PostgreSQL hosting service

Caching & Message Queue

  • Redis Cloud - Managed Redis service for caching and session storage
  • CloudAMQP - Managed RabbitMQ service for message queuing

Security & Authorization

Access Control

  • OpenFGA - Fine-grained authorization system based on Google Zanzibar

Secret Management

  • Google Secret Manager - Primary secret management service
  • HashiCorp Vault - Advanced secret management (planned for future implementation)

Code Quality & Testing

Code Quality

  • ESLint & Prettier - Code linting and formatting (built into NestJS)
  • SonarQube - Code quality analysis (optional, planned for later)

Testing Framework

  • Jest - Unit testing framework
  • Jest - End-to-end testing framework
  • Grafana k6 - Load and performance testing

DevOps & Infrastructure

Infrastructure as Code

  • Terraform - Infrastructure provisioning and management

GitOps & Deployment

  • ArgoCD - GitOps continuous delivery for Kubernetes

Container Registry

  • GitLab Container Registry - Docker image storage and management

Service Mesh

  • Google Cloud Service Mesh - Managed service mesh for microservices communication

Monitoring & Observability

Monitoring & Logging

  • Google Cloud Operations Suite - Comprehensive monitoring, logging, and error tracking
    • Application Performance Monitoring
    • Log aggregation
    • Error tracking and alerting

Networking & DNS

DNS Management

  • Cloudflare - DNS management and CDN services

Local Development Ingress

  • Traefik - Modern HTTP reverse proxy and load balancer

Local Development Environment

Development Tools

  • WebStorm - Modern IDE for JavaScript and TypeScript development
  • Minikube - Local Kubernetes cluster for development
  • Skaffold - Continuous development workflow for Kubernetes applications

Documentation

Documentation Platform

  • Docusaurus - Static site generator for project documentation

Technology Stack Summary

CategoryPrimary ToolAlternative/Future
BackendNestJS + GraphQL-
ArchitectureMicroservices + Apollo Federation-
RepositoryNx Monorepo-
OrchestrationKubernetes (GKE)-
DatabasePostgreSQL + Prisma-
CachingRedis Cloud-
Message QueueCloudAMQP (RabbitMQ)-
AuthorizationOpenFGA-
SecretsGoogle Secret ManagerHashiCorp Vault
TestingJest + k6-
Code QualityESLint + PrettierSonarQube
IaCTerraform-
GitOpsArgoCD-
Service MeshGoogle Cloud Service Mesh-
MonitoringGoogle Cloud Operations-
DNSCloudflare-
RegistryGitLab Container Registry-
Local DevMinikube + Skaffold + WebStorm-
DocumentationDocusaurus-

Architecture Principles

  1. Cloud-Native First - Built for Kubernetes and cloud environments
  2. Microservices Pattern - Independently deployable services with GraphQL federation
  3. Infrastructure as Code - All infrastructure defined and versioned in code
  4. GitOps Workflow - Automated deployments based on Git state
  5. Observability by Design - Comprehensive monitoring and logging from the start
  6. Security-First - Fine-grained authorization and proper secret management
  7. Developer Experience - Modern tooling for efficient development workflows

Getting Started

For detailed setup instructions and development guidelines, please refer to the individual service documentation.