{"id":29286804,"url":"https://github.com/marb2000/genkit-story-generator","last_synced_at":"2025-10-04T18:47:40.855Z","repository":{"id":302355137,"uuid":"1012133003","full_name":"marb2000/genkit-story-generator","owner":"marb2000","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-01T23:15:05.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T00:24:38.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/marb2000.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}},"created_at":"2025-07-01T21:39:16.000Z","updated_at":"2025-07-01T23:15:08.000Z","dependencies_parsed_at":"2025-07-02T00:24:54.062Z","dependency_job_id":"2ff02b06-06d6-47b9-86a4-8f8febad49c5","html_url":"https://github.com/marb2000/genkit-story-generator","commit_stats":null,"previous_names":["marb2000/genkit-story-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marb2000/genkit-story-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marb2000%2Fgenkit-story-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marb2000%2Fgenkit-story-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marb2000%2Fgenkit-story-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marb2000%2Fgenkit-story-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marb2000","download_url":"https://codeload.github.com/marb2000/genkit-story-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marb2000%2Fgenkit-story-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278358473,"owners_count":25973946,"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-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2025-07-06T00:38:48.786Z","updated_at":"2025-10-04T18:47:40.826Z","avatar_url":"https://github.com/marb2000.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genkit Story Generator Example\n\nThe Genkit Story Generator is an AI-powered web application that allows users to generate  stories based on a given topic and desired length. It features a simple  user interface built with Next.js on the frontend, and a backend using Node.js, TypeScript, Express, and Genkit (for accesss Gemini) for story generation.\n\n## 📁 Project Structure\n```\ngenkit-story-generator/\n├── backend/\n│   ├── src/\n│   │   ├── index.ts\n│   └── prompts/\n│   │   └── story-generator.prompt\n└── frontend/\n   └── src/\n       └──app/\n         ├── layout.tsx\n         ├── page.tsx\n         └── globals.css\n```\n## 🛠️ Getting Started\n\nFollow these steps to get your development environment set up.\n\n### Installation\n\n1.  **Clone the repository:**\n    ```bash\n    git clone [https://github.com/marb2000/genkit-story-generator.git](https://github.com/marb2000/genkit-story-generator.git)\n    cd genkit-story-generator\n    ```\n\n2.  **Install backend dependencies:**\n    ```bash\n    cd backend\n    npm install # or yarn install\n    cd ..\n    ```\n\n3.  **Install frontend dependencies:**\n    ```bash\n    cd frontend\n    npm install # or yarn install\n    cd ..\n    ```\n\n4.  **Configure Environment Variables (Backend):**\n    Create a `.env` file in the `backend` directory with your Google AI API key:\n    ```\n    GOOGLE_API_KEY=YOUR_GEMINI_API_KEY\n    PORT=3001\n    ```\n    Replace `YOUR_GEMINI_API_KEY` with your actual API key from Google AI Studio.\n\n### Running the Application\n\n1.  **Start the Backend Server (with Genkit UI Debugger):**\n    Open a new terminal, navigate to the `backend` directory, and run:\n    ```bash\n    cd backend\n    npm run genkit:dev\n    ```\n    This command will start the backend server, typically on `http://localhost:3001`, and also launch the Genkit Developer UI in development mode. You should see console messages indicating both are running, including the URL for the Genkit Developer UI (typically `http://localhost:4000`).\n\n2.  **Start the Frontend Development Server:**\n    Open another terminal, navigate to the `frontend` directory, and run:\n    ```bash\n    cd frontend\n    npm run dev\n    ```\n    This will start the Next.js development server, usually on `http://localhost:3000`.\n\n3.  **Access the Application:**\n    Open your web browser and go to `http://localhost:3000`.\n\n## 🧪 How to Test the Solution\n\nTo test the story generator, follow these steps:\n\n1.  Ensure both the backend and frontend servers are running as described in the \"Running the Application\" section.\n2.  Navigate to `http://localhost:3000` in your web browser.\n3.  In the \"What's your story about?\" input field, type a topic for your story (e.g., \"A futuristic city under the sea\").\n4.  Adjust the \"Story length\" slider to your desired word count (between 10 and 2000).\n5.  You can also click on one of the \"Sample Topics\" buttons to quickly populate the topic field.\n6.  Click the \"Generate Story\" button.\n\n### Expected Behavior:\n\n* The button will change to \"Generating your story...\" with a spinner.\n* After a short period (depending on the story length and API response time), the generated story will appear in the \"Your Story\" section below the form.\n* If there are any issues (e.g., backend not running, invalid input), an error message will be displayed in red below the \"Generate Story\" button.\n* The Genkit Developer UI (typically at `http://localhost:4000`) will show the traces of the `generateStory` flow executions, allowing you to inspect the inputs, outputs, and model calls.\n\nThis allows you to verify that both the frontend and backend are communicating correctly and that the Genkit AI flow is successfully generating stories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarb2000%2Fgenkit-story-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarb2000%2Fgenkit-story-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarb2000%2Fgenkit-story-generator/lists"}