Netpress Laravel-inspired backend framework for Node.js
Frameworkv0.1.14 Starterv0.1.12 Docsv1.0.3
Overview Installation Architecture CLI
Getting Started

Installation

Create a new app with the starter generator, configure .env, choose rendering engines, run shared migrations and seeders, then boot the app.

1. Create The App

npx create-netpress-app my-app
cd my-app

The generator copies the starter template, sets the app package name, and runs npm install for you by default. Use --skip-install if you only want the files.

2. Copy The Environment File

cp .env.example .env

3. Generate The Application Key

npm run artisan -- key:generate

4. Choose The Web And Mail Engines

npm run setup:rendering

setup:rendering asks for two choices:

  • web engine: none, react, or vue
  • mail engine: react or vue

What the command actually does:

  • installs only missing renderer packages
  • writes config/view.js
  • updates config/mail.js
  • writes starter files in resources/views/, resources/mails/, routes/web.js, and app/Http/Controllers/HomeController.js

You can also run it non-interactively:

npm run artisan -- setup:rendering --web react --mail react
npm run artisan -- setup:rendering --web none --mail vue --skip-install

If you want to republish the starter auth pages explicitly, run:

npm run artisan -- setup:auth
npm run artisan -- setup:auth --web react --ui tailwind

That writes the web guard auth pages into resources/views/layouts/ and resources/views/pages/auth/.

5. Configure The Database And App Secrets

Set the connection that the starter should boot by default:

# MongoDB
DB_CONNECTION=mongo
MONGO_URI=mongodb://localhost:27017/netpress

# MySQL
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=netpress
DB_USERNAME=root
DB_PASSWORD=secret

# PostgreSQL
DB_CONNECTION=postgres
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=netpress
DB_USERNAME=postgres
DB_PASSWORD=secret

# SQLite
DB_CONNECTION=sqlite
DB_SQLITE_PATH=:memory:

The starter also expects the usual app, mail, queue, and auth settings from .env.

Important auth-related settings:

  • APP_KEY for signed sessions
  • JWT_SECRET for the api guard
  • JWT_ISSUER and JWT_AUDIENCE when you want stricter token validation
  • SESSION_COOKIE, SESSION_SAME_SITE, and SESSION_SECURE for the web guard

6. Run Shared Migrations

npm run migrate

Netpress analyzes the shared migration files first, figures out which configured connections they target, and only opens the connections those files actually use.

7. Seed The Database

npm run seed

If database/seeders/DatabaseSeeder.js exists, db:seed uses it as the entry point. Otherwise it falls back to the discovered seeders in database/seeders/.

8. Start The Development Server

npm run dev

9. Verify The App

Check the health endpoint:

curl http://127.0.0.1:3000/api/v1/health

Expected shape:

{ "status": "ok", "db": "mongo", "env": "local" }

If config/view.js sets a web engine instead of null, the starter also mounts the home page:

curl http://127.0.0.1:3000/

Useful Setup Commands

npm run artisan -- route:list
npm run artisan -- migrate:status
npm run artisan -- migrate:fresh --seed
npm run artisan -- key:generate

Next Step

Read Project Structure and Database Architecture before you start adding models or migrations. Those two pages explain the shared runtime layout the starter now uses.