Skip to content

Technologies

Elisa Du edited this page May 12, 2025 · 4 revisions

Technologies & Selection Motivation


This section details the core technologies chosen for the project, the rationale behind each selection, and their application scenarios.

1. Backend Framework: Node.js + Express

  • Asynchronous, Non-Blocking I/O
    Node.js’s event-driven model and async I/O allow it to handle many concurrent requests efficiently, improving overall throughput.
  • Lightweight, Flexible Micro-Framework
    Express provides only core routing and middleware capabilities, without enforcing specific project structures or ORMs—perfect for rapid iteration and bespoke architecture.
  • Team Familiarity
    JavaScript is ubiquitous across frontend and backend, reducing the learning curve and enabling shared libraries and tooling.

2. Containerization & Local Development: Docker, Docker Compose, LocalStack

  • Docker
    • Environment Consistency: Identical images in dev, test, and prod eliminate “works on my machine” issues.
    • Resource Isolation: Container boundaries keep dependencies and ports separate, preventing conflicts.
  • Docker Compose
    • Multi-Container Orchestration: One command spins up backend, Redis, LocalStack, frontend, etc., streamlining setup and integration tests.
    • Planned to upload to Docker Hub in the future for easy distribution, version control, and deployment of containerized applications across different environments and teams.
  • LocalStack
    • AWS Service Emulation: Locally mocks S3, DynamoDB, SQS, SNS, and more, allowing cloud-API development without internet access or costs.
    • CI/CD Friendly: Quickly start and tear down AWS-like services in pipelines, ensuring parity between CI and local environments.

3. Caching: Redis

  • High Performance
    In-memory storage yields <1 ms response times, ideal for session management and hot-data caching.
  • Advanced Data Structures
    Strings, hashes, lists, sets, and sorted sets support leaderboards, delayed queues, distributed locks, and more.

4. Object Storage: S3 (Emulated via LocalStack Locally)

  • Cost-Effective & Elastic
    Pay-as-you-go pricing with automatic lifecycle policies for tiered storage and cleanup of infrequently accessed objects.
  • Local Testing
    LocalStack’s S3 API compatibility ensures code behaves identically in local and production environments.

5. Frontend Framework: React

  • Component-Based Architecture
    Reusable function/class components simplify complex UIs and improve maintainability.
  • Vast Ecosystem
    Seamless integration with Redux, React Router, Ant Design, Material-UI, etc.; extensive community resources and tutorials.
  • TypeScript Support
    Official type definitions (@types/react) and excellent IDE IntelliSense enable strict typing and fewer runtime errors.

6. API Documentation: Swagger / OpenAPI

  • Automated Docs
    Tools like swagger-ui-express generate an interactive, live-testing API UI with a single command.

7. Testing Framework: Mocha + Chai

  • Flexible Test Runner
    Mocha supports both BDD and TDD styles, async tests, and lifecycle hooks (before/after).
  • Readable Assertions
    Chai’s expect, should, and assert syntaxes enhance test clarity and maintainability.