Technology Stack
A modern, scalable architecture built on proven technologies and best practices, designed for performance, security, and maintainability. Flexible implementation options to match your infrastructure preferences.
Implementation Options
Option A: Next.js Full-Stack
Unified framework with server-side rendering and API routes
Next.js 14+
React framework with SSR, routing, and API routes
React 19
Modern UI with concurrent features and server components
TypeScript
Type-safe development across frontend and backend
Tailwind CSS 4
Utility-first styling with CSS-in-JS
Option B: Express + Vite (Current)
Separated concerns with dedicated frontend and backend
Express.js
Fast, unopinionated web framework for Node.js
Vite + React 19
Lightning-fast build tool with HMR
tRPC
End-to-end type-safe APIs without code generation
Tailwind CSS 4
Utility-first styling with modern features
Cloud-Native Architecture on Azure
The Sela Estimation Platform leverages Azure cloud infrastructure with a scalable, microservices-ready architecture. The system supports both Next.js full-stack and Express+Vite separated approaches, ensuring flexibility for your deployment preferences while maintaining enterprise-grade security and performance.
Core Technology Stack
Frontend
React 19
Modern UI framework with concurrent features
TypeScript
Type-safe development and better tooling
Tailwind CSS 4
Utility-first styling for rapid development
Recharts
Composable charting library for data visualization
Framer Motion
Production-ready animation library
Backend & API
Node.js 22
High-performance JavaScript runtime
Next.js API Routes / Express
RESTful APIs or tRPC for type-safe calls
SuperApp Authentication
Delegated auth with token validation
Drizzle ORM
Type-safe database queries and migrations
Database & Caching
PostgreSQL
Primary relational database for structured data
Redis
Caching, rate limiting, and job queue management
Vector Database
Document embeddings for semantic search (RAG)
Azure Blob Storage
Document storage (PDF, DOCX, Excel, images)
AI & ML Services
OpenAI GPT-4
Advanced LLM for estimation and natural language
Anthropic Claude
Document understanding and analysis
OCR Service
Text extraction from uploaded documents
RAG Architecture
Conversational agent with document context
External Integrations
Google Maps/Places
Location intelligence and geographic cost factors
Deep Web Search API
Market rates and competitor pricing data
SuperApp API
User authentication and session management
OCR Document Intelligence
Multi-format document processing
Infrastructure (Azure)
Azure VMs
Hosting Next.js/Express application
Azure Blob Storage
Document storage and generated reports
Azure Database for PostgreSQL
Managed database service
Azure Redis Cache
Managed Redis for caching and queues
System Architecture
Presentation Layer
User interface and client-side logic
API Gateway
Request routing, authentication, and rate limiting
Business Logic
Core estimation algorithms and workflow orchestration
Data Layer
Persistent storage and data management
Integration Layer
External services and data sources
Application Source Structure
Turborepo Monorepo (Option A)
Organized package structure with shared libraries
Single Repository (Option B - Current)
Simplified structure with clear separation
Environment Strategy
Development
Local development with hot reload and debugging
Staging
Pre-production testing environment
Production
Live environment with full monitoring
Performance Metrics
Response Time
Average API response time
Uptime
Service availability guarantee
Concurrent Users
Simultaneous active users supported
Document Processing
Documents processed per hour
Security & Access Control
SuperApp Authentication
Token-based auth with session management and user context propagation
Data Encryption
TLS for data in transit, encryption at rest for database and blob storage
Redis Rate Limiting
API endpoint protection and AI service cost management
Access Control
Role-based permissions for sensitive financial estimates
Scalability & Azure Infrastructure
The platform architecture is designed to scale horizontally on Azure, supporting growth from tens to thousands of users without performance degradation. Key scalability features include:
- •Azure VMs with auto-scaling adjust compute resources based on demand
- •Managed PostgreSQL with read replicas for high-availability
- •Redis caching minimizes database load and accelerates response times
- •Azure Blob Storage with CDN for global document delivery
- •Background job processing with Redis queues for document OCR and AI tasks

