NGD Enterprise has released a sample N3 application as a starting point for Neo developers. Built as an homage to the .NET Pet Shop created when .NET originally launched, the Neo Pet Shop includes a smart contract with an React-based frontend which together allow users to adopt and feed virtual pets.
Similar to create-react-app and other web app templates, Neo Pet Shop includes all the essentials needed to build and run a functional N3-based web app. It can be used as a reference material for basic smart contract development, demonstrates how to handle blockchain interactions, and provides a useful starting point for new applications.
The Neo Pet Shop repository is divided into five main parts:
- NeoPetShop – the Pet Shop smart contract written in C#
- public – minimal HTML/CSS/JS to initialize the Electron app
- src – the Pet Shop UI powered by TypeScript and React framework
- src-server – Backend business logic and N3 blockchain communication
- src-shared – Type definitions for data shared between the backend and UI
Users can build and run the Electron app to interface with the Neo Pet Shop contract on the N3 TestNet to demo the application. Developers that wish to experiment with the smart contract or backend logic can instead opt to build the contract locally and deploy it to a Neo Express private network. This will make it quick and easy to test changes or try out other N3 features.
The repository can be found at the below link:
About The Author: Brett Rhodes
Brett is a blockchain enthusiast and freelance writer who originally began producing content for the gaming & eSports industries. Now he spends most of his time contributing in the Neo ecosystem.
More posts by Brett Rhodes