ilovehackathons / create-solana-starter

Created at the Solana Build Station Berlin in May 2023 for the Grizzlython hackathon. See https://solana.com/grizzlython

Home Page:https://www.npmjs.com/package/create-solana-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

create-solana-starter

create-solana-starter is a command-line tool that initializes a new Solana project for you so you can skip tedious manual steps and go straight to coding.

Prerequisites

Usage

  1. Run npx create-solana-starter@latest my-solana-app to initialize the project.
  2. Start the Solana backend with cd my-solana-app && npm start.
  3. Start the Next.js frontend with cd my-solana-app && npm run next.
  4. Make changes to lib.rs and watch the console.
  5. Press Ctrl+C to stop the tasks once you're done.

Features

Working

  • Run via npx. No explicit installation required.
  • Initializes an Anchor project with anchor init.
  • Generates a shareable wallet for development purposes (do not use on mainnet!!!) with solana-keygen.
  • Generates Anchor source code with a valid program ID.
  • An npm script to (re)build and init/upgrade the on-chain program/IDL anytime.
  • A lib.rs file watcher that runs the above-mentioned script automatically on changes.
  • A second npm script to do lots of heavy lifting (start the test validator & file watcher, give you some SOL so that you can actually deploy, etc.)
  • Two more npm scripts for long-to-type Anchor commands.
  • An Anchor script that verifies that there's actually a valid program at the program ID.
  • Verbose output so that you can actually understand what's going on under the hood.
  • There's a Next.js frontend in app that connects to our test validator.
  • The code in lib.rs lets you store an arbitrary signed integer on-chain.
  • Interact with the Solana program (storing and retrieving an arbitrary number) in the frontend.

Planned

  • Add tests for the number storage and retrieval feature.
  • Choose between different templates (e.g. Anchor or Seahorse).
  • Real-time CLI output.
    • Right now, there's only output after the respective command (e.g. anchor build) has completed. That may take a minute or two.

Links

About

Created at the Solana Build Station Berlin in May 2023 for the Grizzlython hackathon. See https://solana.com/grizzlython

https://www.npmjs.com/package/create-solana-starter

License:MIT License


Languages

Language:JavaScript 100.0%