Skip to content

Decentralized E-commerce - Oxford 2024 Hackathon

Notifications You must be signed in to change notification settings

icp-hackathons/Oxford

 
 

Repository files navigation

Oxford-Hackathon Corruption Combat Coders

Welcome to the Decomm (decentralized e-commerice) project and to the internet computer development community.

To get started, you might want to explore the project directory structure and the default configuration file. Working with this project in your development environment will not affect any production deployment or identity tokens.

To learn more before you start working with back_end and front_end, see the following documentation available online:

The DFINITY Command-Line


This project utilizes The DFINITY command-line execution environment (dfx). The primary tool for creating, deploying, and managing, dapps that are developed in for the Internet Computer.

Note that currently the dfx tool is not natively supported on windows.

In order to use dfx on a Windows machine you'll need to download the Windows Subsystem for Linux (WSL). Refer to Microsoft's official guide here, and here

Installing IC SDK and DFX

To install dfx run the following:

sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"

To verify that the IC SDK is successfully installed, run the following command:

dfx --version

It's recommended to create an identity using dfx. To set an identity and a key run the following command:

dfx identity new

Learn more about dfx identities here - dfx identity

Starting the project


If you want to start working on your project, run the following commands:

Open two separate terminals and in each terminal run:

# Terminal 1
cd ..
npm run generate
npm run startdfx
# Terminal 2
npm run deploy

This will build and deploy the project locally.

Running the project locally with Hot Module Replacement

If you want to test your project locally with Hot Module Replacement (HMR), you can use the following commands:

# Terminal 1
cd ..
npm run generate
npm run startdfx
# Terminal 2
npm run deploy
npm run dev

Using svelte's native localhost:5173 local server you can now edit your code with HMR without the need to rebuild the files to see changes.

Deploying to IC

To deploy to the internet computer run the following command:

npm run deployIC

or

dfx deploy --network ic backend && dfx deploy --network ic frontend

Additional Commands

A list of all predefined commands can be found in the package.json file.

Here are some commands that might be useful:

To deposit cycles to a canister run:

npm run addCyclesIC <amount> <Canister ID>

To check the status of a canister run:

npm run canisterStatus <Canister ID>

To rebuild a canisters on the internet computer run:

npm run rebuildCanister <Canister ID>

To get the ID of a canister from the canister name run:

npm run canisterIDIC <Canister Name>

Design Documents

Design documents such as architecture design, UI mokcups, and data designs can be found in the design documents folder in this repository. View Design Documnets

About

Decentralized E-commerce - Oxford 2024 Hackathon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Modelica 53.6%
  • Motoko 32.4%
  • Svelte 9.3%
  • JavaScript 2.5%
  • TypeScript 1.7%
  • CSS 0.3%
  • Other 0.2%