native-framework
v0.1.1
Published
Tek cati altinda API, web, desktop, mobile, React, Vue ve vanilla TypeScript destekli framework workspace'i.
Readme
Uniframe
Tek proje altinda @capacitor, Electron, React, Vite, Vue ve Node destekli profesyonel framework workspace'i.
Uniframe'in hedefi ayni domain modelini, contract'lari ve gelistirici deneyimini koruyarak bir urunu farkli platformlarda tek cati altinda calistirmaktir.
Kurulum
Gereksinim: Node.js 22.12+ ve npm 10+.
Yeni proje:
npx create-uniframe my-app
cd my-app
npm install
npm run dev:web:reactRepo icinden ayni scaffold:
npm run create -- my-app
uniframe create my-appnpm install
npm run checkTypeScript ve VS Code
- Core runtime
packages/core/srcaltinda TypeScript ile yazilir. - Adapter modeli
packages/adapters/srcaltinda genisletilir. - Vite entegrasyonu
packages/vite/srcaltinda reusable library olarak bulunur. - Platform matrisi
packages/platforms/srcaltinda@capacitor + electron + react + vite + vue + nodestack'ini tanimlar. - React, mobile ve React desktop hedefleri
.tsx, vanilla hedefi.ts, API hedefi.tskullanir. - Vue hedefi
.vuesingle-file component vevue-tsctypecheck kullanir. @uniframe/core,@uniframe/adapters,@uniframe/platformsve@uniframe/vitealias'lari hazirdir.- VS Code icin
.vscode/settings.json, task ve extension onerileri eklenmistir.
Kalite Kapisi
npm run lint
npm run typecheck
npm run test
npm run build
npm run ciGelistirme
npm run dev # API + React web + Vue web + vanilla web
npm run dev:api # http://localhost:4100
npm run dev:web:react # http://localhost:5173
npm run dev:web:vanilla # http://localhost:5174
npm run dev:web:vue # http://localhost:5177
npm run dev:mobile # http://localhost:5175
npm run dev:desktop # Electron wrapper + React desktop
npm run dev:desktop:react
npm run dev:desktop:vue
npm run platforms # @capacitor + electron + react + vite + vue + node matrix
npm run dev:example # examples/hello-uniframe
npm run dev:example:fullstack
npm run dev:example:fullstack:desktopBilgi ve Temizlik
npm run info # Manifest, hedefler ve portlar
npm run clean # Build ciktilarini temizlerBuild
npm run build:web -- --flavor react
npm run build:web -- --flavor vanilla
npm run build:web -- --flavor vue
npm run build:desktop:react
npm run build:desktop:vue
npm run build:mobile
npm run build:packages
npm run build:example
npm run buildNative Mobile
npm run mobile:add:android
npm run mobile:sync
npm run mobile:open:androidRoot Capacitor config capacitor.config.ts dosyasi playground/mobile-react/dist ciktisini Android native kabuguna baglar.
Platform Matrix
npm run platformsBu komut framework stack'ini tek kayittan listeler:
@capacitor + React + VitemobileElectron + React + VitedesktopElectron + Vue + VitedesktopVite + ReactwebVite + VuewebNode + ExpressAPI
Mimari
capacitor.config.ts
playground/
api/ TypeScript Express API
web-react/ React + TypeScript web hedefi
web-vue/ Vue + TypeScript web hedefi
web-vanilla/ Vanilla TypeScript web hedefi
mobile-react/ Mobile-first React + TypeScript hedefi
desktop/
main/ Electron main process
preload/ Guvenli bridge
renderer/ Vue desktop UI
renderer-react/ React desktop UI
examples/
hello-uniframe/ Framework paketlerini library gibi kullanan ornek proje
fullstack-uniframe/
apps/api/ Example Express API
apps/web/ Example Vue web
apps/desktop/ Example Electron main + React/Vue desktop renderer UI
apps/android/ Android/Capacitor rehberi
packages/
adapters/ Platform adapter ornekleri
cli/ TypeScript kaynakli Uniframe komut satiri
core/ Manifest, contract ve ortak runtime tipleri
platforms/ @capacitor/electron/react/vite/vue/node matrix
create-uniframe/ npx ile proje olusturan scaffold paketi
vite/ Vite helper library
framework.config.jsDetaylar:
Framework fikri
Uniframe'in ana ilkesi tek cati, coklu hedef:
- UI React, Vue veya vanilla TypeScript ile yazilabilir.
- API ayni repo icinde yasayan Express route'lari ile calisir.
- Core contract dosyalari tum hedefler tarafindan import edilir.
- Desktop hedefi Electron ile kendi React veya Vue renderer UI alanini masaustune tasir.
- Mobile hedefi React + Vite olarak gelistirilir ve Capacitor ile Android native kabuguna senkronlanir.
Bu paket artik sadece MVP degil; CI, lint, typecheck, test, manifest, publish-ready library paketleri, ornek proje, dokumantasyon ve guvenlik hijyeni olan genisletilebilir bir framework temelidir.
Fullstack Example
examples/fullstack-uniframe icinde ayni proje altinda hedefler ayridir:
npm --workspace fullstack-uniframe run dev:api
npm --workspace fullstack-uniframe run dev:web
npm --workspace fullstack-uniframe run dev:desktop
npm --workspace fullstack-uniframe run dev:desktop:react
npm --workspace fullstack-uniframe run dev:desktop:vue
npm --workspace fullstack-uniframe run build:desktop
npm --workspace fullstack-uniframe run buildAndroid icin:
npm --workspace fullstack-uniframe run android:add
npm --workspace fullstack-uniframe run android:sync
npm --workspace fullstack-uniframe run android:openAndroid komutlari Android Studio ve Android SDK gerektirir.
