Skip to content

1. Install & first route

Create a Pondoknusa app, boot the HTTP kernel, and return your first HTML page.

Create the project

bash
npm create pondoknusa@latest blog
# fallback: npx -y @pondoknusa/cli new blog
cd blog

new already installs dependencies, generates APP_KEY, creates storage/, installs auth (default), migrates SQLite, and wires MCP agent rules. You can run pondoknusa dev immediately.

The default scaffold uses SQLite, a database queue, and log mail — no Redis or cloud SDKs required.

Project layout

Key files:

  • src/main.ts — boots providers and the HTTP kernel
  • src/routes/web.ts — web routes (or routes/web.ts depending on scaffold)
  • config/ — typed configuration modules
  • resources/views/.tyr templates

See Application structure for the full map.

First route

typescript
import { Route, View } from '@pondoknusa/core';
import { Response } from '@pondoknusa/http';

Route.get('/', async () =>
  Response.html(await View.render('welcome', { title: 'Hello Pondoknusa' })),
);

Route.get('/health', async () => Response.json({ ok: true }));

Create the view:

bash
pondoknusa make:view welcome

Run the dev server

bash
pondoknusa dev

pondoknusa dev starts the server with view, config, and route hot reload. After pondoknusa debug:install, use pondoknusa debug:watch to tail request timelines without signing in. The /__debug JSON panel requires an authenticated session.

Visit http://127.0.0.1:3000 and /health.

Verified in CI

The examples/hello-world reference app exercises this step. Its feature test asserts the welcome page contains Hello Pondoknusa:

bash
cd examples/hello-world && npm test

Named routes

typescript
Route.get('/posts', async () => Response.json([])).name('posts.index');

List routes with pondoknusa route:list — filters and JSON output are documented in the routing guide.

Next

Continue to Auth & database to persist users and protect routes.

Released under the MIT License.