Skip to content

Technology Stack

GSign платформын технологийн стек.

Backend (Go)

TechnologyVersionPurpose
Go (Golang)1.21+Main backend language
Fiber v2LatestHigh-performance web framework
PostgreSQL16Primary database (pgx driver)
MongoDB7Document storage, audit logs
Redis7Caching, sessions, queues
AsynqLatestDistributed task queue
AWS S3-Document storage (aws-sdk-go-v2)

Go Libraries

go
// Web Framework
github.com/gofiber/fiber/v2

// Database
github.com/jackc/pgx/v5           // PostgreSQL
go.mongodb.org/mongo-driver       // MongoDB

// Authentication
github.com/golang-jwt/jwt/v5      // JWT
golang.org/x/crypto/bcrypt        // Password hashing

// PKI & Crypto
crypto/x509                       // X.509 certificates
github.com/digitorus/pkcs7        // PKCS#7 signatures
github.com/pdfcpu/pdfcpu          // PDF manipulation

// Task Queue
github.com/hibiken/asynq          // Background jobs

// Logging
github.com/rs/zerolog             // Structured logging

Frontend (Next.js)

TechnologyVersionPurpose
Next.js14+React framework (App Router)
TypeScript5.xType safety
Tailwind CSS3.xUtility-first styling
Shadcn/uiLatestComponent library
ZustandLatestState management
TanStack Queryv5Data fetching & caching
React PDFLatestPDF document viewer
React Signature CanvasLatestSignature capture

Frontend Structure

gsign-frontend/
├── src/
│   ├── app/                 # Next.js App Router
│   │   ├── (auth)/          # Auth routes
│   │   ├── (dashboard)/     # Dashboard routes
│   │   └── api/             # API routes
│   ├── components/          # React components
│   │   ├── ui/              # Shadcn/ui components
│   │   └── ...
│   ├── lib/                 # Utilities
│   ├── hooks/               # Custom hooks
│   ├── stores/              # Zustand stores
│   └── types/               # TypeScript types
├── public/                  # Static assets
├── tailwind.config.ts
└── next.config.mjs

Infrastructure

ServiceTechnologyPurpose
Container RuntimeDockerApplication containers
OrchestrationDocker ComposeContainer orchestration
Reverse ProxyNGINXLoad balancing, SSL
CI/CDGitLab CIBuild, test, deploy
MonitoringPrometheus + GrafanaMetrics & dashboards
LoggingLoki + PromtailLog aggregation
SSLLet's EncryptHTTPS certificates

Database Schema

PostgreSQL Tables

sql
-- Core tables
users, organizations, teams
documents, envelopes, recipients
signatures, signature_fields
templates, template_fields
certificates, certificate_operations
audit_logs, webhook_events
api_keys, oauth_tokens
subscriptions, usage_records

MongoDB Collections

javascript
// Document metadata
documents
audit_events
webhook_deliveries

Redis Keys

session:{id}              # User sessions
cache:user:{id}           # User cache
queue:email               # Email queue
rate_limit:{ip}           # Rate limiting

Security Stack

FeatureImplementation
AuthenticationJWT with refresh tokens
Password Hashingbcrypt
API AuthAPI keys + OAuth 2.0
Rate LimitingFiber limiter middleware
HTTPSLet's Encrypt + NGINX
HeadersFiber security middleware
PKIX.509 certificates, PKCS#7

Version History

v1.0 → v1.1 Changes

ComponentBeforeAfter
BackendNode.js + ExpressGo + Fiber v2
FrontendReactNext.js 14+
StylingMaterial-UITailwind CSS + Shadcn/ui
TestingJestVitest (frontend), Go testing (backend)
Task QueueBull (Redis)Asynq (Go-native)
LoggingWinstonzerolog

GSign Digital Signature Platform