Technology Stack
CORTEX is built on modern, battle-tested technologies chosen for reliability, developer experience, and scalability.
Backend Stack
Runtime & Framework
| Technology | Version | Purpose |
|---|---|---|
| Node.js | 20 LTS | JavaScript runtime |
| NestJS | 10.x | Backend framework |
| TypeScript | 5.x | Type-safe JavaScript |
Database & ORM
| Technology | Version | Purpose |
|---|---|---|
| PostgreSQL | 16 | Primary database |
| Prisma | 5.x | ORM & migrations |
| Redis | 7 | Caching & sessions |
Authentication & Security
| Technology | Purpose |
|---|---|
| Passport.js | Authentication strategies |
| JWT | Stateless tokens |
| Argon2 | Password hashing |
| Helmet | Security headers |
Frontend Stack (cortex-web)
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 14 | React framework |
| TypeScript | 5.x | Type safety |
| Ant Design | 5.x | UI components |
| Tailwind CSS | 3.x | Styling |
| Zustand | 4.x | State management |
| TanStack Query | 5.x | Data fetching |
DevOps & Infrastructure
Cloud & Infrastructure
| Technology | Purpose |
|---|---|
| Microsoft Azure | Cloud platform |
| Azure Container Apps | Container hosting |
| Azure Database for PostgreSQL | Managed database |
| Azure Cache for Redis | Managed Redis |
| Azure Service Bus | Message queue |
CI/CD
| Technology | Purpose |
|---|---|
| Azure DevOps | CI/CD pipelines |
| Docker | Containerization |
| Terraform | Infrastructure as Code |
Development Tools
| Tool | Purpose |
|---|---|
| Turborepo | Monorepo management |
| pnpm | Package management |
| ESLint | Code linting |
| Prettier | Code formatting |
| Jest | Testing framework |
| Husky | Git hooks |
API & Documentation
| Technology | Purpose |
|---|---|
| Swagger/OpenAPI | API specification |
| Scalar | API documentation UI |
| Docusaurus | Documentation portal |
Why These Choices?
NestJS
- Enterprise-ready: Built-in support for common patterns
- TypeScript-first: Full type safety
- Modular: Clean separation of concerns
- Testable: Dependency injection for easy testing
- Ecosystem: Rich plugin ecosystem
PostgreSQL
- ACID compliant: Data integrity guaranteed
- Feature-rich: JSON support, full-text search, extensions
- Scalable: Read replicas, partitioning
- RLS support: Row Level Security for tenant isolation
Prisma
- Type-safe: Generated types from schema
- Migrations: Declarative schema changes
- Query building: Intuitive, type-safe queries
- Performance: Query optimization, connection pooling
Redis
- Fast: In-memory data store
- Versatile: Caching, sessions, rate limiting
- Pub/Sub: Real-time capabilities
- Persistence: Optional data durability
Azure
- Enterprise: SOC 2, HIPAA, GDPR compliance
- Managed services: Less operational overhead
- Integration: Seamless service integration
- Global: Multi-region deployment options
Version Requirements
{
"engines": {
"node": ">=20.0.0",
"pnpm": ">=8.0.0"
}
}
Security Libraries
| Library | Purpose |
|---|---|
helmet | HTTP security headers |
argon2 | Password hashing |
class-validator | Input validation |
class-transformer | DTO transformation |