{"id":31642232,"url":"https://github.com/its-me-nishmal/fun","last_synced_at":"2025-10-07T03:57:32.877Z","repository":{"id":306798529,"uuid":"1027246239","full_name":"Its-me-nishmal/fun","owner":"Its-me-nishmal","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-06T17:09:43.000Z","size":1502,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T17:27:12.934Z","etag":null,"topics":["actions","ai","automaion","cd","ci","cipher","ciphernichu","nichu","nodejs"],"latest_commit_sha":null,"homepage":"https://fun.nichu.dev","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Its-me-nishmal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-27T16:13:49.000Z","updated_at":"2025-10-06T17:09:48.000Z","dependencies_parsed_at":"2025-08-25T04:24:55.046Z","dependency_job_id":"ca188771-b407-441e-a259-97b6f66a5a47","html_url":"https://github.com/Its-me-nishmal/fun","commit_stats":null,"previous_names":["its-me-nishmal/fun"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Its-me-nishmal/fun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-nishmal%2Ffun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-nishmal%2Ffun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-nishmal%2Ffun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-nishmal%2Ffun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Its-me-nishmal","download_url":"https://codeload.github.com/Its-me-nishmal/fun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-nishmal%2Ffun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717450,"owners_count":26033542,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["actions","ai","automaion","cd","ci","cipher","ciphernichu","nichu","nodejs"],"created_at":"2025-10-07T03:57:21.749Z","updated_at":"2025-10-07T03:57:32.872Z","avatar_url":"https://github.com/Its-me-nishmal.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Cipher Nichu - AI-Generated Witty Answers ✨\n\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D18-blue.svg)](https://nodejs.org/en/about/previous-releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis project automatically generates unique, witty, and informative HTML pages based on common Google search queries, powered by AI. It's designed to be a fun and engaging way to explore everyday questions with a touch of humor and unexpected wisdom.\n\n## ✨ Features \u0026 Capabilities\n\n*   🤖 **AI-Powered Content Generation**: Leverages Google's Gemini API to create engaging and funny answers to user-generated topics.\n*   📄 **Automatic HTML Page Creation**: Generates standalone, semantic HTML5 pages with inline dark-themed CSS for a clean, minimalist look.\n*   📈 **SEO Optimized**: Each page includes relevant meta titles, descriptions, and keywords to improve searchability.\n*   🌐 **Auto-Updating Sitemap**: Automatically generates and updates a `sitemap.xml` file to include all generated pages, ensuring discoverability.\n*   💬 **Telegram Notifications**: Sends notifications to a specified Telegram chat whenever a new page is created.\n*   📚 **Topic Management**: Keeps track of generated topics to avoid repetition.\n\n## 🚀 Getting Started \u0026 Setup\n\n### 📋 Prerequisites\n\n*   [Node.js](https://nodejs.org/) (version 18 or higher recommended)\n\n### 🛠️ Installation\n\n1.  🌿 Clone the repository:\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd fun\n    ```\n2.  📦 Install dependencies:\n    ```bash\n    npm install\n    ```\n\n### 🔑 API Keys Configuration\n\nThis project requires API keys for Google Gemini and Telegram. These keys are stored in `config.js` and obfuscated using `obfuscator.js`.\n\n1.  🔑 **Google Gemini API Key**:\n    *   Obtain an API key from the [Google AI Studio](https://aistudio.google.com/).\n    *   Obfuscate your API key using the `obfuscator.js` script (or manually encode it if you prefer).\n    *   Update the `GEMINI_API_KEY` in `config.js`.\n\n2.  🤖 **Telegram Bot Token and Chat ID**:\n    *   Create a Telegram bot using [@BotFather](https://t.me/botfather) on Telegram to get your bot token.\n    *   Find your Telegram Chat ID. You can get this by sending a message to your bot and then checking the Telegram Bot API documentation or using a bot like [@userinfobot](https://t.me/userinfobot).\n    *   Obfuscate your bot token and chat ID.\n    *   Update `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` in `config.js`.\n\n**💡 Example `config.js` (after obfuscation):**\n```javascript\nconst { encode } = require('./obfuscator');\n\nmodule.exports = {\n  GEMINI_API_KEY: \"YOUR_OBFUSCATED_GEMINI_API_KEY\",\n  TELEGRAM_BOT_TOKEN: \"YOUR_OBFUSCATED_TELEGRAM_BOT_TOKEN\",\n  TELEGRAM_CHAT_ID: \"YOUR_OBFUSCATED_TELEGRAM_CHAT_ID\",\n};\n```\n\n## 💡 Usage \u0026 Workflow\n\nTo generate a new witty answer page:\n\n1.  ▶️ Run the script from your terminal:\n    ```bash\n    node generate.js\n    ```\n    Alternatively, you can use the npm script:\n    ```bash\n    npm start\n    ```\n\nThis will:\n*   🧠 Fetch a new, unique question from the Gemini API.\n*   ✨ Generate an HTML page answering the question.\n*   💾 Save the HTML file in the root directory (e.g., `how-to-make-coffee.html`).\n*   🔗 Update the `index.html` with a link to the new page and increment the topic count.\n*   ✅ Add the topic to `completedTopics.json`.\n*   📢 Send a notification to your Telegram bot.\n*   🗺️ Generate/update `sitemap.xml`.\n\n## 📁 Project Structure Overview\n\n*   ☁️ `.env`: Environment variables (if used, though keys are in `config.js`).\n*   ⚙️ `config.js`: Stores obfuscated API keys and configuration.\n*   📜 `generate.js`: The main script for generating content and pages.\n*   🔒 `obfuscator.js`: Utility for encoding/decoding strings (used for API keys).\n*   ✅ `completedTopics.json`: Stores a list of topics already generated.\n*   🏠 `index.html`: The main landing page listing all generated topics.\n*   🌐 `*.html`: Dynamically generated pages for each topic.\n*   🗺️ `sitemap.xml`: An XML sitemap of all generated pages.\n*   📦 `package.json`: Project metadata and dependencies.\n*   🚫 `.gitignore`: Specifies intentionally untracked files that Git should ignore.\n\n## 📄 License \u0026 Legal\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-me-nishmal%2Ffun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fits-me-nishmal%2Ffun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-me-nishmal%2Ffun/lists"}