Master the Machine Whisper - The premium marketplace for discovering, buying, and selling highly-engineered AI prompts for GPT-4, Claude, and Midjourney.
- Overview
- Features
- Tech Stack
- Project Structure
- Getting Started
- Configuration
- Development Workflow
- Core Components
- API Integration
- Authentication
- Styling & Animations
- Dashboard System
- Deployment
- Contributing
PromptForge is a next-generation marketplace platform designed for the AI era. It enables users to:
- Discover premium, production-ready AI prompts
- Buy validated prompts for various AI models
- Sell engineered prompts to a global audience
- Manage inventory, revenue, and payouts
- Review and rate marketplace transactions
The platform supports multi-role access (Admin, Seller, Buyer) with dedicated dashboards for each user type, complete with analytics, financial tracking, and inventory management.
- π Browse and search AI prompts by category
- β View ratings and reviews from verified purchasers
- π Purchase prompts with secure checkout
- π³ Access purchased prompts in a personal vault
- π Track purchase history and usage
- π Submit and manage prompt inventory
- π° Track revenue and sales analytics
- π View performance metrics and trending prompts
- πΈ Manage payout settings and history
- π Monitor seller ratings and reviews
- π₯ User and account management
- β Review and approve submitted prompts
- π Platform analytics and financial reporting
- π Moderation tools and compliance
- π System logs and audit trails
- π Secure authentication via Google OAuth
- π¨ Beautiful, responsive UI with dark theme
- β‘ Server-side rendering (SSR) for performance
- π Real-time data synchronization
- π± Mobile-optimized responsive design
- π¬ Smooth animations and transitions
- Next.js (16.2.4) - React framework with App Router
- React (19.2.4) - UI library
- TypeScript (5) - Type safety
- Tailwind CSS (4) - Utility-first CSS framework
- PostCSS (4) - CSS transformation
- Framer Motion (12.38.0) - Advanced animations
- GSAP (3.15.0) - Timeline animations
- shadcn/ui (4.6.0) - Component library
- Radix UI (1.4.3) - Headless component library
- Lucide React (1.14.0) - Icon library
- Recharts (3.8.1) - Chart components
- React Context API - Global state (Auth, Cart)
- Custom API Client - Centralized API communication
- Fetch API - HTTP requests with JWT auth
- Firebase Auth (12.12.1) - Google OAuth provider
- JWT Tokens - Secure API authentication
- class-variance-authority (0.7.1) - Variant management
- clsx (2.1.1) - Conditional className merging
- tailwind-merge (3.5.0) - Tailwind class merging
- ESLint (9) - Code quality
- Babel React Compiler (1.0.0) - React optimizations
- TypeScript - Static type checking
promptforge-frontend/
βββ src/
β βββ app/ # Next.js App Router
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Homepage
β β βββ (auth)/ # Auth route group
β β β βββ login/
β β β βββ register/
β β βββ dashboard/ # Dashboard section
β β β βββ admin/ # Admin dashboard
β β β β βββ approvals/
β β β β βββ financials/
β β β β βββ logs/
β β β β βββ users/
β β β βββ seller/ # Seller dashboard
β β β βββ analytics/
β β β βββ inventory/
β β β βββ payouts/
β β β βββ reviews/
β β βββ explore/ # Marketplace browse
β β β βββ [id]/ # Prompt details
β β βββ edit/ # Prompt editing
β β β βββ [id]/
β β βββ profile/ # User profile
β β βββ purchases/ # Purchase history
β β βββ create/ # Prompt creation
β β βββ about/ # About page
β β βββ contact/ # Contact page
β β βββ faq/ # FAQ page
β β βββ forgot-password/ # Password recovery
β β βββ api/ # API routes
β β βββ reviews/ # Review endpoints
β β
β βββ components/ # Reusable components
β β βββ auth/ # Authentication components
β β β βββ ProtectedRoute.tsx
β β β βββ RoleGuard.tsx
β β βββ dashboard/ # Dashboard components
β β β βββ AdminPortal.tsx
β β β βββ BuyerHub.tsx
β β β βββ SellerDashboard.tsx
β β βββ home/ # Homepage sections
β β β βββ BottomCTA.tsx
β β β βββ FeaturedPrompts.tsx
β β β βββ HeroSection.tsx
β β β βββ HowItWorks.tsx
β β β βββ Testimonials.tsx
β β β βββ TrendingCategories.tsx
β β βββ layout/ # Layout components
β β β βββ Footer.tsx
β β β βββ Navbar.tsx
β β β βββ Sidebar.tsx
β β βββ ui/ # UI primitives
β β βββ button.tsx
β β βββ card.tsx
β β βββ input.tsx
β β βββ label.tsx
β β
β βββ context/ # React Context
β β βββ AuthContext.tsx # Authentication state
β β βββ CartContext.tsx # Shopping cart
β β
β βββ lib/ # Utilities
β βββ apiClient.ts # Centralized API client
β βββ firebase.ts # Firebase config
β βββ utils.ts # Helper functions
β
βββ public/ # Static assets
βββ components.json # shadcn/ui config
βββ eslint.config.mjs # ESLint configuration
βββ next.config.ts # Next.js configuration
βββ postcss.config.mjs # PostCSS configuration
βββ tailwind.config.ts # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies
βββ README.md # This file
- Node.js 18+ (Recommended 20 LTS)
- npm 9+ or pnpm 8+
- Git for version control
- Backend API server running (see Configuration)
-
Clone the repository
git clone https://github.com/yourusername/promptforge-frontend.git cd promptforge-frontend -
Install dependencies
npm install # or pnpm install -
Create environment configuration
cp .env.example .env.local
-
Configure environment variables (see Configuration)
-
Start the development server
npm run dev
Open http://localhost:3000 with your browser.
The app will auto-update as you edit files thanks to Next.js fast refresh.
npm run dev # Start dev server on port 3000
npm run build # Build for production
npm start # Start production server
npm run lint # Run ESLintCreate a .env.local file in the root directory:
# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:5000
# Firebase Configuration
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id
# Optional: Analytics & Monitoring
NEXT_PUBLIC_SENTRY_DSN=optionalKey features enabled in next.config.ts:
- React Compiler - Automatic component optimization
Strict mode enabled in tsconfig.json for better type safety.
The project uses Tailwind CSS 4 with PostCSS for styling. Configuration in tailwind.config.ts.
- Create a new directory under
src/app - Add a
page.tsxfile - Use the layout system for consistent styling
// src/app/my-feature/page.tsx
export default function MyFeaturePage() {
return <div>My Feature</div>;
}- Create component file under
src/components/{category} - Use TypeScript interfaces for props
- Apply Tailwind classes for styling
// src/components/my-category/MyComponent.tsx
interface MyComponentProps {
title: string;
onClick?: () => void;
}
export default function MyComponent({ title, onClick }: MyComponentProps) {
return <button onClick={onClick}>{title}</button>;
}Use the centralized API client:
// Making requests
const data = await apiClient.get('/api/prompts');
const result = await apiClient.post('/api/prompts', { name: 'AI Prompt' }, true);
const updated = await apiClient.put('/api/prompts/1', { name: 'Updated' }, true);
await apiClient.delete('/api/prompts/1', true);The centralized API client (src/lib/apiClient.ts) handles:
- Base URL configuration
- Automatic JWT token injection
- Error handling
- Request/response formatting
export const apiClient = {
get: (endpoint: string, requireAuth?: boolean) => Promise<any>,
post: (endpoint: string, data: any, requireAuth?: boolean) => Promise<any>,
put: (endpoint: string, data: any, requireAuth?: boolean) => Promise<any>,
delete: (endpoint: string, requireAuth?: boolean) => Promise<any>,
};Authentication
POST /api/auth/sync- Sync Google auth with backendPOST /api/users/me- Get current user profile
Prompts
GET /api/prompts- List all promptsGET /api/prompts/:id- Get prompt detailsPOST /api/prompts- Create new promptPUT /api/prompts/:id- Update promptDELETE /api/prompts/:id- Delete prompt
Reviews & Testimonials
GET /api/reviews/featured- Get featured reviews for testimonial carousel
Dashboard
GET /api/dashboard/seller- Seller analyticsGET /api/dashboard/admin- Admin overview
- Create Firebase project at console.firebase.google.com
- Enable Google OAuth provider
- Configure OAuth consent screen
- Add frontend URL to authorized origins
- Copy credentials to
.env.local
- User clicks "Continue with Google"
- Firebase popup opens for authentication
- Google token obtained and sent to backend
- Backend validates and returns JWT token
- Token stored in localStorage
- User redirected to
/explore
Use ProtectedRoute component to guard private pages:
import ProtectedRoute from '@/components/auth/ProtectedRoute';
<ProtectedRoute>
<YourComponent />
</ProtectedRoute>Use RoleGuard for role-based access:
import RoleGuard from '@/components/auth/RoleGuard';
<RoleGuard roles={['admin', 'seller']}>
<AdminFeature />
</RoleGuard>The project uses Tailwind CSS 4 utility classes:
<div className="bg-slate-900 text-white px-6 py-4 rounded-lg shadow-lg">
Styled with Tailwind
</div>Complex animations with Framer Motion:
import { motion } from 'framer-motion';
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.5 }}
>
Animated content
</motion.div>- Color Scheme: Dark theme (slate-900 background, blue accents)
- Typography: Modern sans-serif fonts
- Spacing: 4px base unit (Tailwind default)
- Animations: Smooth, professional transitions
Features:
- Platform overview with KPIs
- Revenue analytics
- User management
- Prompt approvals queue
- Financial reports
- System logs
- Category distribution
Sub-sections:
/dashboard/admin/approvals- Pending prompt approvals/dashboard/admin/financials- Revenue & payment tracking/dashboard/admin/logs- System activity logs/dashboard/admin/users- User management
Features:
- Revenue tracking & forecasting
- Sales analytics
- Inventory management
- Payout history
- Review aggregation
- Prompt performance metrics
Sub-sections:
/dashboard/seller/analytics- Sales & engagement metrics/dashboard/seller/inventory- Prompt management/dashboard/seller/payouts- Payment tracking/dashboard/seller/reviews- Customer feedback
Features:
- Purchase history
- Vault access for purchased prompts
- Account settings
- Personal profile management
-
Connect GitHub repository
git push origin main
-
Import project on Vercel
- Visit vercel.com/new
- Connect your GitHub repository
- Select
promptforge-frontend
-
Configure environment variables
- Add all variables from
.env.localto Vercel dashboard - Ensure
NEXT_PUBLIC_*variables are set
- Add all variables from
-
Deploy
- Vercel automatically deploys on git push
- Preview deployments for pull requests
npm run build # Generates optimized build
npm start # Runs production server on port 3000- React Compiler enabled for automatic optimization
- Image Optimization via next/image (when integrated)
- Code Splitting automatic via Next.js
- CSS Purging via Tailwind
- Dynamic Imports for large components
main- Production-ready codedevelop- Integration branchfeature/*- Feature branchesbugfix/*- Bug fix branches
feat: add new feature
fix: resolve bug
docs: update documentation
style: format code
refactor: restructure code
test: add tests
chore: update dependencies
npm run lint # Check for linting errors- Create feature branch from
develop - Make changes and commit regularly
- Ensure all tests pass and linting is clean
- Create pull request with clear description
- Request review from team members
- Merge after approval
For issues, questions, or suggestions:
- Open an issue on GitHub
- Contact the development team
- Visit promptforge.com/contact
This project is proprietary software. All rights reserved.