Skip to main content

SalesFam Platform — Technology Stack

Document Version: 1.0 Status: Draft / Active Review Parent Document: SalesFam Platform — Technical Specification

1. Purpose

Defines the technology foundation selected for developing, operating, testing, and maintaining the SalesFam platform. The stack is intended to support the platform's marketplace, sales representative, CRM, referral attribution, payment, financial, and administrative functionality while keeping the system maintainable and scalable.

2. Frontend

TechnologyPurpose
Next.jsWeb application framework, routing, rendering, and public/customer-facing pages
TypeScriptType-safe application development
Tailwind CSSStyling and responsive UI development
shadcn/uiReusable and accessible UI components
React Hook FormForm state and submission management
ZodClient-side schema validation
axiosHTTP client for communicating with the SalesFam REST API
motionUI animations and interactive motion effects
nprogressDisplays page and navigation loading progress
sonnerUser-facing toast notifications and feedback messages
zustandLightweight client-side state management
TanStack React QueryServer-state fetching, caching, synchronization, and mutation management
TanStack React TableTable functionality for sorting, filtering, pagination, and data display

3. Backend

TechnologyPurpose
Node.jsBackend runtime
Express.jsREST API and HTTP request handling
TypeScriptType-safe backend development
PrismaDatabase access, schema management, and migrations
ZodServer-side request and data validation
Argon2id or bcryptSecure password hashing
JWTAccess authentication
dotenvLoads environment variables from configuration
EJSServer-side HTML templating, primarily for dynamic email templates
ioredisRedis client for rate limiting, caching, and asynchronous infrastructure
NodemailerTransactional email delivery
WinstonApplication logging and structured log management
mysql2MySQL driver for database connectivity when required
heHTML entity encoding and decoding for safe HTML handling
HelmetHTTP security headers and common Express security protections

4. Database & Supporting Infrastructure

TechnologyPurpose
MySQLPrimary transactional database and source of truth
RedisCaching, rate limiting, and queue infrastructure

:::danger Data Integrity Rule Redis shall not be used as the authoritative source for orders, commissions, ledger records, settlements, or payouts. :::

5. API & Documentation

TechnologyPurpose
RESTPrimary application API architecture
Swagger UIInteractive API documentation

6. Email & Notifications

TechnologyPurpose
NodemailerTransactional email delivery
SMTP / Email ProviderExternal email delivery service

The email provider will be selected separately based on production requirements.

7. Testing

TechnologyPurpose
Unit Testing FrameworkTesting isolated business logic and services
Integration/API Testing FrameworkTesting API behavior and component integration
End-to-End Testing FrameworkTesting critical user flows

Specific frameworks not yet selected.

8. Code Quality & Development Tools

TechnologyPurpose
HuskyGit hooks for enforcing checks before commits/pushes
ESLintStatic analysis and code quality
PrettierCode formatting
lint-stagedRun validation checks only on staged files
GitVersion control
GitHubRepository, collaboration, and code review

9. Infrastructure & Deployment

Not yet defined.

10. External Service Boundary

External services should be introduced only where the platform requires functionality that should not be implemented internally. Examples include:

  • Payment providers
  • Email delivery providers
  • Payout providers
  • External commerce integrations

External services must integrate through clearly defined application boundaries so that core SalesFam business logic does not become tightly coupled to a single provider.

11. Technology Selection Principles

SalesFam should use the minimum set of technologies required to satisfy its functional and technical requirements. New technologies or infrastructure should be introduced only when they provide a clear architectural, security, performance, or operational benefit.

Technology selection should prioritize:

  • Maintainability
  • Security
  • Reliability
  • Clear separation of responsibilities
  • Developer productivity
  • Appropriate scalability
  • Operational simplicity

The technology stack should evolve only when justified by a documented requirement or architectural need.