{"id":23138706,"url":"https://github.com/triptych/puterpets","last_synced_at":"2026-02-24T08:30:22.688Z","repository":{"id":235249382,"uuid":"790379567","full_name":"triptych/puterpets","owner":"triptych","description":"Adopt, raise, and battle little dungeon creatures!","archived":false,"fork":false,"pushed_at":"2024-04-29T03:15:49.000Z","size":328,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T05:24:50.693Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://puterpets.puter.site/","language":"JavaScript","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/triptych.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-22T19:17:36.000Z","updated_at":"2024-08-04T18:56:48.000Z","dependencies_parsed_at":"2024-12-17T13:11:37.425Z","dependency_job_id":"3cf22a44-3bf4-4148-b8bc-92400ccb09b4","html_url":"https://github.com/triptych/puterpets","commit_stats":null,"previous_names":["triptych/puterpets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fputerpets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fputerpets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fputerpets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fputerpets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triptych","download_url":"https://codeload.github.com/triptych/puterpets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239859562,"owners_count":19708863,"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":[],"created_at":"2024-12-17T13:11:35.078Z","updated_at":"2026-02-24T08:30:22.623Z","avatar_url":"https://github.com/triptych.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Project: PuterPets\n\nDescription:\nPuterPets is a web-based virtual pet game where players can discover, adopt, trade, and battle unique dungeon monsters. The game features include pet adoption, battling, item collection, and a home page displaying the player's adopted pet, wins/losses, and inventory.\n\nFiles:\n\n1. index.html\n   - The main entry point of the application.\n   - Includes the necessary HTML structure and links to CSS and JavaScript files.\n   - Uses the `\u003cheader-component\u003e` for the navigation menu.\n   - Displays the home page component (`\u003chome-page\u003e`) with the player's adopted pet, wins/losses, and inventory.\n\n2. style.css\n   - Contains the CSS styles for the application.\n   - Defines styles for the body, header, navigation menu, and various components.\n\n3. header.js\n   - Defines the `Header` web component for the navigation menu.\n   - Includes links to different pages of the application.\n   - Applies styles to the header and navigation menu items.\n   - Implements hover effects for menu items, such as skewing and enlarging.\n\n4. home-page.js\n   - Defines the `HomePage` web component for the home page.\n   - Displays the player's adopted pet, wins/losses, and inventory.\n   - Retrieves data from localStorage for the adopted pet, wins/losses, and inventory.\n   - Renders the pet information and inventory items in a card format.\n\n5. adopt.html\n   - Page for adopting a new pet.\n   - Includes the `\u003cheader-component\u003e` for the navigation menu.\n   - Displays a list of available pets for adoption.\n\n6. field.html\n   - Page for exploring the field and collecting random items.\n   - Includes the `\u003cheader-component\u003e` for the navigation menu.\n   - Displays a question mark that, when clicked, reveals a random item with its attributes.\n   - Stores the collected items in the player's inventory in localStorage.\n\n7. battle.js\n   - Defines the `BattleComponent` web component for pet battles.\n   - Displays the player's pet on the left and a random opponent pet on the right.\n   - Implements a battle system where pets take turns attacking each other.\n   - Updates the pets' HP and displays win/lose messages based on the battle outcome.\n   - Stores the battle results (wins/losses) and updated pet HP in localStorage.\n\n8. petdata.js\n   - Contains the `petdata` object with an array of pet data.\n   - Each pet object includes properties like id, name, iconUrl, and stats (HP and mana).\n   - Used as a data source for displaying pet information and initializing battles.\n\n9. items.json\n   - JSON file containing an array of random fantasy items.\n   - Each item object includes properties like name, goldValue, foodValue, and attackValue.\n   - Used as a data source for generating random items in the field.\n\nComponents:\n\n1. Header (header.js)\n   - Navigation menu component used across all pages.\n   - Provides links to different sections of the application.\n\n2. HomePage (home-page.js)\n   - Displays the player's adopted pet, wins/losses, and inventory on the home page.\n   - Retrieves data from localStorage and renders it in a card format.\n\n3. PetBox (petbox.js)\n   - Displays a pet's information, including its icon, name, HP, and mana.\n   - Allows adopting a pet and storing the adopted pet data in localStorage.\n   - Updates the pet's HP based on battle results.\n\n4. BattleComponent (battle.js)\n   - Implements the pet battle functionality.\n   - Displays the player's pet and a random opponent pet.\n   - Simulates attacks between pets and updates their HP.\n   - Determines the winner based on the remaining HP and stores the results in localStorage.\n\n5. ItemReveal (item-reveal.js)\n   - Displays a question mark that, when clicked, reveals a random item from the items.json file.\n   - Animates the question mark and displays the item's attributes.\n   - Stores the revealed item in the player's inventory in localStorage.\n\nFunctionality:\n\n1. Pet Adoption:\n   - Players can visit the adopt page to view a list of available pets.\n   - Clicking on a pet allows the player to adopt it and store the pet data in localStorage.\n\n2. Pet Battles:\n   - Players can engage in battles with their adopted pet against a random opponent pet.\n   - The battle system involves pets taking turns attacking each other.\n   - The winner is determined based on the remaining HP, and the results are stored in localStorage.\n\n3. Item Collection:\n   - Players can explore the field by clicking on a question mark.\n   - Clicking the question mark reveals a random item with its attributes.\n   - The collected items are stored in the player's inventory in localStorage.\n\n4. Home Page:\n   - The home page displays the player's adopted pet, wins/losses, and inventory.\n   - The data is retrieved from localStorage and rendered in a card format.\n   - The pet's HP is updated based on the battle results.\n\n5. Navigation:\n   - The header component provides a navigation menu to access different pages of the application.\n   - Hovering over the menu items applies visual effects, such as skewing and enlarging.\n\nDependencies:\n- Web Components: The application utilizes custom web components for modularity and reusability.\n- localStorage: Used for storing and retrieving data, such as the adopted pet, wins/losses, and inventory.\n- JSON: Used for storing and retrieving data from external files, such as petdata.js and items.json.\n\nThat's a comprehensive overview of the PuterPets project. By providing this document to a new session, the assistant will have a clear understanding of the project structure, components, functionality, and dependencies. Let me know if you have any further questions!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriptych%2Fputerpets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriptych%2Fputerpets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriptych%2Fputerpets/lists"}