{"id":28276364,"url":"https://github.com/jakepeg/icp-rust-vibe-boilerplate","last_synced_at":"2025-07-07T11:05:58.260Z","repository":{"id":293228043,"uuid":"983087395","full_name":"jakepeg/icp-rust-vibe-boilerplate","owner":"jakepeg","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-14T09:06:42.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T23:38:16.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakepeg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-13T21:23:37.000Z","updated_at":"2025-05-14T09:06:46.000Z","dependencies_parsed_at":"2025-05-15T02:00:25.526Z","dependency_job_id":null,"html_url":"https://github.com/jakepeg/icp-rust-vibe-boilerplate","commit_stats":null,"previous_names":["jakepeg/icp-rust-vibe-boilerplate"],"tags_count":0,"template":false,"template_full_name":"pt-icp-hub/ICP-Bootcamp-Vibe-Coding","purl":"pkg:github/jakepeg/icp-rust-vibe-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakepeg%2Ficp-rust-vibe-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakepeg%2Ficp-rust-vibe-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakepeg%2Ficp-rust-vibe-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakepeg%2Ficp-rust-vibe-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakepeg","download_url":"https://codeload.github.com/jakepeg/icp-rust-vibe-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakepeg%2Ficp-rust-vibe-boilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264067137,"owners_count":23552150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-21T05:10:31.450Z","updated_at":"2025-07-07T11:05:58.253Z","avatar_url":"https://github.com/jakepeg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧪🔥 IC Vibe Coding Bootcamp - Rust Edition\n\nWelcome to the **IC Vibe Coding Bootcamp (Rust Edition)**! This repository provides a high-quality, production-style template to help you kickstart Internet Computer (ICP) backend development using **Rust**, with best practices in testing, CI/CD, and developer experience.\n\nWhether you're building your first ICP project or want a fast way to set up a maintainable Rust canister architecture, this template is your launchpad. 🚀\n\n---\n\n## 📜 Table of Contents\n\n- [✨ Features](#-features)\n- [🚀 Getting Started](#-getting-started)\n- [📁 Project Structure](#-project-structure)\n- [✅ Testing Patterns](#-testing-patterns)\n- [🔄 CI/CD Workflow](#-cicd-workflow)\n- [🧠 GitHub Copilot Integration](#-github-copilot-integration)\n- [🔗 Resources \u0026 Documentation](#-learning-resources)\n- [📩 Submit Your Project!](#-submit-your-project)\n\n---\n\n## ✨ Features\n\n- 🦀 **Rust-based Canister Template**\n- 🧪 **Test Suite**: Powered by Vitest + PocketIC for realistic canister simulation\n- 🔁 **CI/CD**: GitHub Actions to automate builds, tests, and code quality checks\n- 📦 **DFX Config**: Pre-configured with best practices for Rust\n- 🤖 **Copilot Integration**: Automatically generate structured tests \u0026 changelogs\n\n---\n\n## 🚀 Getting Started\n\n### 🧑‍💻 1. Get Codespace Ready\n\nA **devcontainer** is preconfigured for you to start coding instantly!\n\n- Click on \"Use this Template\" → \"Create a new repository\".\n- Click \"Code → Open with Codespaces\"\n- Once the codespace is created, you can open it in VS Code Local\n- Everything is pre-installed and ready for you to run the following commands\n\n### 2. Install Dependencies\n\n```bash\nnpm install\n```\n\n### 3. Start Local Blockchain Environment\n\n```bash\ndfx start\n```\n\nKeep this tab open for reading logs.\n\n### 4. Deploy Locally\n\nOpen a new tab, then:\n\n```bash\ndfx deploy\n```\n\n### 5. Run Tests\n\n```bash\nnpm test\n```\n\nYou can also run:\n\n```bash\nnpm test tests/src/vibe_coding_template_backend.test.ts    # individual test\n```\n\n---\n\n## 📁 Project Structure\n\n```\nICP-Bootcamp-Vibe-Coding/\n├── src/\n│   ├── vibe_coding_template_backend/     # Rust backend canister\n│   │   ├── src/                          # Rust source files\n│   │   └── Cargo.toml                    # Rust dependencies\n│   └── declarations/                     # Auto-generated canister interfaces\n├── tests/\n│   ├── src/                              # Test files\n│   ├── global-setup.ts                   # PocketIC instance\n│   └── vitest.config.ts                  # Vitest configuration\n├── scripts/\n│   ├── dev-container-setup.sh            # Extra set up steps for codespace\n│   └── generate-candid.sh                # Useful one way script to build, generate candid and did files\n├── dfx.json                              # ICP config\n├── Cargo.toml                            # Root Rust workspace config\n├── .github/instructions/                 # Copilot general and language specific instructions\n├── .github/prompts/                      # Copilot Prompts, like add feature and changes review\n├── .github/workflows/                    # GitHub CI/CD pipelines\n├── .devcontainer/devcontainer.json       # Container config for running your own codespace\n└── CHANGELOG.md\n```\n\n---\n\n## 🔄 CI/CD Workflow\n\nLocated under `.github/workflows/`, this includes:\n\n- 🧪 Automated end-2-end test runs\n\nIt could be extended to:\n\n- check for security updates (audit);\n- test coverage;\n- code quality.\n\n---\n\n## 🧠 **GitHub Copilot Integration**\n\nThis project leverages two key customization folders:\n\n- `.github/instructions/` – Provides essential context to guide AI responses.\n- `.github/prompts/` – Defines workflow prompts to effectively assist you.\n\nThink of the AI as a super-fast junior developer, handling the heavy lifting while you focus on quality control. Instead of using PRs, you’re reviewing and refining code directly in the IDE through Copilot chat.\n\n### 📝 **About Instructions**\n\nInstructions provide \"context\" that applies to specific files using regex patterns defined in `applyTo`. They are ideal for project-wide or language-specific guidance.\n\n**Current Instructions:**\n\n- **general:** `applyTo: **`\n- **rust:** `applyTo: */*.rs`\n- **test:** `applyTo: tests/**`\n\n**Examples of Context You Can Define:**\n\n- This is an ICP project using Rust canisters.\n- For Rust, we follow Clippy and Rust FMT style guides and linting tools.\n- For tests, we use **Pocket IC** and maintain a specific test structure.\n\n### 🛠️ **About Prompts**\n\nPrompts define specific tasks and guide the AI through a structured workflow. They are especially useful for maintaining a consistent development process.\n\n---\n\n#### ✨ **Add Feature Prompt**\n\n```markdown\n/add-feature Add a function to decrease the counter value\n```\n\nIn this workflow, Copilot follows a Spec Driven Workflow:\n\n1. Clarification Phase:\n   • Updates the changelog and asks for any necessary clarifications.\n2. Test First Approach:\n   • Generates a test case and ensures it fails, confirming that the test is effectively targeting the desired behavior.\n3. Human Confirmation:\n   • The AI pauses for a human to review and confirm the spec, ensuring alignment before proceeding.\n4. Implementation Phase:\n   • Implements the code, self-checks for errors, installs necessary libraries, lints, formats, and runs tests to confirm they pass.\n\n**✅ Key Takeaways**\n\nWhen you explore the prompt, please notice:\n\n- CRITICAL PAUSE POINTS\n  - Strategic pauses allow the human to verify the work in small, reviewable chunks and redirect if necessary.\n- Command Explanations\n  - The prompt can include specific commands or scripts, guiding the AI in self-checking, running scripts, or managing dependencies.\n- Task-Specific Advice\n  - The prompt is the place to add any specific guidance or notes relevant only to the particular task at hand.\n\n#### 🚧 **Changes Review Prompt**\n\nTo run a review, simply call the prompt:\n\n```markdown\n/changes-review\n```\n\nThe AI will analyze the current git diffs, then reference other files in the repo for context. It will generate a comprehensive report for you to review before committing.\n\n#### ✅ **Focus Areas**\n\n1. **Business Logic:**\n\n   - Detects potential unwanted side effects or missing edge cases.\n\n2. **Code Quality:**\n\n   - Suggests improvements or refactor opportunities.\n\n3. **Security \u0026 Performance:**\n   - Identifies vulnerabilities or inefficiencies.\n\n#### 📌 **Why It Matters**\n\n- AI can handle the heavy lifting, but it's **your responsibility as the Senior** to validate the findings.\n- Double-check and ensure quality – small issues now can become big problems later. 😉\n\n---\n\n## 📚 Learning Resources\n\n- [Instruction and Prompt Files](https://code.visualstudio.com/docs/copilot/copilot-customization)\n- [Agent Mode](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode)\n- [Copilot Reference](https://code.visualstudio.com/docs/copilot/reference/copilot-vscode-features)\n- [ICP Dev Docs](https://internetcomputer.org/docs)\n- [Rust CDK](https://internetcomputer.org/docs/current/developer-docs/backend/rust/)\n- [PicJS Doc](https://dfinity.github.io/pic-js/)\n- [Vitest Testing Framework](https://vitest.dev/)\n\n---\n\n### 🤝 **Contributing**\n\nWe welcome contributions! If you encounter a bug, have a feature request, or want to suggest improvements, please open an issue or submit a Pull Request.\n\nWe especially welcome candidates of limits you face, consider using the **Limit Candidate Form Issue** – it helps us prioritize and address the most impactful limits effectively.\n\n---\n\n## 📩 Submit Your Project!\n\n🎯 **Completed your challenge? Submit your project here:**  \n📢 [Submission Form](https://forms.gle/Sgmm1y2bLXYY7mwC6)\n\n📌 **Want to explore more challenges? Return to the index:**  \n🔗 [IC Vibe Coding Bootcamp Index](https://github.com/pt-icp-hub/IC-Vibe-Coding-Bootcamp-Index)\n\n---\n\n**Now go build something fast, tested, and production-ready 🚀🦀**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakepeg%2Ficp-rust-vibe-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakepeg%2Ficp-rust-vibe-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakepeg%2Ficp-rust-vibe-boilerplate/lists"}