{"id":29618760,"url":"https://github.com/ronarthas/appjet","last_synced_at":"2026-04-05T21:03:42.221Z","repository":{"id":305367114,"uuid":"1022577181","full_name":"ronarthas/appjet","owner":"ronarthas","description":"Modern Electron with web dev DX","archived":false,"fork":false,"pushed_at":"2025-07-20T19:00:23.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T21:05:41.946Z","etag":null,"topics":["appjet","bun","desktop-app","electron","tauri","vue"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ronarthas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-19T11:24:30.000Z","updated_at":"2025-07-20T19:00:27.000Z","dependencies_parsed_at":"2025-07-20T21:05:43.897Z","dependency_job_id":null,"html_url":"https://github.com/ronarthas/appjet","commit_stats":null,"previous_names":["ronarthas/lumina","ronarthas/appjet"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ronarthas/appjet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronarthas%2Fappjet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronarthas%2Fappjet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronarthas%2Fappjet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronarthas%2Fappjet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ronarthas","download_url":"https://codeload.github.com/ronarthas/appjet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronarthas%2Fappjet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266231759,"owners_count":23896471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appjet","bun","desktop-app","electron","tauri","vue"],"created_at":"2025-07-21T03:00:24.054Z","updated_at":"2025-12-30T22:07:00.709Z","avatar_url":"https://github.com/ronarthas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Appjet ✈️\n\n\u003e ⚠️ **This project is in early development** - Only basic template is currently available.\n\n**Fast, simple desktop apps with modern web technologies**\n\nAppjet is a lightweight alternative to Electron, built for speed and simplicity. Create desktop applications using Vue.js, HTML, CSS, and JavaScript - powered by Bun and native webviews.\n\n## 📋 Prerequisites\n\n### Required\n- **[Bun](https://bun.sh)** (not Node.js compatible)\n- **System webview libraries**:\n\n#### Windows\n- Windows 11: ✅ Built-in (no additional setup)\n- Windows 10: May require WebView2 runtime\n\n#### macOS\n- Built-in WebKit (no additional setup required)\n\n#### Linux\nInstall GTK 4 and WebkitGTK 6:\n```bash\n# Debian/Ubuntu\nsudo apt install libgtk-4-1 libwebkitgtk-6.0-4\n\n# Arch Linux\nsudo pacman -S gtk4 webkitgtk-6.0\n\n# Fedora\nsudo dnf install gtk4 webkitgtk6.0\n```\n\n## ⚡ Why Appjet?\n\n- **🚀 Lightning Fast** - Built on Bun, compiles to native executables\n- **🪶 Lightweight** - No bundled Chromium, uses system webview\n- **🎯 Simple** - Minimal API, focus on your app logic\n- **🔧 Modern Stack** - Vue.js, Vite, TypeScript out of the box\n- **📦 Single Binary** - Compile to standalone executables\n- **🔥 Hot Reload** - Instant updates during development\n- **🔗 Auto Binding** - Automatic function binding between backend and frontend\n\n## 🚀 Quick Start\n\nCreate a new Appjet app:\n\n```bash\nbun create appjet my-app\ncd my-app\n```\n\n### Setup Frontend (Vue.js example)\n```bash\ncd frontend\nbun create vue@latest .\nbun install\n\n# Start frontend dev server\nbun dev\n```\n\n### Setup Backend\n```bash\ncd ../backend\nbun install\n\n# Start backend (in another terminal)\nbun dev\n```\n\n## ⚙️ Configuration\n\n### Window \u0026 Webview Settings (`appjet.config.ts`)\n```typescript\nimport type { AppjetConfig } from \"appjet\";\n\nexport const config: AppjetConfig = {\n  window: {\n    debug: true,              // Enable dev tools\n    height: 800,              // Window height\n    width: 1200,              // Window width\n    resizable: true,          // Allow window resize\n    title: \"My Appjet App\",   // Window title\n  },\n  frontend: {\n    distPath: \"../frontend/dist\",           // Production build path\n    entryPointFile: \"index.html\",           // Entry HTML file\n    viteServer: \"http://localhost:5173\",    // Dev server URL\n  },\n};\n```\n\n### Build Configuration (`appjet.build.ts`)\n```typescript\nimport { buildAppjetApp, type BuildConfig } from \"appjet\";\n\nexport const build: BuildConfig = {\n  appName: \"my-app\",                    // Executable name\n  entrypoint: \"./appjet.ts\",            // Backend entry point\n  outputDir: \"./dist\",                  // Build output directory\n  frontendDir: \"../frontend\",           // Frontend source directory\n  targets: [\"bun-linux-x64\"],          // Target platforms\n};\n\nawait buildAppjetApp(build);\n```\n\n## 🔗 Backend ↔ Frontend Communication\n\nAppjet's **magic**: just register a function in your backend, and it's automatically available in your frontend!\n\n### Backend (`backend/api.ts`)\n```typescript\nimport { registerBinding } from \"appjet\";\nimport { readdir, writeFile } from \"fs/promises\";\n\n// Simple function\nconst greetUser = (name: string) =\u003e {\n  return `Hello ${name}! Welcome to Appjet ✈️`;\n};\n\n// Async function with file system access\nconst listFiles = async (directory: string) =\u003e {\n  try {\n    const files = await readdir(directory);\n    return { success: true, files };\n  } catch (error) {\n    return { success: false, error: error.message };\n  }\n};\n\n// Complex function with multiple operations\nconst saveUserData = async (userData: { name: string; email: string }) =\u003e {\n  await writeFile('user.json', JSON.stringify(userData, null, 2));\n  console.log(\"User data saved!\");\n  return { saved: true, timestamp: Date.now() };\n};\n\n// Register functions (they become available in frontend automatically!)\nregisterBinding(\"greetUser\", greetUser);\nregisterBinding(\"listFiles\", listFiles);\nregisterBinding(\"saveUserData\", saveUserData);\n\n// Or register multiple at once\nregisterBinding({\n  getCurrentTime: () =\u003e new Date().toISOString(),\n  getSystemInfo: () =\u003e ({ platform: process.platform, arch: process.arch })\n});\n```\n\n### Frontend (Vue.js, React, or vanilla JS)\n```typescript\n// Cast window to access bound functions\nconst w = window as any;\n\n// Call the backend functions directly\nconst greeting = await w.greetUser(\"Alice\");\nconsole.log(greeting); // \"Hello Alice! Welcome to Appjet ✈️\"\n\n// File system operations from frontend\nconst result = await w.listFiles(\"/home/user/documents\");\nif (result.success) {\n  console.log(\"Files:\", result.files);\n}\n\n// Save data\nawait w.saveUserData({ name: \"Bob\", email: \"bob@example.com\" });\n\n// Get system info\nconst info = await w.getSystemInfo();\nconsole.log(info); // { platform: \"linux\", arch: \"x64\" }\n```\n\n**💡 Pro tip:** For better TypeScript support, you can create a types file:\n\n```typescript\n// types/appjet.d.ts\ndeclare global {\n  interface Window {\n    greetUser: (name: string) =\u003e Promise\u003cstring\u003e;\n    listFiles: (directory: string) =\u003e Promise\u003c{success: boolean, files?: string[], error?: string}\u003e;\n    saveUserData: (userData: {name: string, email: string}) =\u003e Promise\u003c{saved: boolean, timestamp: number}\u003e;\n    getSystemInfo: () =\u003e Promise\u003c{platform: string, arch: string}\u003e;\n  }\n}\n```\n\nThen use with full type safety:\n```typescript\nconst greeting = await window.greetUser(\"Alice\"); // ✅ Fully typed!\n```\n\n**✨ That's it!** No IPC setup, no manual bindings, no complex messaging. Just write functions in your backend and call them from your frontend like magic! 🪄\n\n## 🛠️ Build for Production\n\n### For Vue.js Projects\n\n1. **Update your router** (`src/router/index.ts`) to use memory history:\n\n```typescript\nimport { createRouter, createMemoryHistory } from 'vue-router'\nimport HomeView from '../views/HomeView.vue'\n\nconst router = createRouter({\n  history: createMemoryHistory(), // Use memory history for embedded apps\n  routes: [\n    {\n      path: '/',\n      name: 'home',\n      component: HomeView,\n    },\n    {\n      path: '/about',\n      name: 'about',\n      component: () =\u003e import('../views/AboutView.vue'),\n    },\n  ],\n})\n\nexport default router\n```\n\n2. **Update your `vite.config.ts`** for single-file output:\n\n```typescript\nexport default defineConfig({\n  // ... other config\n  build: {\n    assetsInlineLimit: 999999999,  // Inline all assets\n    cssCodeSplit: false,           // Single CSS file\n    rollupOptions: {\n      output: {\n        manualChunks: undefined,\n        inlineDynamicImports: true,\n        entryFileNames: 'assets/index.js',\n        chunkFileNames: 'assets/index.js',\n        assetFileNames: 'assets/index.[ext]',\n      },\n    },\n  },\n});\n```\n\n### Build Commands\n```bash\n# Build everything\ncd backend\nbun run build\n\n# Or build executable directly\nbun run appjet.build.ts\n```\n\n## 📚 Available Targets\n\n- `bun-linux-x64` - Linux 64-bit\n- `bun-windows-x64` - Windows 64-bit\n- `bun-darwin-x64` - macOS Intel\n- `bun-darwin-arm64` - macOS Apple Silicon\n\n## 🤝 Contributing\n\nContributions welcome! This project is in early development.\n\n## 📄 License\n\nMIT © Bastien Etienne\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronarthas%2Fappjet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fronarthas%2Fappjet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronarthas%2Fappjet/lists"}