How higayasuo/icp-examples works
Main Components
• Overall “Internet Computer Examples” umbrella: This represents an examples repository for learning and experimentation.
• Individual example applications:
– expo-starter: A demo application that integrates an Expo (likely React Native) frontend and a Rust-based backend canister (using Cargo, .did interface files, etc.). Also includes additional integration layers (e.g., “ii-integration”) and supporting scripts/documentation.
– http_incoming: An example handling HTTP incoming requests. It includes a backend component (with Rust source files and a .did interface) and a frontend (likely a demonstration frontend served via Webpack).
– http_outcall: Another example focusing on making HTTP outcalls from canisters. Similarly, it has backend components demonstrating integration with external HTTP services.
• Supporting and configuration tools: Dockerfile, docker-compose.yml, and .devcontainer files indicate containerized development environments. The presence of various build scripts (e.g., build.sh, setup.sh) demonstrates automation for deployment and integration.
Relationships and Interactions
• Within each example (e.g., expo-starter), show a separation between the frontend and backend:
– The frontend (React/Expo components, TS/JS files, assets, and configuration files like app.json and tsconfig.json) interacts with the backend canisters.
– The backend (Rust-based modules with Cargo.toml, .did interface files) provides business logic and canister interfaces that the frontend consumes.
• Between example projects, consider showing that while they are individually runnable, they share common concepts such as using canisters, integration scripts, and standardized development environments.
• External integration points where relevant – for example, the integration of Dfinity agents, dependency packages (like dfx configuration and agent libraries), and Docker-based encapsulation for local development.
Architectural Patterns and Design Principles
• Layered architecture: The examples follow a clear separation between presentation (frontend) and business logic/data management (backend canisters written in Rust).
• Microservice-like boundaries: Each example is self-contained and demonstrates specific Internet Computer functionalities (e.g., HTTP handling, decentralization via canisters, etc.).
• Containerization and automation: Docker and devcontainer setups emphasize repeatable and isolated environments for development, testing, and deployment.
• Modularity and extensibility: The examples include scripts and configurations that encourage modification and extension (e.g., integration scripts, canister declarations).
Relevant Technologies, Frameworks, or Libraries
• Frontend frameworks: Expo, React/React Native, and TypeScript.
• Backend framework/technologies: Rust (with Cargo configuration), integration with Dfinity’s canister interfaces (.did files).
• Tooling and build systems: Docker, docker-compose, Dfinity’s dfx configuration, and various build scripts.
• Additional libraries: ESLint, Prettier, and integration of packages such as “dfinity-agent” and “noble-curves” hint at cryptographic operations and identity management.
Putting It All Together
• Create branches for each example application:
– For expo-starter, indicate both the mobile/web Expo frontend and the Rust backend canister (with its internal modules such as vet_keys and type definitions).