Skip to content

surendrakumar6350/notification-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

99 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Next.js TypeScript MongoDB AWS Lambda Monorepo


Directory Description
apps/web Next.js frontend application
services/worker AWS Lambda-compatible SMS worker service
packages/ Shared utilities and type definitions

πŸ“‚ Project Structure

notification-simulator/
β”œβ”€β”€ .github/                # GitHub configurations (workflows, actions, etc.)
β”‚   └── ...
β”œβ”€β”€ .husky/                 # Git hooks (e.g., pre-push checks)
β”‚   └── pre-push
β”œβ”€β”€ apps/                   # Application layer
β”‚   β”œβ”€β”€ docs/               # Documentation site
β”‚   └── web/                # Next.js frontend application
β”œβ”€β”€ services/               # Backend and worker services
β”‚   β”œβ”€β”€ worker/             # AWS Lambda-compatible SMS worker service
β”œβ”€β”€ mobile/                 # Mobile app
β”œβ”€β”€ packages/               # Shared packages
β”‚   β”œβ”€β”€ tests/              # Testing utilities
β”‚   └── types/              # TypeScript type definitions
└── vercel.json             # Vercel deployment configuration

πŸš€ Setup Instructions

Follow these steps to get the project running locally:

1. Clone the Repository

git clone https://github.com/surendrakumar6350/notification-simulator.git
cd notification-simulator

2. Install Dependencies

npm install

This will install root, frontend and shared package dependencies.

πŸ”‘ Environment Variables

Both apps/web and services/worker require their own .env files.
Always use the latest .env.example files as a template.

Required Secrets & How To Obtain

Variable Where? Description / How to Get
DB web From MongoDB Atlas
REDIS_URL web From your Redis hosting provider
WORKER_URI web API Gateway/Lambda endpoint URL for worker
WORKER_SECRET web, worker Secret shared between web & worker (AWS secret or env)
TURNSTILE_SITE_KEY web Cloudflare Turnstile dashboard
TURNSTILE_SECRET_KEY web Cloudflare Turnstile dashboard
JWT_SECRET_KEY web, worker Generate: openssl rand -base64 32
MAILSENDER_KEY web From your MailSender provider
MAILSENDER_FROM web Verified sender address
ADMIN_PASSWORD web Strong password for admin panel

Example: Copying Env Files

cp apps/web/.env.example apps/web/.env
cp services/worker/.env.example services/worker/.env

Edit the new .env files with your real credentials.


Run the Next.js Frontend

From the project root:

npm run dev --workspace=web

or, manually:

cd apps/web
npm install
npm run dev

App will be available at http://localhost:3000.

Run the Worker Service

The AWS Lambda-compatible worker service is located at services/worker.

Setup & Run Locally

  1. Install dependencies:

    cd services/worker
    npm install
  2. Configure environment:

    • Copy .env.example to .env and fill in your secrets (especially WORKER_SECRET).
    cp .env.example .env
  3. Run locally (Serverless Offline):

    npm run dev
    • The worker will be available at http://localhost:5067 (see serverless.yml).

Build & Deploy to AWS

npm run deploy

Notes:

  • Endpoints for SMS simulation are defined in services/worker/src/core-services/utils/ep.json.
  • The worker expects a valid WORKER_SECRET for API requests.
  • For more details, see the code in services/worker/src/handler.ts.

Next.js TypeScript MongoDB AWS Lambda
status commit-activity issues
made-with-love powered-by-coffee prs-welcome

About

This is a user-friendly website designed to facilitate the sending of multiple SMS messages efficiently.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors