This repository hosts a Node.js/TypeScript Express application that demonstrates:
- Linting with ESLint
- Unit testing with Jest
- Database operations using TypeORM
- AWS Cognito for authentication
- AWS SSM for configuration
- AWS KMS for password encryption
- AWS Redis/ElastiCache for caching
- GitHub Actions CI for linting and testing
- Docker Compose for local development
- Project Overview
- Prerequisites
- Installation
- Configuration
- Running Locally
- Docker Compose Setup
- Project Scripts
- Testing
- Linting
- CI/CD with GitHub Actions
- Folder Structure
- Contributing
- License
This application is built with:
- Node.js and TypeScript for the server logic.
- Express as the web framework.
- TypeORM for database operations (MySQL/PostgreSQL/SQLite).
- AWS services:
- Cognito for user authentication and registration.
- SSM (Systems Manager) to store configuration securely.
- KMS to encrypt/decrypt sensitive data.
- SES to send emails (if needed).
- S3 to store files (bills, logs).
- Redis/ElastiCache for caching.
- Jest for unit tests.
- ESLint for code linting.
- Prettier for code formatting.
- Docker + docker-compose to containerize and run services locally.
-
Authentication & Authorization Integrates with AWS Cognito for user registration, login, token refresh, and password resets.
-
Database Management Uses TypeORM to connect to a relational database. Can run in-memory SQLite for tests.
-
Caching Redis (or ElastiCache in production) is used to cache frequently accessed data and reduce database load.
-
Error Handling A centralized error-handler middleware ensures consistent, structured JSON responses for errors.
-
CI/CD GitHub Actions pipeline runs lint checks and unit tests on every push and pull request to
masterordevelop.
- Node.js (version 18+ recommended)
- npm or yarn (npm comes bundled with Node)
- Docker (if you plan to run locally with Docker)
- AWS CLI (optional, if you plan to interact with AWS from your local machine)
- Git for version control
Make sure you have AWS credentials set up if testing AWS functionality locally:
aws configureHere's a high-level overview of the system architecture:
Below is the class structure represented for the application:
This diagram explains the major components of the application:
Entity relationships in the database are outlined below:
The following diagram shows typical HTTP request/response flows:
Authentication and other flows are depicted below:
Here’s a summary of system use cases:






