A dacade Celo Development 101 course dApp.
CeloShop is a mini e-commerce testnet decentralization application(dApp) built on Ethereum Blockchain with Celo Technologies. It makes use of three smart contracts (Seller, Courier, and Buyer SmartContract) to deliver a dApp that is simpler to understand, utilize, and maintain, more resilient and performant, and easier to collaborate on
-
SellerContract is where the majority of the dApp functionality resides. It has the CeloUSDToken interface that performs transactions based functions on the SellerContract and BuyerContract. It also enables buyers to add products, send products to the Courier service, and maintain added products. Lastly, its allows products buyers send product price to sellers upon successful delivery.
-
CourierContract is where the Courier service actions happen. It has restrictions meant just for the Courier representative. It accepts items from sellers and allows item buyers to check delivery status and location from the BuyerContract. Its modifier allows just the Courier representative to perform logistics functions such as changing items location and delivering items.
-
BuyerContract is where all buyer functions reside. It enables buyers to deposit the price of the intended purchase item to the SellerContract and sends the item price to the Seller only when a purchased item has been confirmed and received by the Buyer. It also has functions that allow buyers to check their purchase and logistics status.
- Install the CeloExtensionWallet from the Google Chrome store.
- Create a Wallet.
- Go to https://celo.org/developers/faucet and get tokens for the alfajores testnet.
- Switch to the alfajores testnet in the CeloExtensionWallet.
- Go to the shop Homepage.
Below is the list of available scripts for developments;
npm install
Installs required node packages.
npm run dev
Runs the app in the development mode.
Open https://localhost:3000 to view it in the browser.
npm run build
Compiles and minifies for production.
The below command requires the servez node package. Install globally with:
npm install servez -g
npm run start
Runs the app in production mode.
Open https://localhost:8080 to view it in the browser.
Copyright 2021 Emmanuel Joseph(JET)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.