A scalable User Management Service built with Node.js and Express.js, supporting CRUD operations along with email verification during user registration. The infrastructure is deployed on AWS, provisioned using Terraform.
- User Management: Provides complete CRUD functionality for managing user information.
- Health Monitoring: Includes a dedicated endpoint to monitor the application’s health and its connected services.
- Secure Deployment: Ensures data protection through HTTPS using SSL certificates and customer-managed encryption keys.
- Scalability and Reliability: Achieves high availability and scalability using managed instance groups and load balancers.
- Event-Driven Architecture: Leverages AWS SNS and lambda Functions to send verification emails through Mailgun.
- Programming Language:
JavaScript
- Relational Database:
PostgreSQL
- Backend Framework:
Node.js
,Express.js
- ORM Framework:
Sequelize
Create variables.pkrvars.hcl
file with the following fields:
aws_profile = ""
vpc_default = ""
subnet_default = ""
artifact_path = ""
ami_name = ""
instance_type = ""
region = ""
db_user = ""
db_password = ""
db_name = ""
source_ami_id = ""
demo_account_id = ""
- Generate npm packages
npm install
- Add
.env
file
PORT=
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_DATABASE=
DB_POOL_MAX=
DB_POOL_MIN=
DB_POOL_ACQUIRE=
DB_POOL_IDLE=
BCRYPT_SALT_ROUNDS=
TOKEN_EXPIRATION_TIME=
CLOUDWATCH_LOG_GROUP=
CLOUDWATCH_LOG_STREAM=
AWS_REGION=
ENVIRONMENT=
S3_BUCKET_NAME=
AWS_PROFILE=
SNS_TOPIC_ARN=
- To Run the Application
npm run start
- To Debug the Application
npm run dev
- To Run tests for the Application
npm run test
- refer the tf-aws-infra repo - link to IaC repo