An end-to-end Customer Relationship Management (CRM) system built as part of the Xeno SDE Internship Assignment – 2025. The project demonstrates modern engineering practices: microservices architecture, event-driven design, full-stack development, and AI-first integrations.
The backend for this project can be found in the XenCRM_Backend repository.
- Authenticates via Google OAuth (NextAuth).
- Provides UI to create segments, create campaigns, and view dashboards.
- Communicates with Campaigns DB via APIs (/segments, /campaigns, /dashboard, /campaignStats).
- Next.js 15.5.2
- TypeScript with strict configuration
- Tailwind CSS v4 with shadcn/ui components
- Prisma ORM with PostgreSQL database
- NextAuth.js for authentication
- Turbopack for development and build optimization
- Recharts for data visualization
app/dashboard -> #Homepage Dashboard
app/segments -> # Segment Creation UI
app/campaigns -> #Campaing Creation UI
app/campaignStats - > #Displaying Campaign Stats UI
/api/campaings/route.ts -> #Campaign Creation Logic.
/api/segements/route.ts -> #Segement Creation Logic.
/api/dashapi/route.ts -> #Fetched data for the Main dashboard.
/api/campaignstats/route.ts -> #For displaying Past Campaign Stats.
- Node.js (v20 or later)
- npm
- PostgreSQL
-
Clone the repository:
git clone https://github.com/prateekshukla17/XenCRM_Frontend.git cd XenCRM_Frontend -
Install dependencies:
npm install
-
Set up environment variables (see below).
-
Set up the database (see below).
-
Run the development server:
npm run dev
The application will be available at
http://localhost:3000.
Create a .env file in the root of the project and add the following environment variables. You can use the .env.example as a template.
# .env.example
# PostgreSQL database connection string
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE"
# Google OAuth credentials
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# NextAuth secret
NEXTAUTH_SECRET="your-nextauth-secret"
NEXTAUTH_URL="http://localhost:3000"
npm run dev: Starts the development server with Turbopack.npm run build: Builds the application for production.npm run start: Starts the production server.
├───prisma/
│ └───schema.prisma
└───src/
├───app/
│ ├───page.tsx
│ ├───api/
│ │ ├───auth/
│ │ │ └───[...nextauth]/
│ │ │ └───route.ts
│ │ ├───campaigns/
│ │ │ └───route.ts
│ │ ├───campaignstats/
│ │ │ └───route.ts
│ │ ├───dashapi/
│ │ │ └───route.ts
│ │ └───segments/
│ │ ├───route.ts
│ │ ├───[segmentId]/
│ │ │ └───route.ts
│ │ └───preview/
│ │ └───route.ts
│ ├───campaigns/
│ │ └───page.tsx
│ ├───campaignStats/
│ │ └───page.tsx
│ ├───dashboard/
│ │ └───page.tsx
│ └───segments/
│ └───page.tsx
├───components/
│ ├───hero.tsx
│ ├───loginsection.tsx
│ ├───navbar.tsx
│ ├───providers/
│ │ └───SessionProvider.tsx
│ └───ui/
│ └───button.tsx
├───generated/
│ └───prisma/...
-
Redundacy : I intentionally kept certain tables denormalised, to speed up aggregration queires, also to reduce number of joins, which may scan large customer databases.
-
Production Costs: Range queries for Next API routes might use large compute (extra costs on Vercel Production Enviroment).
-
Simpler UI: Not as poslished as drag-and-drop visual block builders used in Production CRMs
-
AI Integeration(MCP Server) : Needs an external client like CLAUDE DESKTOP, for future scope, building and MCP to directly intergrating into the webapplication.
Built with sleepless nights, multiple Red Bulls and determination, by Prateek Shukla :)
