Skip to content
LykosJSLYKOSJS
CreatorDeveloperBenchmarkshomeGet started
v1.0.0
IntroductionInstallationProject structureQuick start
PREVIOUSIntroductionNEXT Project structure
© 2026 LykosJS · MIT LicenseBun · TypeScript

© 2026 LykosJS. Released under the MIT License.
Built by Zen Allaham.

DocsGitHubX
DOCS/V1.0.0/GETTING STARTED
GETTING STARTED

Installation

Create a new LykosJS application using the official CLI, choose between REST and GraphQL, and get your backend project running in minutes.

Prerequisites

Before creating a LykosJS application, make sure you have Bun installed on your machine. LykosJS uses Bun as its runtime and package manager.

bash
1bun --version
Bun is required
LykosJS applications are designed to run on Bun. Make sure Bun is installed and available in your terminal before continuing.

Create a new project

The recommended way to get started is through the official create-lykosjs CLI. It scaffolds a ready-to-use application with a modular project structure.

bash
1bun create lykosjs my-app

Replace my-app with your preferred project name. The CLI will ask you to choose the API style for your application.

Terminal · create-lykosjs
🐺 LykosJS — Built for Speed. Designed for Scale.

? Which API are you ready to build with LykosJS? 🐺

  ❯ REST API — controllers, routes & validation rules
    GraphQL — schema-first with resolvers

  ↑/↓ to move · enter to select

Select an API style using the arrow keys and press Enter. The CLI generates the corresponding project template.

Choose an API template

LykosJS provides two independent project templates. Choose the one that best fits your application's architecture.

REST API

The REST template provides a modular structure for building HTTP APIs, with controllers, routes, services, validation rules, schemas, and tests.

bash
1bun create lykosjs my-app --template rest

GraphQL API

The GraphQL template includes a schema-first setup with resolvers, a GraphQL executor, a request handler, and module-based organization.

bash
1bun create lykosjs my-app --template graphql

You can also use the shorthand flags:

bash
1# Create a REST application2bun create lykosjs my-app --rest3 4# Create a GraphQL application5bun create lykosjs my-app --graphql

Project structure

The CLI generates a modular application structure. The exact files depend on the selected template.

LykosJS REST GraphQL project structure

REST project

text
1my-app/2├── src/3│   ├── launch.ts4│   ├── modules.ts5│   └── modules/6│       └── users/7│           ├── users.controller.ts8│           ├── users.module.ts9│           ├── users.route.ts10│           ├── users.service.ts11│           ├── rules/12│           │   ├── create.ts13│           │   └── update.ts14│           ├── schemas/15│           │   └── user.schema.ts16│           └── tests/17│               ├── users.controller.test.ts18│               └── users.service.test.ts19├── package.json20├── tsconfig.json21├── .prettierrc22└── .gitignore

GraphQL project

text
1my-app/2├── src/3│   ├── launch.ts4│   ├── modules.ts5│   ├── graphql/6│   │   ├── graphql.executor.ts7│   │   ├── graphql.handler.ts8│   │   ├── graphql.resolvers.ts9│   │   └── graphql.schema.ts10│   └── modules/11│       └── users/12│           ├── users.module.ts13│           ├── users.resolver.ts14│           ├── users.service.ts15│           ├── graphql-schema/16│           │   └── users.graphql17│           └── tests/18│               ├── users.resolver.test.ts19│               └── users.service.test.ts20└── package.json

Install dependencies

Navigate to your newly created project directory and install its dependencies.

bash
1cd my-app2bun install

Run the application

Start your development server using the script provided by the generated project.

bash
1bun run dev

The generated application listens on port 4000. Open your browser or API client and visit:

text
1http://localhost:4000
GraphQL endpoint
The GraphQL template registers its endpoint at POST /graphql and listens on port 4000 by default.

Install LykosJS in an existing project

If you already have a Bun project, you can install the framework package directly instead of using the CLI.

bash
1bun init2bun add lykosjs

Import the Lykos class from the lykosjs package to create your application.

typescript
1import { Lykos } from "lykosjs";2 3const app = new Lykos();4 5app.GET("/", async (ctx, reply) => {6  return reply.send("Welcome to LykosJS 🐺");7});8 9app.listen(4000, () => {10  console.log("LykosJS is running at http://localhost:4000");11});