KRNL Platform Guidebook
KRNL Platformkrnl.xyz
  • Introduction
    • Introduction
    • How Does kOS Work?
  • Setup
    • Getting Started with KRNL
    • Quick Start (CLI)
    • Quick Start (Online IDE)
      • Quick Start (Remix IDE)
      • Quick Start (Atlas IDE)
    • create-krnl-app
    • Platform Registration
  • Kernel
    • What are Kernels?
    • Kernel Registration
      • Kernel Registration (on-chain)
      • Kernel Registration (off-chain)
    • Supported OpenAPI (Off-chain Kernel)
    • Staking
  • Smart Contract
    • Steps for Smart Contract Developers
    • Choosing Kernel(s)
    • Token Authority
      • What is a Token Authority?
      • How to Build a Token Authority?
      • Generic Token Authority
      • How to Deploy a Token Authority on Oasis?
    • Decoding Kernel Responses in Solidity
    • How to Integrate Your Smart Contract with kOS?
    • Smart Contract Registration
  • DApp
    • dApp Registration
    • KRNL SDK Installation
    • Usage
    • KRNL Node RPC
  • Miscellaneous
    • Overview
    • What is the KRNL Platform?
    • What are You Trying to BUIDL?
    • Smart Contract Fundamentals
      • Why Do I Have to Register a Smart Contract?
      • How to Deploy a Smart Contract?
    • Recommended Kernels List
  • Helpful Resources
    • New to Web3?
    • Dictionary
    • Testnet Faucets
    • How to Get Etherscan API Key?
  • Litepaper
    • Litepaper
      • Overview
      • Problem Statement
      • Current State Does Not Solve the Problem
      • Introducing Kernels
      • Ecosystem of Kernels
      • The KRNL Operating System (kOS)
      • Decentralization and Security Considerations
      • Use Cases for KRNL
  • Appendices
    • FAQ
    • Bounty Program
    • Social Medias
    • Thank You
  • Workshop
    • KRNL Workshop
Powered by GitBook
On this page
  • Introduction
  • Installation
  • Option 1: Use with npx (recommended)
  • Option 2: Global Installation
  • Quick Start
  • CLI Options
  • Framework Options
  • Next.js (App Router)
  • React (Vite)
  • Expo (React Native)
  • Project Configurations
  • FAQ

Was this helpful?

  1. Setup

create-krnl-app

Currently, "create-krnl-app' is temporarily unavailable.

Please, use "Usage" page under "DAPP" section instead.


Introduction

create-krnl-app is a CLI tool designed to help developers quickly bootstrap decentralized applications.

This guide provides comprehensive instructions on using the tool, understanding the generated project structure, and customizing your dApp to utilize kOS for production.


Installation

There are two ways to use create-krnl-app.

Option 1: Use with npx (recommended)

This method runs the latest version without installing it globally on your system.

npx create-krnl-app

Option 2: Global Installation

npm install -g create-krnl-app

Then run:

create-krnl-app

Quick Start

To create a new dApp:

  1. Run the CLI:

    npx create-krnl-app
  2. Follow the interactive prompts:

    • Enter a project name

    • Select a framework (Next.js, React, or Expo)

    • Choose a language (JavaScript or TypeScript)

  3. After the setup completes, navigate to your project directory:

    cd your-project-name
  4. Start the development server:

    npm run dev  # For Next.js and React 
    npm start    # For Expo

CLI Options

create-krnl-app supports several command-line options:

Option
Description

--help, -h

Display help information

--verbose, -v

Enable verbose mode for debugging

--no-analytics

Disable anonymous usage analytics

Example usage:

npx create-krnl-app --verbose

Framework Options

Next.js (App Router)

  • Description: A React framework with file-based routing and server-side rendering

  • Best for: Web applications requiring SEO optimization, server components, and complex routing

  • Available in: JavaScript and TypeScript

React (Vite)

  • Description: A lightweight React setup using Vite as the build tool

  • Best for: Single-page applications (SPAs) with client-side rendering

  • Available in: JavaScript and TypeScript

Expo (React Native)

  • Description: A React Native framework for cross-platform mobile app development

  • Best for: Mobile applications (iOS and Android)

  • Available in: TypeScript only


Project Configurations

The CLI automatically configures your project with default kOS settings:

Parameter
Default Value

Kernel ID

337

Entry ID

0x0a5b7ef4a015c5b577a5cb55828471b45271bdbdcd88b214057967c5f032d60e

Access Token

0x304402205c0879ef6b9859573cfad58dbe0a5c60ca8505159cafbb2b32c68f0f584be9ab02205b62115c0aa8cb0cf9a49fa6b5a793ab74afc69590b03387367b038cbc4bd98b

Contract Address

0x870Ef2B0e4e31E4bC6F0191B88f336d1e872D194

RPC URL

https://v0-0-1-rpc.node.lat

These settings are stored in the .env file and are used by the KRNL SDK to connect to the appropriate KRNL node and contract.


FAQ

Can I use multiple kernels in one application?

Yes, by creating separate components for each kernel and configuring them with different kernel IDs.

How do I deploy my KRNL application?

Deploy the front-end to any web hosting service (Vercel, Netlify, etc.) and ensure the environment variables are correctly set in your deployment environment.

PreviousQuick Start (Atlas IDE)NextPlatform Registration

Last updated 13 days ago

Was this helpful?

Note: You should obtain a PROJECT_ID for Expo projects from the Reown cloud dashboard. Create a new project on Reown Cloud at and obtain a new project ID.

https://cloud.reown.com