Skip to content
nextellarlabsPublic

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

11 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

997 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nextellar

GitHub Actions Workflow Status Coverage Status Dependency Audit npm Version License

Nextellar is a one-step CLI toolkit that bootstraps a production-ready Next.js + TypeScript application with built-in Stellar blockchain support. Scaffold a full-stack dApp starterβ€”complete with wallet connection, payment hooks, smart-contract integration, UI components, and best-practice defaultsβ€”so you can focus on features, not setup.


πŸš€ Features

  • One-step scaffold
    npx nextellar my-app
  • Built-in Stellar support
    • Horizon & Soroban endpoints configured
    • Wallet-adapter plugin system (Freighter, Albedo, Lobstr, XBull, and more)
  • React Hooks (8 shipped)
    • useStellarWallet(), useStellarBalances(), useStellarPayment(), useTransactionHistory(), useTrustlines(), useOfferBook(), useSorobanContract(), useSorobanEvents()
  • UI Components (2 shipped)
    • <WalletConnectButton>, <NetworkSwitcher>
    • Additional components (BalanceDisplay, SendForm, TransactionList, and more) are installable via nextellar add <feature> β€” see the Roadmap for planned components not yet available
  • Smart contracts overlay (--with-contracts)
    • Soroban Rust contracts scaffolded alongside the frontend
  • Opinionated stack
    • Next.js 16 (App Router) + TypeScript
    • Tailwind CSS v4 (inline shadcn/ui-inspired components)
    • ESLint, Prettier, Jest + React Testing Library
  • πŸ”’ Security First
    • Automated dependency auditing (daily)
    • Strict severity gates (fail on critical/high)
    • Dependabot auto-updates for security patches
    • CodeQL static analysis
    • See SECURITY.md for details

πŸ“¦ Installation

No global install required:

npx nextellar my-app
cd my-app
npm run dev

Or install globally:

npm install -g nextellar
nextellar my-app

βš™οΈ CLI Usage

Usage: nextellar [options] [command] <project-name>

CLI to scaffold a Next.js + Stellar starter

Arguments:
  project-name                 name of the new Nextellar project

Options:
  -v, --version                 output the current version
  -t, --typescript               generate a TypeScript project (default)
  -j, --javascript                generate a JavaScript project
  --template <name>              project template to use (default, minimal, defi, full)
  --horizon-url <url>            custom Horizon endpoint
  --soroban-url <url>            custom Soroban RPC endpoint
  -w, --wallets <list>           comma-separated wallet adapters (freighter, xbull)
  -d, --defaults                  skip prompts and use defaults
  -y, --yes                       alias for --defaults: skip prompts and use defaults
  --skip-install                  skip dependency installation after scaffolding
  --package-manager <manager>    choose package manager (npm, yarn, pnpm, bun)
  -c, --with-contracts            scaffold Soroban smart contracts alongside the frontend
  --force                         overwrite existing directory
  --workspace                     scaffold into the nearest npm/yarn/pnpm/bun workspace (monorepo) root
  --workspace-root <dir>          workspace root to scaffold into (implies --workspace)
  --no-git                        skip initializing a git repository in the new project (defaults to on)
  --git-init                      explicitly initialize a git repository in the new project
  --install-timeout <ms>         timeout in ms for package install (default: 1200000 / 20 minutes)
  --no-telemetry                  disable telemetry for this invocation
  -h, --help                      display help for command

Subcommands

Command Description
nextellar add [feature] Add a Stellar feature to an existing project (--list to see all, --force to overwrite, --skip-install, --package-manager)
nextellar templates [name] Preview each template's file tree and description without scaffolding (name to preview just one, --json for machine-readable output)
nextellar doctor Run environment diagnostics (--json for CI, --fix to auto-remediate safe issues)
nextellar status Show a scaffolded project's health score: outdated deps, missing env vars, telemetry status, git init (--json for CI)
nextellar upgrade Upgrade an existing project to the latest template (--dry-run to preview, --check for a changelog preview, --diff for a full file-by-file diff without applying anything, --yes to skip prompts)
nextellar deploy Validate and prepare a deployment bundle for Nextellar Cloud (--dry-run to preview)
nextellar clean Remove .nextellar/ build artifacts
nextellar telemetry <status|enable|disable> Manage anonymous telemetry settings

🧩 Templates

--template <name> selects which starter to scaffold. It defaults to default when omitted. Every template supports both TypeScript and JavaScript.

Template Description TypeScript JavaScript
default Full starter: wallet provider, network switcher, balances, transaction history βœ… βœ…
minimal Bare starter: wallet connection only, no extra UI βœ… βœ…
defi DeFi starter: swap, liquidity pool and price-feed components βœ… βœ…
full Everything: the default component set plus defi's Soroban CounterDemo, with --with-contracts pre-enabled βœ… βœ…
npx nextellar my-app                          # default template, TypeScript
npx nextellar my-app --template minimal       # minimal starter
npx nextellar my-app --template minimal -j    # minimal starter, JavaScript
npx nextellar my-app --template defi -j       # DeFi starter, JavaScript
npx nextellar my-app --template full          # default + defi demo + contracts overlay

An unrecognised name fails before anything is written, and the error lists every valid option:

$ npx nextellar my-app --template nope
Unknown template "nope". Available templates: default, minimal, defi, full.

Soroban smart contracts are added with --with-contracts, not with --template. The two flags compose: --template defi --with-contracts. The full template always includes the contracts overlay.

full is composed rather than copied: it scaffolds default (or js-template with -j), then copies the small src/templates/full (or src/templates/js-full) overlay on top, which adds CounterDemo and renders it on the landing page, then applies the contracts overlay.

Previewing an upgrade

nextellar upgrade --diff prints a complete, untruncated diff for every template file (src/hooks, src/lib) that differs from the latest template, plus Stellar package version changes in package.json. It never prompts and never writes, even with --yes. --check shows a shorter changelog (diffs are capped at 20 lines per file).


πŸ“ Project Structure

my-app/
β”œβ”€β”€ public/                     # Static assets (logos, icons)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router (Layouts & Pages)
β”‚   β”œβ”€β”€ components/             # Reusable UI components (WalletButton, etc)
β”‚   β”œβ”€β”€ contexts/               # React Contexts (WalletProvider)
β”‚   β”œβ”€β”€ hooks/                  # Custom Stellar hooks (useStellarWallet, etc)
β”‚   └── lib/                    # Core logic and SDK initializations
β”œβ”€β”€ next.config.ts              # Next.js configuration
β”œβ”€β”€ tsconfig.json               # TypeScript configuration
β”œβ”€β”€ postcss.config.mjs          # PostCSS / Tailwind CSS v4
β”œβ”€β”€ eslint.config.mjs           # ESLint configuration
β”œβ”€β”€ package.json                # Project dependencies
└── README.md                   # You are here!

πŸ—ΊοΈ Roadmap

The following components and tools are planned but not yet included in scaffolded projects. Track progress or contribute via their issue links:

Feature Status Issue
<BalanceDisplay> component Installable via nextellar add balance-display β€”
<SendForm> component Installable via nextellar add send-form β€”
<TransactionList> component Installable via nextellar add transaction-list β€”
<ContractCallForm> / <ContractCallPreview> components Installable via nextellar add contract-call β€”
<ReceiveForm> component Planned β€”
<TransactionStatusBadge> component Planned β€”
Full shadcn/ui integration Templates ship inline shadcn/ui-inspired components; full setup is manual β€”
Storybook for component previews Planned β€”
GitHub Actions CI in generated apps Planned (repo-level CI: #679, #680) β€”

πŸ’‘ Use nextellar add --list to see all currently installable features.


πŸ“– Documentation

Full API reference, guides, and examples live at:
πŸ”— https://docs.nextellar.dev

Telemetry and privacy details:
πŸ”— docs/telemetry.md

Per-template bundle analysis and size budgets:
πŸ”— docs/bundle-budgets.md

Deployment bundle guide (nextellar deploy):
πŸ”— docs/deploy-guide.md

Network and environment configuration (Horizon/Soroban, testnet/mainnet, NetworkSwitcher):
πŸ”— docs/network-environment-guide.md

Authoring a custom wallet adapter (the ModuleInterface, a worked example, and where to register it):
πŸ”— docs/custom-wallet-adapter-guide.md

Soroban contracts overlay guide (--with-contracts):
πŸ”— docs/soroban-contracts-overlay-guide.md

Adding an app to an existing monorepo (npm/yarn/pnpm workspaces, Turborepo):
πŸ”— docs/monorepo-workspaces.md

Anchor discovery & KYC fields (SEP-1 / SEP-6 / SEP-9 / SEP-38):
πŸ”— docs/anchor-discovery-and-kyc.md

Web authentication & payment request URIs (SEP-7 / SEP-45):
πŸ”— docs/web-auth-and-payments.md

Doctor diagnostic & troubleshooting guide:
πŸ”— docs/troubleshooting.md

Testing guide for generated apps (Storybook interaction tests, and adding Jest/Vitest if you need it):
πŸ”— docs/testing-guide.md

Horizon rate limiter configuration and tuning:
πŸ”— docs/horizon-rate-limiter-guide.md

Cookbook: deploying and upgrading a Soroban contract end-to-end:
πŸ”— docs/cookbook/contract-deploy-and-upgrade.md


πŸš€ Backend & Stellar Wave Routes

The Nextellar backend API and Stellar Wave contributor routes have been moved to a separate repository for clearer project governance and independent maintenance:

πŸ”— nextellarlabs/nextellar-backend

This repo contains:

  • Express API server with authentication, payments, orders, and middleware
  • ~150 route files from the Stellar Wave contributor program
  • Full test suites and documentation

🀝 Contributing

We welcome your help! Please read CONTRIBUTING.md for:

  • Issue & PR workflow
  • Branch naming conventions
  • Testing & linting guidelines

πŸ“œ License

MIT Β© 2025 Nextellar Labs

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages