Installation

Get started with Neutron by running the create command.

Quick Start

Run the following command in your terminal:

npm create neutron@latest

Follow the interactive prompts to set up your project:

  1. Project name: Choose a name for your directory (e.g., my-app).
  2. Template: Select a starting point (Minimal, Blog, App, or Full).
  3. Tailwind CSS: Add styling support.
  4. Database: Include Drizzle ORM (optional).
  5. Git: Initialize a git repository.

Once the setup is complete, navigate to your project and start the development server:

cd my-app
npm run dev

Open your browser to http://localhost:3000 to see your new Neutron app.

Manual Setup

Neutron is designed to be easy to set up manually if you prefer.

  1. Initialize a new project:

    mkdir my-neutron-app
    cd my-neutron-app
    npm init -y
    
  2. Install dependencies:

    npm install @neutron-build/core @neutron-build/cli preact
    npm install -D typescript vite
    
  3. Create a neutron.config.ts:

    import { defineConfig } from "@neutron-build/core";
    
    export default defineConfig({});
    

    Adapters are bundled in @neutron-build/core; select one at build time with the CLI's --preset flag (e.g. --preset docker, --preset vercel, --preset cloudflare, --preset static).

  4. Add scripts to package.json:

    {
      "scripts": {
        "dev": "neutron-ts dev",
        "build": "neutron-ts build",
        "preview": "neutron-ts preview"
      }
    }