A modern, AI-powered customer engagement platform built with Next.js, MongoDB, and Redis.
- Google sign-in authentication (NextAuth)
- AI-powered audience rule builder (natural language to rules)
- Campaign creation, preview, and launch flows
- Campaign history with delivery stats
- Responsive, clean UI with reusable components (Tailwind CSS)
- MongoDB for data, Redis for fast queueing
- Node.js 18+
- MongoDB instance (local or Atlas)
- Redis instance (local or cloud)
- Google OAuth credentials (for sign-in)
-
Clone the repo:
git clone <your-repo-url> cd xeno-crm-project
-
Install dependencies:
npm install
-
Configure environment:
- Copy
.env.exampleto.envand fill in MongoDB, Redis, and Google credentials.
- Copy
-
(Optional) Seed sample data:
npm run seed-cus npm run seed-order
- Development:
npm run dev
- Visit http://localhost:3000
npm run dev— Start development servernpm run build— Build for productionnpm run start— Start production servernpm run lint— Lint codenpm run consume— Start Redis consumernpm run seed-cus— Seed customersnpm run seed-order— Seed ordersnpm run strip-comments— Remove comments from all code files
xeno-crm-project/
.env
eslint.config.mjs
jsconfig.json
next.config.mjs
package.json
postcss.config.mjs
README.md
components/
AuthCheck.jsx
Header.jsx
ui/
Button.jsx
Card.jsx
EmptyState.jsx
Input.jsx
Select.jsx
Spinner.jsx
hooks/
useFetch.js
libs/
mongodb.js
queryBuilder.js
redis.js
models/
communicationLog.js
customer.js
orders.js
pages/
api/
ai/generate-rules.js
audience/preview.js
auth/[...nextauth].js
campaigns/Createcampaign.js
campaigns/deliveryreceipt.js
campaigns/history.js
ingest/customer.js
ingest/order.js
vendor/send.js
public/
*.svg
scripts/
clear-redis.js
redis-consumer.js
seed/
seed-customer.js
seed-order.js
src/
app/
favicon.ico
globals.css
layout.js
page.jsx
providers.jsx
campaigns/
create/
page.jsx
launch/
LaunchForm.jsx
page.jsx
history/
page.jsx
:: Install dependencies
npm install
:: Start the Next.js dev server
npm run dev
:: Seed sample data (optional)
npm run seed-cus
npm run seed-order
:: Start the Redis consumer (in another terminal)
npm run consume
:: Build for production
npm run build
:: Start production server
npm run start#Architecture
- UI built with Tailwind CSS (see
globals.css) - Easily extend with new campaigns, rules, or integrations