Dai is a decentralized AI chatbot built on the Internet Computer Protocol (ICP). This README provides guidance on setting up and running the application.
After setting up the frontend credentials, ensure that you have the dfx
command-line tool installed on your computer. Check its version with the following command:
dfx --version
Note: The version of dfx
should be 0.15.0
If you don't have it installed, follow the instructions in the ICP SDK installation guide.
For a smooth deployment, follow the Azle installation documentation.
To install project dependencies, run the following command:
npm install
Before running the app locally, start the local replica with the following command:
dfx start --clean
To run the app locally, ensure that dfx
(Internet Computer CDK) is installed and running. Execute the following command in another terminal window without closing the replica:
dfx deploy
This command deploys both the frontend and backend canisters to your local network. However, you can also deploy them separately.
After deployment, you can access the local preview of the app using the links provided in green:
Frontend canister via browser dfinity_js_frontend: http://127.0.0.1:4943/?canisterId=bd3sg-teaaa-aaaaa-qaaba-cai
Backend canister via Candid interface dfinity_js_backend: http://127.0.0.1:4943/?canisterId=br5f7-7uaaa-aaaaa-qaaca-cai&id=bkyz2-fmaaa-aaaaa-qaaaq-cai
internet_identity: http://127.0.0.1:4943/?canisterId=br5f7-7uaaa-aaaaa-qaaca-cai&id=be2us-64aaa-aaaaa-qaabq-cai
You can deploy individual parts of the app separately:
- Deploy only the backend:
dfx deploy dfinity_js_backend
- Deploy only the frontend:
dfx deploy dfinity_js_frontend
- Test the frontend locally:
npm start
If you encounter any issues, refer to this documentation or reach out to me.