A simple native app framework
npm install jamkitA powerful command-line tool for building native mobile apps using web-like technologies. Jamkit enables developers to create cross-platform applications for iOS and Android using SBML (markup), SBSS (styling), and JavaScript.
- Cross-Platform Development: Build for both iOS and Android from a single codebase
- Native App Generation: Creates fully native mobile applications
- Real-time Development: Live reload and debugging support
- IPFS Publishing: Built-in decentralized app distribution
- Template System: Quick project scaffolding with various templates
- Simulator Integration: Seamless iOS Simulator and Android Emulator support
- BON Configuration: Human-readable configuration format
- TypeScript Support: Full TypeScript codebase with comprehensive type definitions
#### 1. Install Node.js and npm
Using Homebrew (recommended):
``bash`
brew update
brew install node
Or download from Node.js official website
#### 2. Install Jamkit globally
`bash`
npm install -g jamkit
#### 3. Install Xcode (for iOS development)
- Download from Mac App Store
- Install Xcode command line tools:
`bash`
xcode-select --install
#### 4. Install Android SDK (for Android development)
- Download Android Studio
- Install Android SDK and create AVD (Android Virtual Device)
#### 1. Install Node.js and npm
- Download and install from Node.js official website
- Verify installation:
`cmd`
node --version
npm --version
#### 2. Install Jamkit globally
`cmd`
npm install -g jamkit
#### 3. Install Android SDK (for Android development)
- Download Android Studio
- Install Android SDK and create AVD (Android Virtual Device)
- Add Android SDK to PATH environment variable
Note: iOS development is not supported on Windows. Use macOS for iOS app development.
#### 1. Install Node.js and npm
Using package manager (Ubuntu/Debian):
`bash`
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
Or download from Node.js official website
#### 2. Install Jamkit globally
`bash`
npm install -g jamkit
#### 3. Install Android SDK (for Android development)
- Download Android Studio
- Install Android SDK and create AVD (Android Virtual Device)
Note: iOS development is not supported on Linux. Use macOS for iOS app development.
bash
Create a new app project
jamkit create my-app --type app --template hello-worldCreate a new book project
jamkit create my-book --type book --template hello-world
`$3
`bash
Run on iOS Simulator (macOS only)
jamkit run --platform iosRun on Android Emulator
jamkit run --platform android
`$3
`bash
Build app package
jamkit buildInstall on simulator
jamkit install --platform ios
`$3
`bash
jamkit publish --shorten-url
`๐ CLI Commands
$3
- jamkit create - Create a new project
- jamkit run - Run project on simulator with live reload
- jamkit build - Build app package (.jam or .bxp)
- jamkit install - Install app on simulator$3
- jamkit publish - Publish to IPFS with QR code generation
- jamkit open - Open URL in simulator$3
- jamkit database generate - Generate database from Excel
- jamkit style migrate - Migrate old SBSS styles to new format
- jamkit native compose - Integrate native code๐ Project Structure
`
my-app/
โโโ package.bon # Project configuration (BON format)
โโโ catalogs/ # App resources and content
โ โโโ MainApp/ # Main application catalog
โ โ โโโ catalog.bon
โ โ โโโ catalog.sqlite
โ โโโ ...
โโโ ...
`โ๏ธ Configuration
$3
The main configuration file uses BON (Bookjam Object Notation) format:`bon
{
id: com.yourcompany.yourapp,
version: 1.0,
title: Your App Title,
localization: {
en: {
title: App Title
},
ko: {
title: ์ฑ ์ ๋ชฉ
}
}
}
`$3
#### Create Command
`bash
jamkit create [options]
--type Project type: 'app' or 'book' (default: app)
--app-id App identifier (default: auto-generated)
--version App version (default: 1.0)
--template Template name (default: hello-world)
--repository Template repository (default: bookjam/jamkit-templates)
--language Language code (default: global)
--theme UI theme
`#### Run Command
`bash
jamkit run [options]
--platform Platform: 'ios' or 'android' (default: auto-detect)
--mode Run mode: 'main', 'jam', or 'widget' (default: main)
--shell-host Shell host (default: 127.0.0.1)
--shell-port Shell port (default: 8888)
--skip-sync Skip file synchronization
`#### Publish Command
`bash
jamkit publish [options]
--host-url Custom host URL
--file-url Direct file URL
--image-url App icon URL
--image-file App icon file path
--title Custom app title
--language Language for localization
--ipfs-host IPFS host (default: ipfs.infura.io)
--ipfs-port IPFS port (default: 5001)
--ipfs-protocol IPFS protocol: 'http' or 'https' (default: https)
--shorten-url Generate shortened URL with QR code
--apple-install-url iOS installation URL
--google-install-url Android installation URL
`๐ง Development
$3
`bash
Clone the repository
git clone
cd jamkitInstall dependencies
npm installBuild TypeScript to JavaScript
npm run buildRun in development mode
npm run devType checking only
npm run typecheck
`$3
This is a Node.js CLI application written in TypeScript with ESM modules:
- Entry Point:
src/index.ts - Commander.js CLI interface
- Core Logic: src/commands.ts - All command implementations
- Platform Support:
- src/simulator.ts - iOS/Android simulator management
- src/simctl.ts - iOS Simulator control
- src/avdctl.ts - Android Emulator control
- Build Tools:
- src/template.ts - Project template management
- src/catalog.ts - Excel to SQLite conversion
- src/obfuscator.ts - Code obfuscation
- Utilities:
- src/shell.ts - Simulator shell communication
- src/syncfolder.ts - File synchronization
- src/native.ts - Native code integration
- src/bon.ts - BON format parser/writer$3
The project uses comprehensive TypeScript configuration with:
- Target: ES2022 with ESM modules
- Custom Types:
src/@types/ directory with module-specific type definitions
- Build Output: dist/ directory with JavaScript and type declarations
- Source Maps: Enabled for debugging๐งช Testing
`bash
Run built CLI
node dist/index.js --helpTest specific commands
node dist/index.js create test-app --type app
`๐ File Formats
$3
A configuration format based on JSON with simplified string-only values:Key Features:
- JSON-like structure with objects
{} and arrays []
- All property keys can be unquoted (unless they contain special characters)
- All values are strings - no numbers, booleans, or null types
- Trailing commas are allowed
- More forgiving syntax for human readabilityExample:
`bon
{
id: com.example.app,
version: 1.0,
debug: true,
port: 8080
}
`Note that
1.0, true, and 8080 are all treated as string values, not their respective JSON types.$3
- catalog.bon: Human-readable catalog configuration
- catalog.sqlite: Generated database for app runtime$3
- SBML: Markup format for app layout (similar to HTML)
- SBSS: Stylesheet format for app styling (similar to CSS)๐ค Contributing
1. Fork the repository
2. Create a feature branch (
git checkout -b feature/amazing-feature)
3. Make your changes with proper TypeScript typing
4. Build and test (npm run build && npm test)
5. Commit your changes (git commit -m 'Add amazing feature')
6. Push to the branch (git push origin feature/amazing-feature)
7. Open a Pull Request๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Links
- Documentation
- CLI Reference
- Template Repository
- Issue Tracker
๐ Support
- Issues: Report bugs and feature requests on GitHub Issues
- Documentation: Comprehensive guides in the
docs/ directory
- CLI Help: Use jamkit ---
Made with โค๏ธ by the Jamkit team