Skip to content

Kompkit/kompkit

Repository files navigation

KompKit

Version Web CI Kotlin CI License: MIT TypeScript Kotlin

⚠️ Alpha Release: This is an early alpha version. APIs may change before stable release.

A lightweight cross-platform utility kit providing essential functions for Android (Kotlin) and Web (TypeScript) development. Built as a monorepo with identical APIs across platforms.

Overview

KompKit provides essential utility functions that work seamlessly across web (TypeScript) and Android (Kotlin) platforms. Built with developer experience in mind, it offers identical APIs across platforms while leveraging platform-specific optimizations.

Monorepo Structure

Module Platform Description Status
packages/core/web TypeScript Web utilities with Node.js support ✅ Alpha
packages/core/android Kotlin JVM Android utilities with coroutines ✅ Alpha
docs/ Documentation API docs, guides, and examples ✅ Alpha
.github/workflows/ CI/CD Automated testing and validation ✅ Active

Core Utilities

  • 🕐 debounce - Delay function execution until after a wait period (prevents excessive API calls)
  • 📧 isEmail - Validate email addresses with robust regex patterns
  • 💰 formatCurrency - Format numbers as currency with full locale support

Key Features

  • Cross-platform compatibility - Identical APIs for web and Android
  • TypeScript support - Full type safety and IntelliSense
  • Zero dependencies - Lightweight with no external dependencies
  • Comprehensive testing - 100% test coverage across platforms
  • Modern tooling - Built with latest TypeScript 5.6+ and Kotlin 2.1+
  • Rich documentation - Auto-generated API docs with examples
  • CI/CD Ready - Automated testing with GitHub Actions

Getting Started

Prerequisites

  • Web: Node.js 20+ and npm/yarn
  • Android: JDK 17+ and Kotlin 2.1+

Installation

Note: Alpha packages are not yet published to registries. Clone the repository for local development.

Web Development

# Clone the repository
git clone https://github.com/Kompkit/KompKit.git
cd KompKit

# Install dependencies
npm install

# Build the web package
npm run build

# Run tests
npm run test:web

Android Development

# Clone the repository
git clone https://github.com/Kompkit/KompKit.git

# Include in your Android project's settings.gradle.kts
include(":kompkit-core")
project(":kompkit-core").projectDir = file("path/to/KompKit/packages/core/android")

# Add to your app's build.gradle.kts
dependencies {
    implementation(project(":kompkit-core"))
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
}

Quick Start

Once installed, you can import and use KompKit utilities:

TypeScript/JavaScript:

import { debounce, isEmail, formatCurrency } from '@kompkit/core';

const search = debounce((query: string) => {
  console.log('Searching:', query);
}, 300);

console.log(isEmail('[email protected]')); // true
console.log(formatCurrency(1234.56)); // "1.234,56 €"

Kotlin:

import com.kompkit.core.*

val search = debounce<String>(300L, scope) { query ->
    println("Searching: $query")
}

println(isEmail("[email protected]")) // true
println(formatCurrency(1234.56)) // "1.234,56 €"

Documentation

📚 Detailed Guides

🔧 Development

  • Changelog - Version history and breaking changes
  • Roadmap - Planned features and improvements

Project Structure

KompKit/
├── .github/workflows/          # CI/CD pipelines
│   ├── web.yml                # Web package testing
│   └── android.yml            # Kotlin package testing
├── packages/core/
│   ├── web/                   # TypeScript package
│   │   ├── src/              # Source files
│   │   ├── tests/            # Test files  
│   │   └── package.json
│   └── android/              # Kotlin JVM package
│       ├── src/main/kotlin/  # Source files
│       ├── src/test/kotlin/  # Test files
│       └── build.gradle.kts
├── docs/                     # Documentation
│   ├── api/                  # Generated API docs
│   └── *.md                  # Guides and references
└── package.json             # Root configuration

Version Information

  • Current Version: 0.1.0-alpha
  • Minimum Requirements:
    • Node.js 20+ (Web)
    • JDK 17+ (Android)
    • TypeScript 5.6+
    • Kotlin 2.1+

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Development setup
  • Code style and conventions
  • Testing requirements
  • Pull request process

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support


Alpha Notice: This project is in active development. APIs may change before the stable 1.0 release. We recommend pinning to specific versions in production applications.

About

Lightweight cross-platform utility kit for Android (Kotlin) and Web (TypeScript). Monorepo with Lerna + npm workspaces.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •