16 Commits

Author SHA1 Message Date
maaz519 9ac3e29a20 fix: add @prisma/client to root deps for Docker runner 2026-06-09 16:09:29 +05:30
maaz519 ff4d0f90e8 added changes 2026-06-09 15:33:21 +05:30
maaz519 249d759e6a good forst commit 2026-06-09 02:02:40 +05:30
maaz519 1dba77959d feat: add AccountsModule with list and QR endpoints
Implements GET /accounts (list all accounts) and GET /accounts/:id/qr
(returns QR code as base64 data URL) using the qrcode package.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 11:15:42 +05:30
maaz519 8ad5f737bd feat(api): add SearchModule with GET /search endpoint backed by Meilisearch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 00:28:13 +05:30
maaz519 1e421c0073 feat(worker): add index queue and wire Meilisearch indexing after approval
Adds index.queue.ts and index.processor.ts to handle BullMQ indexing jobs,
updates main.ts to create a Meilisearch client, configure the index on startup,
and enqueue index + forward jobs from ApprovalResult after a star reaction.
2026-05-28 00:02:47 +05:30
maaz519 1d6e1fb4da fix(search): tighten mock type cast for better type safety
Replace `as any` cast with `as unknown as ReturnType<typeof createMeiliClient>`
in the mock client factory. This preserves type safety without requiring the mock
to implement the full SDK interface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 23:53:32 +05:30
maaz519 d33b4e40b8 fix: use type-only Baileys import and raw status code to fix Jest ESM issue
Replaces DisconnectReason enum import with type-only WASocket import and
uses 401 directly instead of DisconnectReason.loggedOut. Baileys is an ES
module that cannot be executed in Jest's CommonJS mode, so removing the
value import (keeping only type imports) prevents ts-jest from trying to
execute the module.

Also updated session-pool.test.ts to verify end() is called with the
expected Boom error object instead of undefined.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 17:40:24 +05:30
maaz519 fe7a779ed7 chore: add Prisma client to worker, turbo generate task, update env
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:36:52 +05:30
maaz519 a4771aaf05 feat: add Baileys WhatsApp session with reconnect logic
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:33:46 +05:30
maaz519 7151e0dd6d feat: add Baileys message normalizer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:08:10 +05:30
maaz519 b16a30beb2 feat: verify Turborepo pipeline — all 8 packages build and test
Adds packageManager field to root package.json (required by turbo v2.9),
loads .env via dotenv in API jest config so Prisma integration tests find
DATABASE_URL when run from the monorepo root. pnpm build + pnpm test: 8/8 passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:38:34 +05:30
maaz519 f26c50dec0 feat: scaffold worker application shell
Adds apps/worker with TypeScript config, BullMQ/ioredis dependencies,
pino logger bootstrap, and a smoke test. Queue consumers wired in later phases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:36:15 +05:30
maaz519 fe8eaf75fb feat: scaffold Next.js 16 web app with Tailwind v4
Sets up apps/web with Next.js 16, React 19, Tailwind CSS v4 (postcss plugin
config, @import syntax), Jest + Testing Library, App Router layout and home page.
2/2 tests passing, build verified.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:34:00 +05:30
maaz519 ae6c7ec94a feat: add Prisma schema and PrismaService with integration tests (postgres on :5433) 2026-05-27 14:25:49 +05:30
maaz519 0eff5f3c3f chore: initialise monorepo scaffold 2026-05-27 13:41:26 +05:30