{"id":13669720,"url":"https://github.com/onflow/kitty-items","last_synced_at":"2025-04-27T08:32:58.566Z","repository":{"id":37565224,"uuid":"329720096","full_name":"onflow/kitty-items","owner":"onflow","description":"Kitty Items: CryptoKitties Sample App","archived":true,"fork":false,"pushed_at":"2024-07-08T16:01:35.000Z","size":33367,"stargazers_count":411,"open_issues_count":1,"forks_count":209,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-04-21T06:11:17.109Z","etag":null,"topics":["blockchain","cryptokitties","dapp","flow","sample"],"latest_commit_sha":null,"homepage":"https://kitty-items.onflow.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onflow.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":"2021-01-14T19:56:46.000Z","updated_at":"2025-04-07T08:10:27.000Z","dependencies_parsed_at":"2023-01-19T12:45:59.723Z","dependency_job_id":"6d292586-12d2-443b-a1e3-413157e61094","html_url":"https://github.com/onflow/kitty-items","commit_stats":{"total_commits":1211,"total_committers":43,"mean_commits":"28.162790697674417","dds":0.4616019818331957,"last_synced_commit":"e2255bce7ff5f34fca242374489d3601d0ba3daf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Fkitty-items","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Fkitty-items/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Fkitty-items/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Fkitty-items/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onflow","download_url":"https://codeload.github.com/onflow/kitty-items/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251112610,"owners_count":21538162,"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":["blockchain","cryptokitties","dapp","flow","sample"],"created_at":"2024-08-02T09:00:20.635Z","updated_at":"2025-04-27T08:32:53.550Z","avatar_url":"https://github.com/onflow.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Flow区块链"],"sub_categories":["应用"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://kitty-items.onflow.org/\"\u003e\n    \u003cimg width=\"400\" src=\"assets/kitty-items-banner.png\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Important Message\n\nThis repo is deprecated and archived. If you want to learn how\nto build on Flow with a demo app,\nplease see the [Flow App Quickstart guide](https://developers.flow.com/build/guides/flow-app-quickstart).\n\nIf you want an example of an NFT project on Flow,\nsee the [Flow NFT Guide](https://developers.flow.com/build/guides/nft)\nor the [Flow NonFungibleToken repo](https://github.com/onflow/flow-nft).\n\n# Archived Content\n\nThis demo app is designed to help you learn to build on Flow.\n\n- Kitty Items: CryptoKitties Sample App is a **complete NFT marketplace** built with [Cadence](https://docs.onflow.org/cadence), Flow's resource-oriented smart contract programming language.\n- Learn how to deploy contracts, mint NFTs, and integrate user wallets with the Flow Client Library (FCL).\n\n## 🎬 Live Demo\n\nCheck out the [live demo of Kitty Items](https://kitty-items.onflow.org/),\ndeployed on the Flow Testnet. The demo features 4 main views: homepage, marketplace, profile page, \u0026 admin view to mint your very own Kitty Items.\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"400\" src=\"assets/kitty-items-homepage-view.png\" /\u003e\n\u003c/p\u003e\n\n## ✨ Getting Started\n\n\u003e Looking for a step by step guide? [**Follow the Kitty Items tutorial in the Flow documentation**](https://docs.onflow.org/kitty-items/install/).\n\n### 1. Install Dependencies\n\n_🛠 This project requires `NodeJS v16.x` or above._ See: [Node installation instructions](https://nodejs.org/en/) \u003cbr/\u003e\n_🛠 This project requires `flow-cli v0.39.1` or above._ See: [Flow CLI installation instructions](https://docs.onflow.org/flow-cli) \u003cbr/\u003e\n_🛠 This project requires `Python v3.6` or above._ See: [Python installation instructions](https://www.python.org/downloads)\n\n### 2. Clone the project\n\n```sh\ngit clone --depth=1 https://github.com/onflow/kitty-items.git\n```\n\n### 3. Install packages\n\n- Run `npm install` in the root of the project.\n\n⚠️ **NOTE for Mac M1 users:** \u003cbr/\u003e\nYou'll need to run the following command in the web project: \u003cbr/\u003e\nFrom the `./web` directory run `npm install -D @next/swc-darwin-arm64`\n\n## Local development\n\nRun this command to start Kitty Items with the Flow local development suite:\n```\nnpm run dev:emulator\n```\nNote: This script launches the [Flow Emulator](https://docs.onflow.org/emulator/) and [FCL Development Wallet](https://github.com/onflow/fcl-dev-wallet) to simulate the blockchain and an FCL-compatible wallet using the [initialization code in this repository](/.ki-scripts/README.md)\n\n## Testnet development\n\nRun `npm run dev:testnet` and follow the prompt to begin developing on testnet.\n\nIf this is your first time interacting with KI or Flow, you will need to create a wallet account (Blocto) using an email. \n***If you created a wallet (Blocto) account before July 7th, the user should create a new account with Blocto. This is because the account storage paths have changed, and the older accounts may result in conflicting paths during minting/purchasing.***\n\n---\n\n## Cypress tests\nThere are 3 ways tests can be run:\n1. dev environment - start the server with `npm run dev:emulator` and run cypress `npx cypress run --headed --browser chrome`\n2. Github actions locally - requires the use of `https://github.com/nektos/act`\n   - On Apple M1 - `act -j cypress --container-architecture linux/arm64`\n   - On Intel/AMD - `act -j cypress --container-architecture linux/amd64`\n3. Github actions - executed automatically when merged to master. Add your branch name to `integration-local.yml` after line 10 to trigger workflows for every push into your remote branch.\n\n\n## Project Overview\n\n![Project Overview](/assets/kitty-items-diagram.png)\n\n## 🔎 Legend\n\nAbove is a basic diagram of the parts of this project contained in each folder, and how each part interacts with the others.\n\n### 1. Web App (Static website) | [kitty-items/web](https://github.com/onflow/kitty-items/tree/master/web)\n\nA true dapp, client-only web app. This is a complete web application built with React that demonstrates how to build a static website that can be deployed to an environment like IPFS and connects directly to the Flow blockchain using `@onflow/fcl`. No servers required. `@onflow/fcl` handles authentication and authorization of [Flow accounts](https://docs.onflow.org/concepts/accounts-and-keys/), [signing transactions](https://docs.onflow.org/concepts/transaction-signing/), and querying data using using Cadence scripts.\n\n### 2. Look Ma, a Web Server! | [kitty-items/api](https://github.com/onflow/kitty-items/tree/master/api)\n\nWe love decentralization, but servers are still very useful, and this one's no exception. The code in this project demonstrates how to connect to Flow using [Flow JavaScript SDK](https://github.com/onflow/flow-js-sdk) from a Node JS backend. It's also chalk-full of handy patterns you'll probably want to use for more complex and feature-rich blockchain applications, like storing and querying events using a SQL database (Postgres). The API demonstrates how to send transactions to the Flow blockchain, specifically for minting [Kitty Items](https://github.com/onflow/kitty-items/blob/master/cadence/contracts/KittyItems.cdc) (non-fungible tokens).\n\n### 3. Cadence Code | [kitty-items/cadence](https://github.com/onflow/kitty-items/tree/master/cadence)\n\n[Cadence](https://docs.onflow.org/cadence) smart contracts, scripts \u0026 transactions for your viewing pleasure. This folder contains all of the blockchain logic for the marketplace application. Here you will find examples of [fungible token](https://github.com/onflow/flow-ft) and [non-fungible token (NFT)](https://github.com/onflow/flow-nft) smart contract implementations, as well as the scripts and transactions that interact with them. It also contains examples of how to _test_ your Cadence code.\n\n## 😺 What are Kitty Items?\n\nItems are hats for your cats, but under the hood they're [non-fungible tokens (NFTs)](https://github.com/onflow/flow-nft) stored on the Flow blockchain.\n\nItems can be purchased from the marketplace with fungible tokens.\nIn the future you'll be able to add them to [Ethereum CryptoKitties](https://www.cryptokitties.co/) with ownership validated by an oracle.\n\n## ❓ More Questions?\n\n- Chat with the team on the [Flow Discord server](https://discord.gg/xUdZxs82Rz)\n- Ask questions on the [Flow community forum](https://forum.onflow.org/t/kitty-items-marketplace-demo-dapp/759/5)\n\n## Troubleshooting\n\n#### Non-Intel issues \u003cbr/\u003e\n\nYou'll need to run the following command in the web project: \u003cbr/\u003e\nFrom the `./web` directory run `npm install -D @next/swc-darwin-arm64` \u003cbr/\u003e\nIf you're running on another non-intel based system, the issue and troubleshooting steps are detailed here: [https://github.com/vercel/next.js/discussions/30468](https://github.com/vercel/next.js/discussions/30468)\n\n#### Rebuild dependencies\n\n- The `api` and `web` projects depend on `sqlite3`. If you change `node` versions on your system, you'll need to cd into the `web` and `api` directory and run `npm rebuild` to rebuild you dependencies for the new version.\n\n#### Finding the logs\n\n- You can see what processes have been started, and if they are online using `pm2 list`\n- You can tail logs for individual processes using `pm2 logs [process name]`. eg., `pm2 logs api` or `pm2 logs web`\n- You can tail _all logs_ in the same terminal using `pm2 logs`\n\n#### Starting over\n\n- In the event of problems, you may want to start over. To reset the project, perform these steps:\n  - Run `pm2 delete all` to stop and delete all processes\n  - Delete database files in `./api`. (`kitty-items-db-*.sqlite`)\n\n#### Unblock ports\n\n- Kitty Items uses the following ports. Make sure they are not in use by another process\n  - `8080` : Flow emulator\n  - `3569` : Flow emulator\n  - `3000` : Kitty Items API\n  - `3001` : Kitty Items web app\n  - `8701` : FCL dev-wallet\n\n#### Understanding the Marketplace\n\n- The Kitty Items Marketplace on testnet is universal. _Every instance of Kitty Items deployed on Testnet points to the same marketplace (`NFTStorefrontV2`) contract_. So, you may see other listing s showing up in your Kitty items instance, but you will not see items in _your_ marketplace page that were added _before_ you deployed your instance of Kitty Items.\n\n---\n\n🚀 Happy Hacking!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonflow%2Fkitty-items","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonflow%2Fkitty-items","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonflow%2Fkitty-items/lists"}