Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ti-infinite/GSMApplication/llms.txt

Use this file to discover all available pages before exploring further.

GSM Application is a production-grade SaaS platform designed for agricultural operations companies that need strict data isolation between tenants. Each company (tenant) gets its own dedicated SQL Server database, ensuring that crop records, field operations, and user data are never commingled. The platform is composed of a React single-page application, a YARP-based API gateway, and three .NET microservices — all orchestrated with Docker Compose and deployable to any environment that can run containers. The system is built around a CompanyId claim that flows through every authenticated request. After a successful login, the gateway validates the JWT, extracts the companyId claim, and injects it as an X-Company-Id header before forwarding the request downstream. Microservices never trust a client-supplied company identifier — they rely exclusively on the gateway-injected header, which means tenant routing is enforced at the network boundary rather than in application code.

Key Capabilities

Database-Per-Tenant Isolation

Every company gets its own SQL Server database, resolved at runtime through a central TenantRegistryDb. No cross-tenant queries are possible by design.

YARP API Gateway

A single entry point validates JWTs, strips client-supplied tenant headers, and routes requests to the correct microservice cluster based on URL path prefix.

Agricultural Operations Domain

Core microservices cover authentication (gsmauth), application metadata like menus and profiles (gsmapplication), and field operations (gsmoperations).

Internationalised React SPA

The Vite + React 19 frontend supports English and Spanish via i18next, with client-side routing prefixed by locale (/en/, /es/).

Platform Overview

The platform ships as five Docker containers that communicate over a private bridge network (gsm-network). The frontend is a compiled static bundle served by Nginx; the backend services are ASP.NET Core 8 applications. There is no service mesh or sidecar — the gateway handles all cross-cutting concerns including JWT validation, tenant header injection, and health checking.

System Architecture

Understand the five-container topology, YARP route table, JWT flow, and the tenant registry pattern.

Local Setup

Clone the repo, configure your .env file, provision databases, and run the full stack with a single docker compose up --build.

Environment Variables

Complete reference for every environment variable used across all services, including YARP cluster addresses and JWT settings.

Database Setup

Provision the central tenant registry and create per-tenant databases with the correct schema for password hashing.

Who Is GSM Application For?

GSM Application targets agricultural operations businesses that:
  • Operate multiple companies or subsidiaries under one platform deployment
  • Require strict regulatory or contractual data segregation between tenants
  • Need a centrally managed authentication service with per-tenant user stores
  • Want a containerised, cloud-portable stack deployable to AWS, Azure, or on-premises infrastructure
The frontend is deployed to AWS S3 + CloudFront via GitHub Actions. The main, quality, and develop branches map to frontend-prod, frontend-qa, and frontend-dev environments respectively, each with its own S3 bucket and CloudFront distribution.

Build docs developers (and LLMs) love