A Next.js application that provides a directory of AI prompts with an integrated chat interface powered by OpenAI-compatible APIs.
- AI Prompt Directory: Browse and explore various AI prompts organized by categories
- Interactive Chat Interface: Try prompts with real AI models
- OpenAI API Integration: Support for OpenAI and compatible APIs
- Model Selection: Choose from available models from your configured API
- Persistent Chat History: Chat sessions are saved in browser localStorage
- Responsive Design: Works seamlessly on desktop and mobile devices
- TypeScript Support: Full TypeScript integration for type safety
- Next.js App Router: Built with Next.js App Router for modern routing
app/ # Next.js App Router pages
├── layout.tsx # Root layout
├── page.tsx # Home page
├── api/trending/ # API routes
└── directory/ # Directory pages
├── page.tsx # Directory listing
└── [id]/page.tsx # Prompt detail page
components/ # Reusable React components
├── Header.tsx # Header component
├── PromptGrid.tsx # Grid of prompts
├── PromptCard.tsx # Individual prompt card
├── Chat.tsx # Chat interface component
└── ... # Other components
lib/ # Utility functions and libraries
└── openai.ts # OpenAI API integration
prompts/ # AI prompt files
└── Act as a ... # Individual prompt files
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
- Click the "Configure" button in the top-right corner of the header
- Read and acknowledge the security warning about API key storage
- Enter your OpenAI API key and base URL
- The default URL is
https://api.openai.com/v1for OpenAI - For other compatible APIs, enter the appropriate base URL
- Click "Save & Test" to verify the configuration
- Navigate to any prompt detail page
- Select a model from the dropdown (if not configured, you'll see a message to configure first)
- Start chatting with the AI using the selected prompt as context
- Chat history is automatically saved and restored when you return to the page
This project uses:
- Next.js App Router
- TypeScript
- Tailwind CSS for styling
- Shadcn UI components
- React Hook Form for form handling
- Zod for validation
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.