Welcome to the Internet Computer Protocol (ICP) Bootcamp - Advanced Backend! This repository is designed to help you build advanced backend solutions on ICP using Motoko.
- π― Advanced Challenges
- π‘ Freedom to Innovate
- π Learning Outcomes
- π Resources & Documentation
- π© Submit Your Project!
Please choose 3 out of 5 that interest you most.
- How to use Internet Identity on Candid UI
- Restrict canister actions based on authenticated users
- Store and manage user admins
- For you to use Internet Identity on Candid UI, you need to add the url path to it on the ii query param, like "http://127...cai&ii=http://be2us-64aaa-aaaaa-qaabq-cai.localhost:4943/". Where the "be2us...cai" is the canister id of your local Internet Identity.
- Call an external API using HTTP Outcalls
- Implement JSON parsing
- Return API response
- Ask AI to generate an HTTP request example for you
- Check the specific documentation at:
- Deploy two separate canisters or a bucket canister (see example at composable queries below)
- Do several calls between them, especially composable queries
- Call a canister outside your project (but still inside localhost)
- Call Management Canister to know which principal controls your canister, or how much memory left you still have.
- https://internetcomputer.org/docs/current/developer-docs/smart-contracts/advanced-features/composite-query
- Ask AI how to call a canister by ID in Motoko
- Ask AI for an example of Management Canister call to check the controllers of my actor (canister)
- create a "job" method (meant to be called by the Timer);
- create a "cron" job that runs "every 1h".
- create a "queued" job that you set to run in "1 min".
- Add tests to your repo (suggest Mops Test with PocketIC as param)
- Run tests, format lint and audits on github workflow (Action)
- Deploy on mainnet (ask Tiago for Faucet Coupon) and:
- Implement monitoring with CycleOps
- Cause a trap and then see it in the logs (and also query stats)
- Understand about Mops Test and how its using already Pocket IC (see docs)
- See an example of a github workflow here
- Learn/claim your cycles with Faucet Coupons
- Monitor your cycles at CycleOps
- Ask AI to explain about "dfx logs" and "dfx canister stats" (for stats on amount of query calls)
Unlike the beginner challenge, the Advanced Backend Challenge gives you more freedom on how you want to implement. You're encouraged to explore, innovate, and build good backend solutions on ICP.
The code provided in this repository already has a few methods to help you get started and guide on what is expected. Feel free to modify, extend, or completely re-imagine it as you work on your advanced backend challenge. Use it as a reference while exploring the advanced features of ICP.
Explore the links provided in this challenge to dive deeper into each topic. We strongly recommend asking the Internet Computer AI (https://internetcomputer.org/), before doing a Google Search or asking fellow devs.
- Understanding HTTP outcalls on ICP
- How to request external data from an API
- Calling another canister within your project
- Passing and retrieving data between canisters
- Best practices for handling cross-canister calls
- Calling Management Canisters
- Working with System Canisters
- How to use Timers for automated tasks
- Best practices for scheduling recurring actions
- Writing unit tests for your canisters
- Using PicJS for end-to-end testing
- Debugging & improving test coverage
- Setting up CycleOps for automatic cycle top-ups
- Configuring alerts for cycle depletion
- Implementing email notifications for system health
- Checking canister status
dfx canister status <your_canister>
- Viewing logs
dfx canister logs <your_canister>
- Monitoring performance & memory usage
- Managing state, upgrade, backup & restoration
π Best Practices - Ensuring seamless upgrades without data loss
- Implementing backup strategies for canisters
- Automating build & deployment with GitHub Actions
- Setting up continuous integration (CI)
- Running automated tests before deployment
- What are canister factories?
- When to use factory patterns in ICP
- Example: Dynamic creation of canisters
π Official ICP Docs
π Motoko Programming Guide
π ICP Ninja
π ICP Best Practices
π CycleOps Monitoring
π― Completed your challenge? Submit your project here:
π’ Submission Form
π Want to explore more challenges? Return to the index:
π ICP Bootcamp Index
π Happy Coding & Welcome to Advanced Backend Development on the Internet Computer! π