{"id":15011764,"url":"https://github.com/geekcoderscz/ai-generation","last_synced_at":"2026-03-09T04:04:46.873Z","repository":{"id":230949359,"uuid":"780541057","full_name":"geekcoderscz/ai-generation","owner":"geekcoderscz","description":"Simple UI and Backend for AI generation using cloudflare","archived":false,"fork":false,"pushed_at":"2024-06-19T00:33:14.000Z","size":6458,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T04:07:00.524Z","etag":null,"topics":["ai","cloudflare-ai","cloudflare-pages","cloudflare-workers","preact","typescript"],"latest_commit_sha":null,"homepage":"https://geekcoderscz.github.io/ai-generation/","language":"TypeScript","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/geekcoderscz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-04-01T17:35:32.000Z","updated_at":"2024-05-13T10:50:22.000Z","dependencies_parsed_at":"2024-10-14T03:20:28.971Z","dependency_job_id":"8a1034ea-0c39-4c18-ae69-3aa46c48c6b4","html_url":"https://github.com/geekcoderscz/ai-generation","commit_stats":{"total_commits":55,"total_committers":4,"mean_commits":13.75,"dds":"0.32727272727272727","last_synced_commit":"fba5205e28e5063eedaf509d505e05caaea3322c"},"previous_names":["geekcoderscz/ai-generation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekcoderscz%2Fai-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekcoderscz%2Fai-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekcoderscz%2Fai-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekcoderscz%2Fai-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geekcoderscz","download_url":"https://codeload.github.com/geekcoderscz/ai-generation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514228,"owners_count":21116903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ai","cloudflare-ai","cloudflare-pages","cloudflare-workers","preact","typescript"],"created_at":"2024-09-24T19:41:37.230Z","updated_at":"2026-03-09T04:04:39.120Z","avatar_url":"https://github.com/geekcoderscz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare Ai Generation\n\n## Overview\nThis project is a simple web application that utilizes Cloudflare Workers for the backend and Preact for the frontend. Cloudflare Workers provide serverless compute environments that enable developers to deploy code at the edge of Cloudflare's network, closer to users, which can significantly improve performance and reduce latency. Preact, a lightweight alternative to React, is used for building fast and efficient user interfaces.\n\n### [Demo link](https://geekcoderscz.github.io/ai-generation/)\n\nOnly the free cloudflare provider is allowed on this url\n\n#### Image Generation\n![UI Image Showcase](./images/image1.png)\n\n#### Chat\n![UI Chat Showcase](./images/image2.png)\n\n#### Multiple providers\n![UI Provider Dropdown Showcase](./images/image3.png)\n\n## Features\n- Serverless backend powered by Cloudflare Workers\n- Lightweight and efficient frontend built with Preact\n- Responsive design for various screen sizes\n- Minimalistic user interface\n\n## Technologies Used\n- [Cloudflare Workers](https://workers.cloudflare.com/): Serverless compute platform\n- [Preact](https://preactjs.com/): Fast 3kB alternative to React with the same modern API\n- HTML/CSS: For structuring and styling the frontend\n- JavaScript: Programming language used for both backend and frontend logic\n\n## Setup\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/geekcoderscz/ai-generation.git\n    ```\n2. Install dependencies for frontend:\n    ```bash\n    cd ui\n    npm install\n    ```\n3. Install dependencies for backend:\n    ```bash\n    cd api\n    npm install\n    ```\n4. Fill in the environment variables for frontend and backend:\n    ```bash\n    cd api\n    cp wrangler.example.toml wrangler.prod.toml\n    cp wrangler.example.toml wrangler.toml\n    cd ../ui\n    cp .env.production\n    ```\n5. Deploy UI Workers:\n    ```bash\n    cd ui\n    npm run deploy:cf\n    ```\n6. Deploy Cloudflare Workers:\n    ```bash\n    cd api\n    npm run deploy:cf\n    ```\n7. Migrate D1 Cloudflare Database:\n    ```bash\n    cd api\n    npx wrangler d1 execute prod-img-engine --file=./migrations/01.sql\n    npx wrangler d1 execute prod-img-engine --file=./migrations/02.sql\n    ```\n   \n## Frontend variables\nFile `ui/.env`\n\n```VITE_API_HOST=\"https://YOUR_DOMAIN/api\"```\n\n## Backend variables\nFile `api/wrangler.toml`\n\n```OPEN_AI_KEY = \"***\"```\n\n```OPENAI_AI_ENABLED = false```\n\n```CLOUDFLARE_AI_ENABLED = true```\n\n## Usage\nOnce deployed, users can access the application through the provided Cloudflare Workers URL. The frontend interface allows users to interact with the backend through various actions such as fetching data or submitting forms.\n\n## Contributing\nContributions are welcome! If you'd like to contribute to this project, please follow these steps:\n1. Pull the repository\n2. Create your feature branch (`git checkout -b feature/YourFeature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin feature/YourFeature`)\n5. Create a new Pull Request\n\n## License\nThis project is licensed under the [MIT License](LICENSE.md).\n\n## Acknowledgements\n- Thanks to Cloudflare for providing the powerful serverless platform\n- Preact for offering a lightweight alternative to React\n- Contributors and open-source community for valuable feedback and support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekcoderscz%2Fai-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekcoderscz%2Fai-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekcoderscz%2Fai-generation/lists"}