Skip to content

koppajs/koppajs-example

Repository files navigation

KoppaJS Logo

License

@koppajs/koppajs-example

Minimal starter template for KoppaJS

Everything you need to start building — nothing you don't.



Table of Contents
  1. What is this?
  2. Requirements
  3. Getting Started
  4. Project Structure
  5. Community & Contribution
  6. License

What is this?

This is the official minimal starter template for KoppaJS.

It provides a clean, ready-to-run project with:

  • a single app view with a counter component
  • Vite as dev server and bundler
  • TypeScript support
  • zero unnecessary dependencies

Use it as a starting point for new KoppaJS projects or as a reference for how components are registered and composed.

Note: This repo uses file: dependencies that reference sibling directories in the KoppaJS monorepo. If you want a standalone project (outside the monorepo), use npx create-koppajs or copy the template from create-koppajs/template which uses published npm versions instead.


Requirements

  • Node.js >= 20
  • pnpm

Getting Started

Standalone (recommended for new projects)

npx create-koppajs my-app
cd my-app
pnpm install
pnpm dev

Monorepo development

This example lives inside the KoppaJS monorepo and depends on sibling packages via file: links. Before running it, build the sibling packages first:

# From the monorepo root:
cd koppajs-core && pnpm install && pnpm build && cd ..
cd koppajs-vite-plugin && pnpm install && pnpm build && cd ..

# Then run the example:
cd koppajs-example
pnpm install
pnpm dev

Build for production:

pnpm build

Type-check without emitting:

pnpm typecheck

Preview the production build:

pnpm serve

Project Structure

koppajs-example/
├── index.html
├── package.json
├── tsconfig.json
├── vite.config.mjs
├── public/
│   └── favicon.svg
└── src/
    ├── main.ts
    ├── style.css
    ├── app-view.kpa
    └── counter-component.kpa

Community & Contribution

Issues and pull requests are welcome:

https://github.com/koppajs/koppajs-example/issues


License

Apache License 2.0 — © 2026 KoppaJS, Bastian Bensch