{"id":28798405,"url":"https://github.com/itz-me-nvs/charactales","last_synced_at":"2026-04-17T07:32:30.618Z","repository":{"id":299043594,"uuid":"1001904509","full_name":"itz-me-nvs/charactales","owner":"itz-me-nvs","description":"A small app that will generate short stories about imaginary characters.","archived":false,"fork":false,"pushed_at":"2025-06-14T09:38:44.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-14T10:32:14.822Z","etag":null,"topics":["fastapi","groq-api","react","supabase"],"latest_commit_sha":null,"homepage":"","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/itz-me-nvs.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-06-14T09:36:35.000Z","updated_at":"2025-06-14T09:38:47.000Z","dependencies_parsed_at":"2025-06-14T10:32:16.719Z","dependency_job_id":"4535484e-7dae-4f07-b675-e579dace8471","html_url":"https://github.com/itz-me-nvs/charactales","commit_stats":null,"previous_names":["itz-me-nvs/charactales"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itz-me-nvs/charactales","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itz-me-nvs%2Fcharactales","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itz-me-nvs%2Fcharactales/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itz-me-nvs%2Fcharactales/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itz-me-nvs%2Fcharactales/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itz-me-nvs","download_url":"https://codeload.github.com/itz-me-nvs/charactales/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itz-me-nvs%2Fcharactales/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31919977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["fastapi","groq-api","react","supabase"],"created_at":"2025-06-18T05:30:42.553Z","updated_at":"2026-04-17T07:32:30.610Z","avatar_url":"https://github.com/itz-me-nvs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧙‍♂️ CharacTales — Character Story Generator API\n\nCharacTales is a backend service that allows users to create fictional characters and generate creative short stories using LLMs. It is built with **FastAPI**, uses **Supabase** as a cloud-hosted PostgreSQL database, and leverages **Groq**'s API (LLaMA 3 or other supported models) to generate stories.\n\n---\n\n## 🛠 Tech Stack\n\n- **Backend**: FastAPI (Python)\n- **Database**: Supabase (PostgreSQL)\n- **AI Model**: Groq API (LLaMA 3 / Mixtral)\n- **Environment Management**: `venv` + `.env`\n\n---\n\n## 🚀 Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/itz-me-nvs/charactales.git\ncd charactales/backend\n\n```\n\n### 2. Create a Virtual Environment\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n\n```\n\n### 3. Install Dependencies\n\n```bash\npip install -r requirements.txt\n\n```\n\n### 4. Setup Supabase Table\n\nEnsure the characters table exists with:\ncreate table if not exists characters (\n  id uuid default uuid_generate_v4() primary key,\n  name text not null,\n  details text not null\n);\n\nalso Enable RLS and add policy for INSERT\n\n\n### 5. Configure Environment Variables\n\nSUPABASE_URL=https://your-project.supabase.co\nSUPABASE_KEY=your-supabase-anon-key\nGROQ_API_KEY=your-groq-api-key\n\n\n### 6. Run the Development Server\n\nuvicorn main:app --reload\n\n\n\n📦 API Endpoints\n\nPOST /api/create_character\nCreates a new character.\n\n```\n{\n  \"name\": \"Arya Stark\",\n  \"details\": \"A brave girl from Winterfell who learned to fight\"\n}\n```\n\nResponse:\n```\n{\n  hasError: false,\n  message: \"Item created successfully\",\n  data: {\n    id: \"your-character-id\",\n    name: \"Arya Stark\",\n    details: \"A brave girl from Winterfell who learned to fight\",\n    created_at: \"2023-07-28T10:00:00.000Z\"\n  },\n}\n```\n\nPOST /api/generate_story\nGenerates a short story using Groq LLM.\n\n```\n{\n  \"character_name\": \"Arya Stark\"\n}\n```\n\nResponse:\n```\n{\n  hasError: false,\n  message: \"Story generated successfully\",\n  data: {\n    story: \"Once upon a time, a brave girl from Winterfell learned to fight...\"\n  },\n}\n```\n\n\n## Curl commands examples\n\nCreate Character\n\n```bash\ncurl -X POST http://localhost:8000/api/create_character \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Arya Stark\",\n    \"details\": \"A brave girl from Winterfell who learned to fight\"\n}'\n```\n\nExpected Response:\n\n{\n  \"hasError\": false,\n  \"message\": \"Item created successfully\",\n  \"data\": {\n    \"id\": \"your-character-id\",\n    \"name\": \"Arya Stark\",\n    \"details\": \"A brave girl from Winterfell who learned to fight\",\n    \"created_at\": \"2023-07-28T10:00:00.000Z\"\n  }\n}\n\n```\n\nGenerate Story\n\n```bash\ncurl -X POST http://localhost:8000/api/generate_story \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"character_name\": \"Arya Stark\"\n  }'\n```\n\nExpected Response:\n\n{\n  \"hasError\": false,\n  \"message\": \"Story generated successfully\",\n  \"data\": {\n    \"story\": \"Once upon a time, a brave girl from Winterfell learned to fight...\"\n  }\n\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitz-me-nvs%2Fcharactales","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitz-me-nvs%2Fcharactales","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitz-me-nvs%2Fcharactales/lists"}