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:
- Project name: Choose a name for your directory (e.g.,
my-app). - Template: Select a starting point (Minimal, Blog, App, or Full).
- Tailwind CSS: Add styling support.
- Database: Include Drizzle ORM (optional).
- 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.
-
Initialize a new project:
mkdir my-neutron-app cd my-neutron-app npm init -y -
Install dependencies:
npm install neutron react react-dom npm install -D typescript vite @types/react @types/react-dom(Note: Neutron uses Preact for app routes but React types for compatibility)
-
Create a
neutron.config.ts:import { defineConfig } from "neutron"; import node from "@neutron/adapter-node"; export default defineConfig({ adapter: node(), }); -
Add scripts to
package.json:{ "scripts": { "dev": "neutron dev", "build": "neutron build", "preview": "neutron preview" } }