| description | To compile and run the program, use: |
|---|---|
| icon | door-open |
This project combines a React frontend with a Rust-based Internet Computer (ICP) backend using the DFX SDK.
Below are the steps to set up, build, and run the project locally.
Make sure you have the following installed:
- Node.js (v16+ recommended) or Yarn
- Rust and Cargo
- DFX SDK (Internet Computer SDK)
- Git
- Ollama (for AI integration, if applicable)
git clone https://github.com/CoFi-Xyntra/copilot-finance.git
cd copilot-financeIf you don’t have DFX installed yet:
sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"Verify the installation:
dfx --versionIf you don’t have Rust installed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shLoad Rust environment variables:
source ~/.cargo/envAdd the WebAssembly target:
rustup target add wasm32-unknown-unknownCheck Cargo version:
cargo --versionAfter cloning, check the project structure:
ls -laMake sure the following files/folders exist:
dfx.json→ DFX configuration filepackage.json→ Frontend dependenciessrc/→ Rust backend codefrontend/or similar → React frontend source code
rustup target add wasm32-unknown-unknownUsing npm:
npm installOr using yarn:
yarn installdfx start --backgrounddfx deploy(Optional for testing playground mode):
dfx deploy --playgroundnpm startOr:
npm run dev(depending on your package.json setup)
Stop the local DFX replica:
dfx stopManually create canisters:
dfx canister create backend
dfx canister create frontendBuild the project:
dfx buildThe Candid Extractor tool can be useful for extracting Candid interface definitions from Rust canisters:
cargo install candid-extractorTerminal 1 — Build & Start replica:
dfx build
dfx startTerminal 2 — Deploy canisters:
dfx deployOr for playground:
dfx deploy --playgroundTerminal 3 — Start frontend:
npm startThis project also integrates Ollama with Llama-3.1-8B for AI-powered features.
Follow installation instructions from https://ollama.ai.
ollama pull Llama-3.1-8Bollama run Llama-3.1-8B