Here's a comprehensive, professional README.md for your Kithub project:
A modern, high-performance e-commerce platform built with Next.js 15 for selling premium PSD templates. Features secure Razorpay payments, instant digital downloads, and a creator-focused interface.
- Instant Digital Delivery: Automated download links after successful payment
- Secure Payments: Razorpay integration with proper webhook verification
- PSD Preview Gallery: High-quality mockups showcasing editable layers
- Category Filtering: Browse by type (YouTube, Instagram, Posters, etc.)
- Responsive Design: Mobile-first approach with Tailwind CSS
- Next.js 15 (App Router): Server components, streaming, and edge runtime
- TypeScript: Full type safety across the application
- Tailwind CSS: Utility-first styling with custom design system
- Razorpay SDK: Secure payment processing with webhook verification
- File Delivery: Secure download system with one-time access links
- Clean Product Grid: Visual cards with preview images, tags, and pricing
- Detailed Product Pages: What's included, software requirements, license info
- Purchase History: Track downloads and access purchased files
- Trust Signals: Secure payment badges, refund policy, terms of service
kithub/
βββ src/
β βββ app/ # Next.js 15 App Router
β β βββ (auth)/ # Authentication routes
β β βββ (dashboard)/ # User dashboard
β β βββ products/ # Product listings & detail pages
β β βββ checkout/ # Payment flow
β β βββ success/ # Download after payment
β β βββ api/ # API routes
β βββ components/ # React components
β β βββ ui/ # Reusable UI components
β β βββ layout/ # Layout components
β β βββ shared/ # Shared components
β βββ lib/ # Utilities & helpers
β βββ types/ # TypeScript type definitions
βββ public/ # Static assets
βββ scripts/ # Build & utility scripts
- Node.js 18+
- npm or yarn or pnpm
- Razorpay account (for payments)
- Git
-
Clone the repository
git clone https://github.com/yourusername/kithub.git cd kithub -
Install dependencies
npm install # or yarn install # or pnpm install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.localwith your credentials:# Application NEXT_PUBLIC_APP_URL=http://localhost:3000 # Razorpay Payments RAZORPAY_KEY_ID=your_razorpay_key_id RAZORPAY_KEY_SECRET=your_razorpay_key_secret RAZORPAY_WEBHOOK_SECRET=your_webhook_secret # Database (optional) DATABASE_URL=your_database_url # Authentication (optional) NEXTAUTH_SECRET=your_nextauth_secret NEXTAUTH_URL=http://localhost:3000 # Storage (for PSD files) UPLOAD_DIR=./uploads MAX_FILE_SIZE=104857600 # 100MB
-
Run development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser Navigate to http://localhost:3000
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLintnpm run type-check- Check TypeScript types
- Create a Razorpay account at razorpay.com
- Get your API keys from Razorpay Dashboard β Settings β API Keys
- Set up webhook endpoint:
https://yourdomain.com/api/razorpay/webhook - Configure webhook events:
payment.captured,payment.failed
Products are stored in src/data/products.ts (initially):
export const products = [
{
id: "psd-001",
title: "YouTube Thumbnail Pack Vol.1",
description: "10 editable YouTube thumbnail templates",
price: 299, // in INR
category: "youtube",
tags: ["thumbnail", "youtube", "gaming"],
previews: ["/previews/yt-1.jpg", "/previews/yt-2.jpg"],
features: [
"Fully editable PSD layers",
"Free font links included",
"Commercial license",
"24/7 instant download"
],
fileUrl: "/downloads/yt-pack-1.zip",
fileSize: "45 MB"
}
];# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# For production
vercel --prodAdd these to your Vercel project settings:
RAZORPAY_KEY_IDRAZORPAY_KEY_SECRETRAZORPAY_WEBHOOK_SECRETNEXT_PUBLIC_APP_URL
Netlify:
# Build command
npm run build
# Publish directory
.nextAWS Amplify:
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*graph LR
A[Product Page] --> B[Buy Now]
B --> C[Create Order API]
C --> D[Razorpay Checkout]
D --> E{Payment Status}
E -->|Success| F[Verify Payment]
E -->|Failed| G[Show Error]
F --> H[Generate Download Link]
H --> I[Success Page + Email]
I --> J[Download PSD]
- Featured PSD collections
- Category highlights
- Trust badges & testimonials
- Grid layout with filtering
- Search functionality
- Sort by price/popularity
- High-quality previews
- "What's included" section
- FAQ & requirements
- Buy Now button
- Order summary
- Razorpay integration
- Secure payment form
- Download instructions
- Access to purchased files
- Email confirmation
- Purchase history
- Download re-access
- Account management
Primary: #8B5CF6 (Purple)
Secondary: #EC4899 (Pink)
Background: #FFFFFF (White)
Text: #1F2937 (Gray-900)
Accent: #FBBF24 (Amber)- Headings: Inter (Bold)
- Body: Inter (Regular)
- Accent: Gochi Hand (Handwritten)
- Logo: Comic Neue (Bold)
ProductCard- Product listing cardsCategoryFilter- Filter by tags/categoriesPreviewGallery- Product image carouselCheckoutButton- Razorpay integrationDownloadButton- Secure file download
- Payment Verification: All payments verified server-side via webhooks
- Secure Downloads: One-time download links with expiration
- Input Validation: Form validation on client and server
- CORS Protection: Configured API route protection
- Environment Variables: Sensitive data stored securely
# Create component structure
src/components/ui/NewComponent/
βββ index.ts
βββ NewComponent.tsx
βββ NewComponent.test.tsx- Use TypeScript strictly
- Follow ESLint configuration
- Write meaningful component names
- Add JSDoc comments for complex functions
# Run tests
npm test
# Test coverage
npm run test:coverage- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
feat:New featurefix:Bug fixdocs:Documentationstyle:Code stylerefactor:Code refactoringtest:Adding testschore:Maintenance
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs.kithub.example.com
- Issues: GitHub Issues
- Email: support@kithub.example.com
- Twitter: @KithubStore
- Next.js - The React framework
- Tailwind CSS - Utility-first CSS framework
- Razorpay - Payment processing
- Lucide Icons - Beautiful icons
- Vercel - Deployment platform
// Add to src/lib/analytics.ts
export function trackEvent(event: string, data?: any) {
if (typeof window !== 'undefined') {
// Google Analytics
window.gtag?.('event', event, data);
// Facebook Pixel
window.fbq?.('track', event, data);
}
}Made with β€οΈ for creators and designers
If you find this project helpful, please give it a β on GitHub!
Happy designing! π¨ If you create amazing content with our PSDs, tag us with #MadeWithKithub