| Directory | Description |
|---|---|
apps/web |
Next.js frontend application |
services/worker |
AWS Lambda-compatible SMS worker service |
packages/ |
Shared utilities and type definitions |
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
Follow these steps to get the project running locally:
git clone https://github.com/surendrakumar6350/notification-simulator.git
cd notification-simulatornpm installThis will install root, frontend and shared package dependencies.
Both apps/web and services/worker require their own .env files.
Always use the latest .env.example files as a template.
| 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 |
cp apps/web/.env.example apps/web/.env
cp services/worker/.env.example services/worker/.envEdit the new .env files with your real credentials.
From the project root:
npm run dev --workspace=webor, manually:
cd apps/web
npm install
npm run devApp will be available at http://localhost:3000.
The AWS Lambda-compatible worker service is located at services/worker.
-
Install dependencies:
cd services/worker npm install -
Configure environment:
- Copy
.env.exampleto.envand fill in your secrets (especiallyWORKER_SECRET).
cp .env.example .env
- Copy
-
Run locally (Serverless Offline):
npm run dev
- The worker will be available at
http://localhost:5067(seeserverless.yml).
- The worker will be available at
npm run deployNotes:
- Endpoints for SMS simulation are defined in
services/worker/src/core-services/utils/ep.json. - The worker expects a valid
WORKER_SECRETfor API requests. - For more details, see the code in
services/worker/src/handler.ts.
