{"id":30043279,"url":"https://github.com/prateek/lmctfy.ai","last_synced_at":"2026-02-07T08:31:25.415Z","repository":{"id":307733178,"uuid":"1030540477","full_name":"prateek/lmctfy.ai","owner":"prateek","description":"Let Me ChatGPT That For You - Create shareable links to demonstrate how easy it is to ask ChatGPT a question","archived":false,"fork":false,"pushed_at":"2025-08-01T21:31:51.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-01T22:35:20.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prateek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-01T20:22:59.000Z","updated_at":"2025-08-01T21:31:57.000Z","dependencies_parsed_at":"2025-08-01T22:35:22.190Z","dependency_job_id":"7e902fd3-e154-4414-844b-654315ddb842","html_url":"https://github.com/prateek/lmctfy.ai","commit_stats":null,"previous_names":["prateek/lmctfy.ai"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/prateek/lmctfy.ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prateek%2Flmctfy.ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prateek%2Flmctfy.ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prateek%2Flmctfy.ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prateek%2Flmctfy.ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prateek","download_url":"https://codeload.github.com/prateek/lmctfy.ai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prateek%2Flmctfy.ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29190177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-07T04:57:56.156Z","updated_at":"2026-02-07T08:31:25.403Z","avatar_url":"https://github.com/prateek.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LMCTFY.ai\n\n**Let Me ChatGPT That For You** - A playful tool inspired by LMGTFY that demonstrates how to ask ChatGPT a question through an animated browser simulation.\n\n## Overview\n\nLMCTFY.ai is a single-page web application that helps users create shareable links that demonstrate asking ChatGPT questions. When someone clicks the generated link, they see an animated browser simulation showing the steps to ask ChatGPT, followed by an automatic redirect to ChatGPT with the question pre-filled.\n\n## Features\n\n- **Link Generator**: Enter a question and generate a shareable LMCTFY link\n- **Animated Demo**: Shows a step-by-step browser simulation of asking ChatGPT\n- **Short URLs**: Create shortened links for easier sharing via Cloudflare KV storage\n- **Preview Mode**: Preview the animated demo without redirecting to ChatGPT\n- **Responsive Design**: Works on desktop and mobile devices\n- **No Dependencies**: Pure HTML, CSS, and JavaScript - no external libraries\n\n## How It Works\n\n1. **Generator Mode** (default): Enter a question and generate a shareable link\n2. **Player Mode** (when `?q=` parameter is present): Shows animated demo with these steps:\n   - Step 1: Navigate to chat.openai.com\n   - Step 2: Type the question\n   - Step 3: Hit Send\n   - Redirect to ChatGPT with the question pre-filled\n\n## Tech Stack\n\n- **Frontend**: Vanilla HTML, CSS, JavaScript (single file)\n- **Backend**: Cloudflare Pages Functions for URL shortening\n- **Storage**: Cloudflare KV for short URL mappings\n- **Deployment**: Cloudflare Pages\n\n## Development\n\n### Prerequisites\n\n- Node.js and npm\n- Cloudflare account (for KV storage and deployment)\n- Wrangler CLI\n\n### Local Development\n\n```bash\n# Install dependencies (optional - no build dependencies required)\nnpm install\n\n# Start local development server\nnpm run dev\n\n# Deploy to Cloudflare Pages\nnpm run deploy\n\n# View deployment logs\nnpm run logs\n```\n\n### Development Workflow\n\n1. **Local Testing**: Use `npm run dev` to test locally on `http://localhost:8788`\n2. **Manual Deployment**: Use `wrangler pages deploy --branch main` for production\n3. **Preview Deployments**: Use other branch names for preview environments\n4. **KV Testing**: KV storage works in both local and deployed environments\n\n### Project Structure\n\n```\n├── public/\n│   ├── index.html          # Main application file\n│   └── assets/\n│       └── logo.png        # LMCTFY logo\n├── functions/\n│   └── api/\n│       └── kv/\n│           └── index.js    # KV API endpoint for short URLs\n├── package.json            # NPM scripts and metadata\n├── wrangler.toml          # Cloudflare configuration\n└── README.md              # This file\n```\n\n## Configuration\n\nThe application uses Cloudflare KV for URL shortening. The KV namespace binding is configured in `wrangler.toml`:\n\n```toml\nname = \"lmctfy-ai\"\ncompatibility_date = \"2025-08-04\"\npages_build_output_dir = \"public\"\n\n[[kv_namespaces]]\nbinding = \"LMCTFY_KV\"\nid = \"15c67f509d4e46548fb840754d3128bc\"\npreview_id = \"2ff697068ff64deda85350624d557f18\"\n\n[env.production]\nvars = { ENVIRONMENT = \"production\" }\n\n[[env.production.kv_namespaces]]\nbinding = \"LMCTFY_KV\"\nid = \"15c67f509d4e46548fb840754d3128bc\"\n\n[env.preview]\nvars = { ENVIRONMENT = \"preview\" }\n\n[[env.preview.kv_namespaces]]\nbinding = \"LMCTFY_KV\"\npreview_id = \"2ff697068ff64deda85350624d557f18\"\n```\n\n### Environment Setup\n\n1. **KV Namespace**: Create a KV namespace in your Cloudflare dashboard\n2. **Update IDs**: Replace the KV namespace IDs in `wrangler.toml` with your own\n3. **Authentication**: Run `wrangler login` to authenticate with Cloudflare\n\n## API Endpoints\n\n### POST /api/kv\nCreate a short URL for a prompt.\n\n**Request Body:**\n```json\n{\n  \"prompt\": \"Your ChatGPT question here\"\n}\n```\n\n**Response:**\n```json\n{\n  \"shortUrl\": \"https://lmctfy.ai/abc123\",\n  \"key\": \"abc123\",\n  \"originalUrl\": \"https://lmctfy.ai/?q=encoded-prompt\"\n}\n```\n\n### GET /api/kv?key=abc123\nRetrieve the original prompt from a short URL key.\n\n**Response:**\n```json\n{\n  \"value\": {\n    \"prompt\": \"Your ChatGPT question here\",\n    \"createdAt\": 1690234567890,\n    \"originalUrl\": \"https://lmctfy.ai/?q=encoded-prompt\"\n  }\n}\n```\n\n## Usage Examples\n\n### Basic Link Generation\n```\nhttps://lmctfy.ai/?q=How%20do%20I%20center%20a%20div%20in%20CSS%3F\n```\n\n### Preview Mode\n```\nhttps://lmctfy.ai/?q=How%20do%20I%20center%20a%20div%20in%20CSS%3F\u0026preview=1\n```\n\n### Short URL\n```\nhttps://lmctfy.ai/abc123\n```\n\n## Deployment\n\nThe application is deployed to Cloudflare Pages and accessible at:\n- **Production**: [lmctfy.ai](https://lmctfy.ai)\n- **Pages Subdomain**: [lmctfy-ai.pages.dev](https://lmctfy-ai.pages.dev)\n\n### Deployment Methods\n\n#### Option 1: Manual Deployment (Current Setup)\n\n```bash\n# Deploy to production (main branch)\nwrangler pages deploy --branch main\n\n# Deploy to preview (other branches)\nwrangler pages deploy --branch feature-branch\n```\n\n#### Option 2: Git Integration (Recommended for CI/CD)\n\nConnect your GitHub repository to Cloudflare Pages for automatic deployments:\n\n1. Go to [Cloudflare Dashboard](https://dash.cloudflare.com) \u003e Pages\n2. Select your project \u003e Settings \u003e Build \u0026 deployments\n3. Connect your GitHub repository\n4. Set build configuration:\n   - **Build command**: `` (empty)\n   - **Build output directory**: `public`\n   - **Root directory**: `/`\n\n### Custom Domain Setup\n\n1. **Add domain to Cloudflare**: Ensure `lmctfy.ai` is managed by Cloudflare DNS\n2. **Configure nameservers**: Point your domain's nameservers to Cloudflare\n3. **Add custom domain**: In Pages project settings, add `lmctfy.ai` as custom domain\n4. **SSL certificate**: Cloudflare automatically provisions SSL certificates\n\n### Important Notes\n\n- Use `--branch main` for production deployments to ensure custom domain works\n- Preview deployments (other branches) only work on `*.pages.dev` subdomains  \n- KV namespaces must be configured for both production and preview environments\n- Changes to `wrangler.toml` require redeployment to take effect\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test locally with `npm run dev`\n5. Submit a pull request\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Credits\n\n- Created by [Prateek Rungta](https://github.com/prateek)\n- Inspired by the original [LMGTFY](https://lmgtfy.com)\n- Not affiliated with OpenAI\n\n## Links\n\n- **Live Site**: [lmctfy.ai](https://lmctfy.ai)\n- **GitHub**: [github.com/prateek/lmctfy.ai](https://github.com/prateek/lmctfy.ai)\n- **Author**: [@prateekrungta](https://twitter.com/prateekrungta)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprateek%2Flmctfy.ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprateek%2Flmctfy.ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprateek%2Flmctfy.ai/lists"}