Skip to content

Quickstart Guide

cfxdevkit edited this page Dec 19, 2024 · 6 revisions

Welcome to the repository-template quickstart guide! This template provides a base structure for creating a project that can interact with the Conflux blockchain. Follow the steps below to get started quickly.

Repository URL: https://github.com/cfxdevkit/repository-template


Prerequisites

Before using the template locally, ensure you have the following installed on your system:

  1. Git: For cloning and managing the repository.
  2. VS Code: For local development.
  3. Docker: Required to run the preconfigured development environment locally.

Note: Using the template in Codespace don't require any prerequisites


Using the Template Repository

This repository is a GitHub template, meaning you can easily create a new project based on it. Here's how:

Step 1: Use the Template

  1. Navigate to the template repository: https://github.com/cfxdevkit/repository-template.
  2. Click the green Use this template button in the top-right corner of the page, next to the Watch, Fork, and Star buttons.

Step 2: Choose an Option

When you click Use this template, you'll see two options:

1. Create a New Repository

  • Select this option to create a new repository in your GitHub account based on this template.
  • Provide a name for your new repository and click Create repository from template.
  • Once created, you can clone the repository or open it directly in VS Code or Codespaces.

2. Open in Codespace

  • Select this option to immediately open the repository in GitHub Codespaces.
  • A new Codespace will be created in your account with the preconfigured development environment ready to use.

Cloning Locally and Using VS Code

If you prefer to work locally, follow these steps after creating a repository using the template:

  1. Clone Your Repository
    Open a terminal and run the following command to clone your new repository:

    git clone https://github.com/your-username/your-repository-name.git
  2. Open in VS Code
    Navigate to the repository directory:

    cd your-repository-name

    Then, open the repository in VS Code:

    code .
  3. Rebuild the Devcontainer
    If you have the Remote - Containers extension installed in VS Code, you can use the included devcontainer configuration:

    • Click Reopen in Container when prompted.
    • Wait for the environment to build and start.

Next Steps

You are now ready to start creating your project!

Visit the Devkit CLI Wiki for the available commands to manage your local Conflux node


Enjoy creating your project with the repository-template!