Skip to content

CalebDevX/AchekVerify

Repository files navigation

AchekOTP — WhatsApp & Email Communication API

A developer-first SaaS platform for the Nigerian market. Businesses verify users, run chatbots, send broadcasts, and deliver branded emails — all through WhatsApp, Telegram, and email. One API key, one dashboard.

What the platform does

  • OTP Verification — 6-digit codes delivered via WhatsApp or email. Self-destruct after first use. Drop-in SMS replacement with 5× better delivery.
  • Email Delivery — Branded transactional emails from a platform-managed domain. Users pass channel: "email" to the API — no SMTP credentials required.
  • AI Chatbot — WhatsApp and Telegram bots with keyword triggers, auto-replies, lead capture, and full conversation logs. 24/7 without a support team.
  • Broadcasts — Bulk WhatsApp messages to contact lists. Schedule ahead, personalise per recipient, track each delivery.
  • Alerts & Tickets — Transaction alerts and inbound ticket management via WhatsApp.

Run & Operate

  • Workflows: Backend API (port 8080) and Start application (port 5000) — click Run or start each workflow
  • pnpm --filter @workspace/db run push — push DB schema changes
  • pnpm --filter @workspace/db run seed — re-seed plans + admin/demo users
  • pnpm --filter @workspace/api-spec run codegen — regenerate API hooks and Zod schemas from OpenAPI spec
  • pnpm run typecheck — full typecheck across all packages

Required secrets

Secret Description
AIVEN_URL Aiven PostgreSQL connection string (Service URI from Aiven console) — overrides Replit's managed DATABASE_URL
SESSION_SECRET JWT signing secret

Admin-editable settings (Dashboard → Admin → Settings)

Stored in the app_settings table — editable by admins without redeploying:

Key Description
smtp_host / smtp_port / smtp_user / smtp_pass Platform SMTP for outbound email
smtp_from_name / smtp_from_email Sender identity shown to recipients
smtp_enabled Toggle email delivery on/off
paystack_secret_key / paystack_public_key Paystack payment credentials
site_url Canonical URL used in Paystack callbacks
telegram_bot_token Platform Telegram bot token

Stack

  • pnpm workspaces · Node.js 24 · TypeScript 5.9
  • Frontend: React 19 + Vite + TailwindCSS 4 + shadcn/ui + Wouter
  • API: Express 5 + JWT auth (jsonwebtoken + bcryptjs)
  • Database: PostgreSQL (Aiven) + Drizzle ORM
  • Validation: Zod + drizzle-zod
  • API codegen: Orval (from lib/api-spec/openapi.yaml)
  • Payments: Paystack (NGN / Naira)
  • WhatsApp: Baileys (@whiskeysockets/baileys) — QR code and phone pairing-code linking
  • Email: Nodemailer; platform-managed SMTP admin configures in settings
  • Telegram: Bot API for chatbot and alerts

Where things live

lib/
  api-spec/openapi.yaml      — Single source of truth for all API contracts
  db/src/schema/             — Drizzle schema (users, plans, subscriptions, apiKeys, whatsappNumbers, otpRequests, appSettings)
  db/src/seed.ts             — Seeds plans + admin user

artifacts/
  api-server/src/
    routes/                  — auth, plans, subscriptions, apiKeys, whatsappNumbers, otp, admin*, payments, email, bot, telegram
    lib/baileys-manager.ts   — WhatsApp session manager (QR + pairing code, send, reconnect)
    lib/platform-mailer.ts   — Branded email sender (per-user domain masking)
    lib/mailer.ts            — Admin/platform internal email
    middlewares/auth.ts      — JWT auth + admin guard
  web/src/
    pages/dashboard/         — User dashboard (keys, logs, numbers, bot, email, subscription)
    pages/admin/             — Admin panel (users, numbers, plans, settings, email)
    pages/landing.tsx        — Public landing page

WhatsApp number linking

Business and Enterprise users can link their own WhatsApp number two ways:

  1. QR Code — WhatsApp → Linked Devices → Link a Device → scan QR
  2. Phone Code — WhatsApp → Linked Devices → Link a Device → "Link with phone number instead" → enter the 8-character pairing code shown in the dashboard

Both methods auto-detect the phone number and country on connection. Pairing code support is provided via requestPairingCode() in baileys-manager.ts and exposed at POST /user/whatsapp-numbers/:id/pairing-code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors