Spaces:
Configuration error
Configuration error
feat: add /llms.txt route for AI discoverability
Browse files- src/app/llms.txt/route.ts +95 -0
src/app/llms.txt/route.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { NextResponse } from 'next/server'
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* /llms.txt β Machine-readable site description for AI assistants and crawlers.
|
| 5 |
+
* This helps AI search engines (Perplexity, ChatGPT, etc.) understand what
|
| 6 |
+
* OpenPrompt offers and how to navigate the site.
|
| 7 |
+
*
|
| 8 |
+
* Spec: https://llmstxt.org/
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
const BASE_URL = process.env.NEXT_PUBLIC_APP_URL || 'https://open-prompt.netlify.app'
|
| 12 |
+
|
| 13 |
+
export async function GET() {
|
| 14 |
+
const content = `# OpenPrompt
|
| 15 |
+
|
| 16 |
+
> The GitHub for AI Prompts β Transform AI prompts into shareable micro-apps.
|
| 17 |
+
|
| 18 |
+
## About
|
| 19 |
+
|
| 20 |
+
OpenPrompt is an open-source platform where users create, share, remix, and run AI prompts as micro-apps. It supports multiple AI models (GPT-4, Claude, Gemini, Ollama) and includes 177+ built-in AI tools.
|
| 21 |
+
|
| 22 |
+
## Key Pages
|
| 23 |
+
|
| 24 |
+
- [Home](${BASE_URL}/) β Landing page with featured prompts and platform stats
|
| 25 |
+
- [Explore Prompts](${BASE_URL}/explore) β Browse and search community-created prompts
|
| 26 |
+
- [AI Tools](${BASE_URL}/tools) β 177+ AI-powered tools across 15 categories
|
| 27 |
+
- [Image Prompts](${BASE_URL}/image-prompts) β Gallery for Midjourney, DALL-E, Stable Diffusion, FLUX
|
| 28 |
+
- [AI Characters](${BASE_URL}/characters) β Chat with AI personas and expert mentors
|
| 29 |
+
- [Thunderdome](${BASE_URL}/thunderdome) β Compare AI model outputs side-by-side
|
| 30 |
+
- [Workflows](${BASE_URL}/workflows) β Chain multiple prompts together
|
| 31 |
+
- [Creators](${BASE_URL}/creators) β Browse prompt creators and their profiles
|
| 32 |
+
- [Leaderboard](${BASE_URL}/leaderboard) β Top creators ranked by engagement
|
| 33 |
+
- [Collections](${BASE_URL}/collections) β Curated prompt collections
|
| 34 |
+
- [Frameworks](${BASE_URL}/frameworks) β Prompt engineering frameworks (RACE, CARE, APE, etc.)
|
| 35 |
+
- [Forum](${BASE_URL}/forum) β Community discussions and Q&A
|
| 36 |
+
- [Pricing](${BASE_URL}/pricing) β Free and Pro plans
|
| 37 |
+
- [API Docs](${BASE_URL}/docs/api) β Public API documentation
|
| 38 |
+
- [Browser Extension](${BASE_URL}/extension) β Use prompts in ChatGPT, Claude, Gemini
|
| 39 |
+
|
| 40 |
+
## Categories
|
| 41 |
+
|
| 42 |
+
- Content β Writing, blogging, social media content
|
| 43 |
+
- Development β Code generation, debugging, documentation
|
| 44 |
+
- Marketing β Strategy, ads, campaigns, SEO
|
| 45 |
+
- Business β Plans, pitches, analysis, financial models
|
| 46 |
+
- Education β Lesson plans, quizzes, tutoring
|
| 47 |
+
- Creative β Stories, scripts, poetry, art prompts
|
| 48 |
+
- Research β Analysis, summaries, literature review
|
| 49 |
+
|
| 50 |
+
## Tool Categories (177+ tools)
|
| 51 |
+
|
| 52 |
+
- Prompting (9) β Optimizer, Chain-of-Thought, Meta-Prompt
|
| 53 |
+
- Marketing (14) β Strategy, Ads, Campaigns, Funnels
|
| 54 |
+
- Branding (11) β Names, Slogans, Voice, Guidelines
|
| 55 |
+
- Copywriting (12) β Headlines, Landing Pages, CTAs
|
| 56 |
+
- Business (15) β Plans, SWOT, Pitches, Financials
|
| 57 |
+
- Email (10) β Sequences, Templates, Subject Lines
|
| 58 |
+
- Product (12) β PRDs, Roadmaps, User Stories
|
| 59 |
+
- HR (11) β Job Posts, Interviews, Onboarding
|
| 60 |
+
- Personal Brand (8) β LinkedIn, Twitter, Bio Generators
|
| 61 |
+
- Operations (9) β SOPs, KPIs, Process Improvement
|
| 62 |
+
- Social Media (12) β Posts, Reels, Calendars, Hashtags
|
| 63 |
+
- Education (10) β Lesson Plans, Quizzes, Curriculum
|
| 64 |
+
- Development (15) β Code Review, Docs, API Design
|
| 65 |
+
- Creative (14) β Stories, Scripts, Poetry, Art
|
| 66 |
+
- Research (15) β Analysis, Summaries, Literature
|
| 67 |
+
|
| 68 |
+
## Supported AI Models
|
| 69 |
+
|
| 70 |
+
- OpenAI: GPT-4o, GPT-4o-mini
|
| 71 |
+
- Anthropic: Claude 3.5 Sonnet, Claude 3 Haiku
|
| 72 |
+
- Google: Gemini 2.5 Flash, Gemini 2.0 Flash
|
| 73 |
+
- Local: 20+ Ollama models (Llama, Mistral, Phi, etc.)
|
| 74 |
+
|
| 75 |
+
## API
|
| 76 |
+
|
| 77 |
+
Public API available at \`${BASE_URL}/api/v1/\`
|
| 78 |
+
- GET /api/v1/prompts β List prompts
|
| 79 |
+
- GET /api/v1/prompts/:slug β Get a specific prompt
|
| 80 |
+
- POST /api/v1/prompts/:slug/run β Execute a prompt
|
| 81 |
+
|
| 82 |
+
## Contact
|
| 83 |
+
|
| 84 |
+
- GitHub: https://github.com/Anky9972/open-prompt
|
| 85 |
+
- Twitter: https://twitter.com/anky_vivek
|
| 86 |
+
- Email: ankygaur9972@gmail.com
|
| 87 |
+
`
|
| 88 |
+
|
| 89 |
+
return new NextResponse(content, {
|
| 90 |
+
headers: {
|
| 91 |
+
'Content-Type': 'text/plain; charset=utf-8',
|
| 92 |
+
'Cache-Control': 'public, max-age=86400, stale-while-revalidate=3600',
|
| 93 |
+
},
|
| 94 |
+
})
|
| 95 |
+
}
|