{"id":20153968,"url":"https://github.com/mattazz/npc-gen","last_synced_at":"2025-06-17T05:40:24.560Z","repository":{"id":149455196,"uuid":"611349532","full_name":"mattazz/npc-gen","owner":"mattazz","description":"Simple Character Generator using OpenAI Chat-GPT","archived":false,"fork":false,"pushed_at":"2024-09-25T12:34:50.000Z","size":22936,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T01:41:20.538Z","etag":null,"topics":["bootstrap","character-generator","chatgpt","dnd","react","state-management","vitejs"],"latest_commit_sha":null,"homepage":"https://mattazz.github.io/npc-gen/","language":"JavaScript","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/mattazz.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}},"created_at":"2023-03-08T16:36:35.000Z","updated_at":"2024-11-15T14:13:47.000Z","dependencies_parsed_at":"2024-11-13T23:34:29.160Z","dependency_job_id":null,"html_url":"https://github.com/mattazz/npc-gen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattazz/npc-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattazz%2Fnpc-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattazz%2Fnpc-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattazz%2Fnpc-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattazz%2Fnpc-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattazz","download_url":"https://codeload.github.com/mattazz/npc-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattazz%2Fnpc-gen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260300483,"owners_count":22988679,"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":["bootstrap","character-generator","chatgpt","dnd","react","state-management","vitejs"],"created_at":"2024-11-13T23:24:07.693Z","updated_at":"2025-06-17T05:40:24.537Z","avatar_url":"https://github.com/mattazz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NPC-GEN\n\nUses Open AI chat-gpt to generate a random NPC for you.\n\n## Overview\n\n![Sample](public/images/sample.gif)\n\n## What I've Learned\n\n### React and Component-Based Architecture\n\n- **Component Creation**: Learned how to create reusable components like [`Header`](src/assets/Components/Header.jsx), [`Card`](src/assets/Components/Card.jsx), and [`GenerateButtons`](src/assets/Components/GenerateButtons.jsx).\n- **State Management**: Utilized React's `useState` and `useEffect` hooks to manage component state and side effects.\n- **Class Components**: Gained experience with class components, as seen in the [`ProfileCard`](src/App.jsx) component, and managing state within them.\n\n### Animation with React Spring\n\n- **useSpring Hook**: Implemented animations using the `useSpring` hook from `@react-spring/web` to create smooth transitions and effects in the [`Header`](src/assets/Components/Header.jsx) component.\n\n### Routing with React Router\n\n- **HashRouter**: Set up client-side routing using `HashRouter` from `react-router-dom` in the main entry point [`main.jsx`](src/main.jsx).\n\n### API Integration\n\n- **OpenAI API**: Integrated the OpenAI API to generate content dynamically, as demonstrated in the `generateHistory` and `generateImage` methods of the [`ProfileCard`](src/App.jsx) component.\n- **Handling Promises**: Managed asynchronous operations and promises effectively to handle API responses.\n\n### Styling and UI/UX\n\n- **CSS and Bootstrap**: Applied custom CSS and Bootstrap for styling components, ensuring a responsive and visually appealing UI.\n- **Animations and Loading Indicators**: Added animations and loading indicators to enhance user experience, such as the loading slime in the `generateHistory` method.\n\n### PDF Generation\n\n- **jsPDF**: Used the `jsPDF` library to export character profiles to PDF format, as seen in the `exportToPDF` method of the [`ProfileCard`](src/App.jsx) component.\n\n### Project Configuration and Deployment\n\n- **Vite**: Configured the project using Vite for fast development and build processes.\n- **GitHub Pages Deployment**: Automated deployment to GitHub Pages using scripts defined in the [`package.json`](package.json).\n\n### Code Organization and Best Practices\n\n- **Modular Code Structure**: Organized code into meaningful directories and files, separating components, assets, and configuration files.\n- **Documentation**: Maintained a clear and updated README to document project features and progress.\n\n## Adding Custom Parameters\n\n![Custom](public/images/custom.gif)\n\n### To-Do:\n\n- [ ] Use Environment Variables in gh pages for default AI key \n- [x] Add absolute help slider to header '?' box\n\n- [ ] Add more customizable options (age, added history (for AI to learn from))\n  - [x] Custom Name\n  - [x] Custom History\n  - [x] Custom Race\n  - [x] Custom Class\n  - [x] Add button to hide / show custom fields\n\n- [x] Users to input their own API key\n\n- [ ] Customizable output (json, txt, etc)\n  - [x] PDF\n  - [ ] Word\n  - [ ] Excel\n\n- [ ] Custom variables for AI response (ie. Max_Tokens, Temperature, etc)\n- [ ] Eliminate duplicate quirks\n\n- [ ] Clean up UI\n  - [x] Circle image border\n  - [x] Add more styling\n  - [x] Mobile friendly\n\n- [ ] Clean up UX\n  - [x] Loading icons when generating \n  - [ ] Fix Slime Loading positions\n  - [x] Animations\n\n- [x] Update README gif to latest build","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattazz%2Fnpc-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattazz%2Fnpc-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattazz%2Fnpc-gen/lists"}