Skip to content

Wasif-Ansari/PromptRepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Prompt Repository SaaS Platform

A modern, production-ready Next.js application for managing AI prompts with advanced features and professional UI/UX.

✨ Features

Core Features

  • πŸ” Smart Search & Discovery - Advanced search with filters, tags, and AI-powered recommendations
  • πŸ“š Browse & Organize - Grid/list view, categories, favorites, and personal collections
  • ⭐ Community Ratings - Rate and review prompts to help others discover quality content
  • πŸ“€ Export Functionality - Export prompts to JSON, CSV, or Markdown formats
  • πŸ‘₯ User Management - Authentication with Google/GitHub OAuth
  • 🎨 Professional UI/UX - Dark theme with glassmorphism effects and smooth animations

Technical Features

  • ⚑ Next.js 14+ with App Router for optimal performance
  • πŸ”· TypeScript for type safety and better developer experience
  • 🎨 Tailwind CSS with custom design system and animations
  • πŸ” NextAuth.js for secure authentication
  • πŸ—„οΈ Prisma ORM with SQLite database (production-ready for PostgreSQL)
  • πŸ”„ React Query for efficient data fetching and caching
  • 🎭 Framer Motion for smooth animations and micro-interactions
  • πŸ“± Responsive Design - Mobile-first approach with accessibility compliance

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git

Installation

  1. Clone the repository
git clone <your-repo-url>
cd prompt-repository-saas
  1. Install dependencies
npm install
  1. Set up environment variables
cp .env.example .env.local

Edit .env.local with your configuration:

# Next.js
NEXTAUTH_SECRET=your-nextauth-secret-key-here
NEXTAUTH_URL=http://localhost:3000

# Database
DATABASE_URL="file:./dev.db"

# OAuth Providers (Optional - for authentication)
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GITHUB_CLIENT_ID=your-github-client-id  
GITHUB_CLIENT_SECRET=your-github-client-secret
  1. Set up the database
# Generate Prisma client
npm run db:generate

# Push schema to database
npm run db:push

# Seed with sample data
npm run db:seed
  1. Start the development server
npm run dev

Visit http://localhost:3000 to see your application!

πŸ“ Project Structure

src/
β”œβ”€β”€ app/                    # Next.js App Router pages
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”œβ”€β”€ prompts/           # Prompt browsing pages
β”‚   β”œβ”€β”€ globals.css        # Global styles
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   └── page.tsx           # Homepage
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ui/                # Reusable UI components
β”‚   β”œβ”€β”€ navbar.tsx         # Navigation component
β”‚   β”œβ”€β”€ hero.tsx           # Landing page hero
β”‚   β”œβ”€β”€ features.tsx       # Features section
β”‚   β”œβ”€β”€ prompt-card.tsx    # Prompt display card
β”‚   └── ...
β”œβ”€β”€ lib/                   # Utility functions
β”‚   β”œβ”€β”€ prisma.ts          # Prisma client
β”‚   β”œβ”€β”€ auth.ts            # Authentication config
β”‚   └── utils.ts           # Helper functions
prisma/
β”œβ”€β”€ schema.prisma          # Database schema
└── seed.ts                # Database seeding script

🎨 Design System

Color Palette

  • Primary: Blue (#3B82F6) to Purple (#8B5CF6) gradients
  • Secondary: Various accent colors for categories
  • Background: Dark gradients with glassmorphism effects
  • Text: White primary, gray secondary with proper contrast ratios

Components

  • Glass Cards: Subtle transparency with backdrop blur
  • Gradient Buttons: Smooth hover states and micro-interactions
  • Typography: Inter font family with consistent sizing scale
  • Spacing: 4px base unit (4, 8, 12, 16, 20, 24px)
  • Animations: Framer Motion for page transitions and interactions

πŸ—„οΈ Database Schema

Core Models

  • User: Authentication and profile information
  • Prompt: Core prompt data with content, metadata, and relationships
  • Category: Prompt categorization with colors and icons
  • Favorite: User bookmark system
  • Rating: Community rating and review system

Relationships

  • Users can create multiple prompts
  • Prompts belong to categories
  • Users can favorite and rate prompts
  • Many-to-many relationships for complex data modeling

πŸ”Œ API Endpoints

Prompts

  • GET /api/prompts - List prompts with filtering, search, and pagination
  • POST /api/prompts - Create new prompt
  • GET /api/prompts/[id] - Get specific prompt details
  • PUT /api/prompts/[id] - Update prompt (owner only)
  • DELETE /api/prompts/[id] - Delete prompt (owner only)

Categories

  • GET /api/categories - List all categories with prompt counts
  • POST /api/categories - Create new category (admin only)

Search & Discovery

  • GET /api/search - Advanced search across prompts
  • GET /api/prompts/trending - Get trending prompts
  • GET /api/prompts/featured - Get featured/curated prompts

πŸš€ Deployment

Vercel (Recommended)

  1. Push code to GitHub
  2. Connect repository to Vercel
  3. Set environment variables in Vercel dashboard
  4. Deploy automatically on push

Manual Deployment

# Build the application
npm run build

# Start production server
npm start

Database Migration

For production, update DATABASE_URL to PostgreSQL:

DATABASE_URL="postgresql://user:pass@host:5432/dbname"

πŸ”§ Development

Scripts

npm run dev          # Start development server
npm run build        # Build for production  
npm run start        # Start production server
npm run lint         # Run ESLint
npm run db:generate  # Generate Prisma client
npm run db:push      # Push schema changes
npm run db:seed      # Seed database with sample data

Code Quality

  • ESLint - Code linting and formatting rules
  • Prettier - Consistent code formatting
  • TypeScript - Strict type checking enabled
  • Husky - Git hooks for code quality (optional)

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write meaningful commit messages
  • Test your changes thoroughly
  • Update documentation as needed
  • Follow the existing code style and patterns

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Next.js - The React framework for production
  • Tailwind CSS - A utility-first CSS framework
  • Prisma - Modern database toolkit
  • Radix UI - Low-level UI primitives
  • Framer Motion - Production-ready motion library
  • Lucide React - Beautiful & consistent icons

Built with ❀️ for the AI community

For questions or support, please open an issue or contact the development team.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors