Cognix is a premium, full-stack AI prompt sharing and marketplace platform for prompt engineers, creators, and AI enthusiasts. Users can discover, publish, bookmark, review, and monetize high-quality AI prompts for engines like ChatGPT, Claude, Gemini, and Midjourney — backed by Stripe payments, Better Auth, and MongoDB.
Live at → https://cognix-client.vercel.app
| Technology | Purpose |
|---|---|
| Next.js 14 (App Router) | React framework |
| React | UI library |
| Tailwind CSS | Utility-first styling |
| Framer Motion | Animations |
| Recharts | Admin analytics charts |
| React Toastify | Toast notifications |
| React Quill New | Rich text / Markdown rendering |
| Stripe React Elements | Payment checkout UI |
| html-to-image + jsPDF | PDF export |
| Technology | Purpose |
|---|---|
| Node.js | Runtime |
| Express.js | HTTP server |
| MongoDB | Database |
| Better Auth | JWT + Google OAuth authentication |
| Stripe SDK | Payment Intents API |
| express-rate-limit | Brute-force protection |
- Global Dynamic Search — Real-time search across title, description, AI tool, and categories
- Category & Engine Filters — Filter by AI engine (ChatGPT, Claude, Gemini, Midjourney) and domain category
- Difficulty Filter — Beginner / Intermediate / Pro with URL parameter sync
- Trending Algorithm — MongoDB aggregation combining copies + ratings for ranking
- Infinite Scroll — Smooth feed browsing without page-based pagination
- Dynamic Revenue Share — Creators earn 70% share from prompt copies & sales
- Multi-Method Payouts — Configure Bank Transfer, PayPal, Wise, bKash, or Nagad details
- Withdrawal Requests — Submit payout requests directly from Creator Analytics
- Admin Payout Management — Admins can review, approve ("Mark as Paid"), or reject creator payout requests
- Server-side Gemini Proxy — Bypass CORS and test prompts dynamically with any Gemini model (default:
gemini-3.5-flash) - Dynamic Model Selection — Support for
gemini-3.5-flash,gemini-3.5-pro,gemini-2.5-flash, etc.
- Better Auth — Google OAuth with automatic account linking and JWT-based role control
- Rate Limiting — Global and per-route brute-force protection
- Role-Based Access — User, Creator, and Admin roles enforced on client and server
- Master Admin Protection — Server-side guard prevents master admin deletion
- Pro Builder Subscription — Stripe Elements checkout for premium tier upgrade
- Transaction Logs — Admin-level paginated Stripe payment history
- User Dashboard — Live stats: Unlocked Prompts, Library, Spend, Activity
- Admin & Creator Analytics — Real-time DB metrics for users, prompts, copies, reviews, and revenue + 1-click CSV report export
- Community Moderation — Report queue with Warn Creator, dismiss, and remove actions
- Creator Follow System — Real database
followscollection tracking creator audience
- PDF Export — Download prompt details as PDF
- Prompt Forking — "Copy to Edit" for building on existing prompts
- Global Error Boundary — Custom
error.jsxprevents crashes on bad routing
| Package | Purpose |
|---|---|
next, react, react-dom |
Core framework |
better-auth |
Authentication client |
@stripe/react-stripe-js, @stripe/stripe-js |
Stripe payment UI |
recharts |
Admin charts |
framer-motion |
Animations |
react-quill-new |
Rich text editor |
html-to-image, jspdf |
PDF export |
react-toastify |
Notifications |
tailwindcss |
Styling |
| Package | Purpose |
|---|---|
express |
HTTP server |
mongoose |
MongoDB ODM |
better-auth |
Auth engine |
stripe |
Payments |
express-rate-limit |
Brute-force protection |
cors, dotenv |
Cross-origin and env config |
- Node.js v20.6 or higher
- npm v9 or higher
- MongoDB Atlas account
git clone https://github.com/iMoloy/cognix.git
cd cognixcd server
npm installCreate server/.env:
NODE_ENV=development
PORT=5000
CLIENT_ORIGIN=http://localhost:3000
MONGODB_URI=mongodb+srv://<user>:<pass>@cluster.mongodb.net
DB_NAME=cognix_db
BETTER_AUTH_SECRET=your_super_secret_auth_key
BETTER_AUTH_URL=http://localhost:5000
GOOGLE_CLIENT_ID=your_google_oauth_client_id
GOOGLE_CLIENT_SECRET=your_google_oauth_client_secret
STRIPE_SECRET_KEY=your_stripe_secret_keyStart the server:
npm run devRuns on http://localhost:5000
cd ../client
npm installCreate client/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_IMGBB_API_KEY=your_imgbb_api_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_keyStart the client:
npm run devRuns on http://localhost:3000
| Command | Description |
|---|---|
npm run dev:client |
Start Next.js frontend |
npm run dev:server |
Start Express backend |
npm run build:client |
Build production frontend |
- 🌐 Live App → https://cognix-client.vercel.app
- 🐙 GitHub → github.com/iMoloy/cognix
- 💼 Author → linkedin.com/in/iMoloy