Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
---

## Summary
-

## Changes
- [ ] Web build/tests pass
- [ ] Android build/tests pass
<!-- Brief description of what this PR does -->

## Type of Change

- [ ] Bug fix
- [ ] New feature
- [ ] Dependency update
- [ ] Documentation update
- [ ] Refactor / code quality

## Platforms Affected

- [ ] Web (TypeScript)
- [ ] Android (Kotlin)
- [ ] Flutter (Dart)

## Checklist

- [ ] Web build/tests pass (`npm run test:web && npm run build:web`)
- [ ] Android build/tests pass (`cd packages/core/android && ./gradlew test`)
- [ ] Flutter build/tests pass (`cd packages/core/flutter && flutter test`)
- [ ] API parity maintained across all affected platforms
- [ ] Docs updated (if needed)
- [ ] CHANGELOG updated (if needed)
- [ ] Version bumped (if releasing)

Closes #
72 changes: 72 additions & 0 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Flutter CI

on:
push:
branches: [release, develop]
paths:
- "packages/core/flutter/**"
- ".github/workflows/flutter.yml"
pull_request:
branches: [release, develop]
paths:
- "packages/core/flutter/**"
- ".github/workflows/flutter.yml"
workflow_dispatch:

permissions:
contents: read
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
flutter:
name: Flutter (lint+build+test+docs)
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip flutter]') }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.27.4"
channel: "stable"

- name: Verify Flutter installation
run: flutter --version

- name: Get dependencies
working-directory: packages/core/flutter
run: flutter pub get

- name: Analyze code
working-directory: packages/core/flutter
run: flutter analyze

- name: Run tests
working-directory: packages/core/flutter
run: flutter test --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
file: packages/core/flutter/coverage/lcov.info
flags: flutter
name: flutter-coverage

- name: Generate docs (dart doc)
working-directory: packages/core/flutter
run: dart doc --output ../../../docs/api/flutter || echo "Dart doc generation failed"

- name: Upload flutter docs
uses: actions/upload-artifact@v4
with:
name: flutter-docs-${{ github.run_id }}
path: docs/api/flutter
if-no-files-found: ignore
retention-days: 30
30 changes: 16 additions & 14 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ name: Web CI
on:
push:
branches: [release, develop]
paths:
- 'packages/**'
- '!packages/core/android/**'
- 'package*.json'
- 'lerna.json'
- '.github/workflows/web.yml'
paths:
- "packages/**"
- "!packages/core/android/**"
- "!packages/core/flutter/**"
- "package*.json"
- "lerna.json"
- ".github/workflows/web.yml"
pull_request:
branches: [release, develop]
paths:
- 'packages/**'
- '!packages/core/android/**'
- 'package*.json'
- 'lerna.json'
- '.github/workflows/web.yml'
- "packages/**"
- "!packages/core/android/**"
- "!packages/core/flutter/**"
- "package*.json"
- "lerna.json"
- ".github/workflows/web.yml"
workflow_dispatch:

permissions:
Expand All @@ -32,16 +34,16 @@ jobs:
name: Web (lint+build+test+docs)
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip web]') }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
node-version: "20.x"
cache: "npm"

- name: Install dependencies
run: npm ci
Expand Down
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ node_modules
dist
build
lib
!packages/core/flutter/lib
.next
out

Expand Down Expand Up @@ -48,4 +49,17 @@ build/
captures/
.externalNativeBuild
.cxx
local.properties
local.properties

# Flutter/Dart specific
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
pubspec.lock
*.g.dart

# Generated documentation (regenerated by CI)
docs/api/
95 changes: 69 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,29 @@
[![Version](https://img.shields.io/badge/version-0.1.0--alpha-orange.svg)](https://github.com/Kompkit/KompKit/releases)
[![Web CI](https://github.com/Kompkit/KompKit/actions/workflows/web.yml/badge.svg?branch=develop)](https://github.com/Kompkit/KompKit/actions/workflows/web.yml)
[![Kotlin CI](https://github.com/Kompkit/KompKit/actions/workflows/android.yml/badge.svg?branch=develop)](https://github.com/Kompkit/KompKit/actions/workflows/android.yml)
[![Flutter CI](https://github.com/Kompkit/KompKit/actions/workflows/flutter.yml/badge.svg?branch=develop)](https://github.com/Kompkit/KompKit/actions/workflows/flutter.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![Kotlin](https://img.shields.io/badge/Kotlin-0095D5?logo=kotlin&logoColor=white)](https://kotlinlang.org/)
[![Dart](https://img.shields.io/badge/Dart-0175C2?logo=dart&logoColor=white)](https://dart.dev/)

> **⚠️ 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.
A lightweight cross-platform utility kit providing essential functions for Web (TypeScript), Android (Kotlin), and Flutter (Dart) 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.
KompKit provides essential utility functions that work seamlessly across Web (TypeScript), Android (Kotlin), and Flutter (Dart) 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 |
| 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 |
| `packages/core/flutter` | Dart | Flutter/Dart utilities with async support | ✅ Alpha |
| `docs/` | Documentation | API docs, guides, and examples | ✅ Alpha |
| `.github/workflows/` | CI/CD | Automated testing and validation | ✅ Active |

### Core Utilities

Expand All @@ -32,11 +35,11 @@ KompKit provides essential utility functions that work seamlessly across web (Ty

### Key Features

- ✅ **Cross-platform compatibility** - Identical APIs for web and Android
- ✅ **Cross-platform compatibility** - Identical APIs for Web, Android, and Flutter
- ✅ **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+
- ✅ **Modern tooling** - Built with latest TypeScript 5.7+ and Kotlin 2.3+
- ✅ **Rich documentation** - Auto-generated API docs with examples
- ✅ **CI/CD Ready** - Automated testing with GitHub Actions

Expand All @@ -45,7 +48,8 @@ KompKit provides essential utility functions that work seamlessly across web (Ty
### Prerequisites

- **Web**: Node.js 20+ and npm/yarn
- **Android**: JDK 17+ and Kotlin 2.1+
- **Android**: JDK 17+ and Kotlin 2.3+
- **Flutter**: Flutter 3.0+ and Dart 3.0+

### Installation

Expand Down Expand Up @@ -85,23 +89,43 @@ dependencies {
}
```

#### Flutter Development

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

# Add to your Flutter project's pubspec.yaml
dependencies:
kompkit_core:
path: path/to/KompKit/packages/core/flutter

# Get dependencies
flutter pub get

# Run tests
flutter test
```

### Quick Start

Once installed, you can import and use KompKit utilities:

**TypeScript/JavaScript:**

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

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

console.log(isEmail('user@example.com')); // true
console.log(isEmail("user@example.com")); // true
console.log(formatCurrency(1234.56)); // "1.234,56 €"
```

**Kotlin:**

```kotlin
import com.kompkit.core.*

Expand All @@ -113,6 +137,19 @@ println(isEmail("user@example.com")) // true
println(formatCurrency(1234.56)) // "1.234,56 €"
```

**Dart/Flutter:**

```dart
import 'package:kompkit_core/kompkit_core.dart';

final search = debounce<String>((String query) {
print('Searching: $query');
}, const Duration(milliseconds: 300));

print(isEmail('user@example.com')); // true
print(formatCurrency(1234.56)); // "1.234,56 €"
```

## Documentation

### 📚 Detailed Guides
Expand All @@ -136,16 +173,21 @@ println(formatCurrency(1234.56)) // "1.234,56 €"
KompKit/
├── .github/workflows/ # CI/CD pipelines
│ ├── web.yml # Web package testing
│ └── android.yml # Kotlin package testing
│ ├── android.yml # Kotlin package testing
│ └── flutter.yml # Flutter/Dart package testing
├── packages/core/
│ ├── web/ # TypeScript package
│ │ ├── src/ # Source files
│ │ ├── tests/ # Test files
│ │ ├── tests/ # Test files
│ │ └── package.json
│ └── android/ # Kotlin JVM package
│ ├── src/main/kotlin/ # Source files
│ ├── src/test/kotlin/ # Test files
│ └── build.gradle.kts
│ ├── android/ # Kotlin JVM package
│ │ ├── src/main/kotlin/ # Source files
│ │ ├── src/test/kotlin/ # Test files
│ │ └── build.gradle.kts
│ └── flutter/ # Dart package
│ ├── src/ # Source files
│ ├── test/ # Test files
│ └── pubspec.yaml
├── docs/ # Documentation
│ ├── api/ # Generated API docs
│ └── *.md # Guides and references
Expand All @@ -154,19 +196,21 @@ KompKit/

## Version Information

- **Current Version**: `0.1.0-alpha`
- **Minimum Requirements**:
- **Current Version**: `0.2.0-alpha`
- **Minimum Requirements**:
- Node.js 20+ (Web)
- JDK 17+ (Android)
- TypeScript 5.6+
- Kotlin 2.1+
- Flutter 3.0+ (Flutter)
- TypeScript 5.7+
- Kotlin 2.3+
- Dart 3.0+

## Contributing

We welcome contributions! Please see our [Contributing Guide](./docs/CONTRIBUTING.md) for details on:

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

Expand All @@ -183,4 +227,3 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
---

> **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.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0-alpha
0.2.0-alpha
Loading
Loading