Skip to content

surendrakumar6350/notification-simulator

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

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages