Skip to content

ckenx/kenx-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

82 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Kenx for JS

⚑ A config-first development framework for Node.js, Deno, and Bun. Build applications faster by declaring resources in YAML instead of writing boilerplate code.

Features

  • 🎯 Config-First - Define servers, databases, and services in YAML
  • πŸ”Œ Plugin System - Modular architecture with official and community plugins
  • πŸš€ Multi-Runtime - Works with Node.js, Deno, and Bun
  • πŸ”„ Framework Agnostic - Switch between Express, Fastify, or native HTTP
  • πŸ’‰ Auto-Wiring - Automatic dependency injection via takeover system
  • πŸ“¦ TypeScript-First - Built with TypeScript, works with JavaScript too
  • πŸ› οΈ CLI Tools - Project scaffolding, building, and plugin management

Quick Start

Installation

# Install CLI globally
npm install -g @ckenx/cli

# Create new project
ckenx create my-app

# Navigate to project
cd my-app

# Start development server
npm run dev

Basic Example

Configuration (.config/index.yml):

typescript: true
directory:
  base: './src'
  pattern: '-'

servers:
  - type: http
    key: api
    plugin: '@ckenx/kenx-express'
    PORT: 8000

Application (src/index.ts):

export const takeover = ['http:api']

export default async (server) => {
  server.app.router('/hello', (req, res) => {
    res.json({ message: 'Hello from Kenx!' })
  })
  
  await server.listen()
}

Documentation

πŸ“š Documentation Guide - Complete overview of all documentation
🌐 Online Documentation - Browse online

Getting Started

Core Documentation

Working with Resources

Development & Deployment

Supported Plugins

Servers:

  • @ckenx/kenx-express - Express.js integration
  • @ckenx/kenx-fastify - Fastify integration
  • @ckenx/kenx-http - Native HTTP server

Databases:

  • @ckenx/kenx-mysql - MySQL/MariaDB support
  • @ckenx/kenx-mongodb - MongoDB integration

Real-Time:

  • @ckenx/kenx-socketio - Socket.io for WebSockets

Build Tools:

  • @ckenx/kenx-vite - Vite build integration

See all plugins β†’

Examples

Check out example projects in the examples/ directory:

Why Kenx?

Traditional Setup:

// Lots of boilerplate code
import express from 'express'
import mysql from 'mysql2'

const app = express()
const db = mysql.createPool({ /* config */ })

app.use(express.json())
app.get('/users', async (req, res) => {
  // handler
})

app.listen(8000)

Kenx Setup:

# Just configuration
servers:
  - plugin: '@ckenx/kenx-express'
    PORT: 8000

databases:
  - plugin: '@ckenx/kenx-mysql'
    host: localhost
// Clean application code
export const takeover = ['http', 'database']

export default async (server, db) => {
  server.app.router('/users', handler)
  await server.listen()
}

Feedback

Feedback is always welcome! Please report any issues in our Issue Tracker and we'll address them promptly.

Contributing

We welcome contributions! This is a monorepo managed with Turborepo and Changesets.

Quick Start for Contributors

# Clone and install
git clone https://github.com/ckenx/kenx-js
cd kenx-js
yarn install

# Build all packages (with caching)
yarn build

# Run tests
yarn test

# Make changes and create a changeset
yarn changeset

Key Commands

Command Description
yarn build Build all packages (Turborepo, cached)
yarn test Run all tests in parallel
yarn lint Lint all packages
yarn changeset Create version bump changeset
yarn dev Watch mode for development

Development Workflow

  1. Fork the repository
  2. Create your feature branch
  3. Make your changes
  4. Create a changeset: yarn changeset
  5. Submit a pull request

Please review our:

Community

License

This software is free to use under the MIT license. See the LICENSE file for details.


Made with ❀️ by the Kenx team

About

Kenx framework for NodeJS

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •