- Glassmorphism Design - Beautiful glass-effect cards with backdrop blur
- Gradient Accents - Vibrant purple-pink gradient theme
- Smooth Animations - Floating, pulse, fade-in, and hover effects
- Fully Responsive - Optimized for mobile, tablet, and desktop
- Dark Theme - Premium dark mode with gradient backgrounds
- Email/Password - Traditional authentication
- OAuth Providers - Google & GitHub sign-in
- Email Verification - Secure account activation
- Password Reset - Self-service password recovery
- Session Management - Persistent login with auto-refresh
- Prompt Generation - Transform simple ideas into detailed prompts
- Smart Suggestions - Quick-start templates
- History Management - Save and access previous prompts
- Character Counter - Real-time input tracking
- Debounced Input - Optimized performance
- User Prompts - Save generated prompts to database
- Templates Marketplace - Browse and purchase prompt templates
- Favorites System - Bookmark favorite templates
- Reviews & Ratings - Community feedback
- User Profiles - Extended user information
- Debouncing - Reduce unnecessary API calls
- Local Storage - Client-side caching
- Lazy Loading - Conditional component rendering
- Memoization - Prevent unnecessary re-renders
- Custom Hooks - Reusable logic patterns
| Category | Technology |
|---|---|
| Framework | Next.js 14.2.3 (App Router) |
| Authentication | Supabase Auth |
| Database | Supabase (PostgreSQL) |
| Styling | Tailwind CSS 3.4.1 |
| UI Components | Custom React Components |
| Fonts | Inter, Space Grotesk (Google Fonts) |
| AI API | OpenRouter |
| Deployment | Vercel |
- Node.js 14+ installed
- npm or yarn package manager
- Supabase account (free tier available)
- OpenRouter API key
-
Clone the repository
git clone https://github.com/yourusername/promptcraft.git cd promptcraft -
Install dependencies
npm install
-
Setup environment variables
copy .env.example .env.local
Edit
.env.localwith your credentials:NEXT_PUBLIC_SUPABASE_URL=your-supabase-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key OPENROUTER_API_KEY=your-openrouter-key
-
Setup Supabase database
- Follow the guide in SUPABASE_SETUP.md
- Run the SQL schema in Supabase SQL Editor
-
Run development server
npm run dev
-
Open in browser
http://localhost:3000
promptcraft/
βββ app/ # Next.js app directory
β βββ auth/ # Authentication pages
β β βββ signin/ # Sign in page
β β βββ signup/ # Sign up page
β β βββ callback/ # OAuth callback
β βββ marketplace/ # Marketplace pages
β βββ api/ # API routes
β βββ globals.css # Global styles
β βββ layout.js # Root layout
β βββ page.jsx # Homepage
βββ components/ # React components
β βββ AuthProvider.js # Auth context provider
β βββ Navbar.jsx # Navigation bar
β βββ Footer.jsx # Footer component
β βββ ...
βββ lib/ # Utility libraries
β βββ supabase.js # Supabase client & helpers
β βββ hooks.js # Custom React hooks
β βββ utils.js # Utility functions
β βββ constants.js # App constants
βββ supabase/ # Supabase configuration
β βββ schema.sql # Database schema
βββ public/ # Static assets
βββ ...
lib/supabase.js- Supabase client configuration and helper functionscomponents/AuthProvider.js- Global authentication state managementapp/globals.css- Design system with CSS variables and animationslib/hooks.js- Custom React hooks (useDebounce, useLocalStorage, etc.)lib/constants.js- Application constants and configuration
/* Primary Gradient */
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
/* Secondary Gradient */
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
/* Accent Gradient */
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);- Headings: Space Grotesk (Google Fonts)
- Body: Inter (Google Fonts)
- Code: Monospace
- Glass Cards:
glass-cardclass - Gradient Text:
gradient-textclass - Hover Scale:
hover-scaleclass - Animations: float, pulse-glow, shimmer, fade-in, shake
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL | β |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anonymous key | β |
DATABASE_URL |
PostgreSQL connection string | β |
OPENROUTER_API_KEY |
OpenRouter API key | β |
NEXT_PUBLIC_SITE_URL |
Site URL (for OAuth) | β |
MIDTRANS_SERVER_KEY |
Midtrans payment key | β |
MIDTRANS_CLIENT_KEY |
Midtrans client key | β |
See detailed guide: SUPABASE_SETUP.md
- Create Supabase project
- Get API keys
- Run database schema
- Configure OAuth providers
- Setup email templates
-
Push to GitHub
git add . git commit -m "Initial commit" git push origin main
-
Import to Vercel
- Go to vercel.com
- Click "New Project"
- Import your GitHub repository
-
Add Environment Variables
- Add all variables from
.env.local - Update
NEXT_PUBLIC_SITE_URLto your Vercel domain
- Add all variables from
-
Deploy
- Click "Deploy"
- Wait for build to complete
-
Update OAuth Redirects
- Update Google/GitHub OAuth redirect URLs
- Update Supabase redirect URLs
- prompts - User generated prompts
- templates - Marketplace templates
- purchases - Template purchases
- favorites - User favorites
- reviews - Template reviews
- profiles - Extended user profiles
- β Row Level Security (RLS) enabled
- β User-specific data isolation
- β Public/private content separation
- β Secure authentication flow
- Modern UI/UX with glassmorphism
- Supabase authentication
- Email/password sign up/in
- OAuth (Google, GitHub)
- Database integration
- Prompt history
- Local storage caching
- Marketplace functionality
- Template creation
- Payment integration (Midtrans)
- Real-time collaboration
- API access for developers
- Mobile app (React Native)
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @yourusername
- Twitter: @yourusername
- Email: your.email@example.com
- Next.js - The React Framework
- Supabase - Open source Firebase alternative
- Tailwind CSS - Utility-first CSS framework
- OpenRouter - AI API aggregator
- Vercel - Deployment platform
Need help?
- π§ Email: support@promptcraft.app
- π¬ Discord: Join our community
- π Docs: Read the documentation
- π Issues: Report a bug