Komut paleti

@yasinsensoy/web

Sayfa şablonları

Hazır, çalışan Next.js (App Router) sayfaları. Yeni bir sayfa yazarken önce uygun şablonu kopyala ve uyarla; kütüphanenin doğru kullanımını (sunucu/istemci ayrımı, Form + sunucu eylemi, *Field, iskelet yükleme, mobil düzen) gösterirler. npx @yasinsensoy/web template <ad> dosyaları projede yerlerine kopyalar (src/app varsa oraya). Şablonlardaki ikon adlarını UIProvider icons ile kaydet ya da kendi adlarınla değiştir; adresleri (/panel, /giris) projene göre düzelt.

app-shell

App skeleton: the Sidebar main menu on the left, page content next to it. On desktop it collapses into an icon rail (⌘B / Ctrl+B) and remembers its state; on phones it becomes a bottom navigation bar. The user menu is at the bottom of the sidebar.

  • It is a server component: menu items are written on the server and icons are given by name. The active page is marked automatically from the URL (the @yasinsensoy/web/next provider wires usePathname).
  • The dashboard and settings templates are written to sit inside this skeleton (/panel, /panel/settings).
  • Icon names used: ev, grafik, sepet, kullanici, klasor, ayarlar, cikis, diger. Register them with UIProvider icons or replace them with your own names.
Projene kopyala
Bash
npx @yasinsensoy/web template app-shell

Dosyalar

  • app/panel/layout.tsx

dashboard

Gösterge paneli (dashboard): özet kartları (KPI) ve küçük eğilim çizgileri, aylık gelir/gider grafiği, trafik kanalları halka grafiği, son siparişler tablosu ve etkinlik akışı.

  • Sunucu bileşenidir: veri data.ts'teki işlevlerden sunucuda okunur, tarayıcıya yalnızca etkileşimli parçalar (grafik, menü) gider.
  • Yüklenirken loading.tsx aynı düzende iskelet gösterir; sayfa kaymaz.
  • Telefonda kartlar alt alta dizilir, tablo satırları karta dönüşür.
  • app-shell şablonunun içinde /panel adresinde çalışır; tek başına da kullanılabilir.
  • Kullanılan ikon adları: indir, ekle, diger.
Projene kopyala
Bash
npx @yasinsensoy/web template dashboard

Dosyalar

  • app/panel/page.tsx
  • app/panel/data.ts
  • app/panel/loading.tsx

login

Sign-in page: a centered card, email + password, "Forgot password", social sign-in buttons and a two-step verification code (OTP).

  • Works with a single server action (actions.ts); the two steps change in the same card, the page does not reload.
  • Correct autoComplete values are set for the browser's password manager and one-tap code filling; on Android the SMS code fills automatically via WebOTP, and the form submits itself when the code is complete.
  • Pressing and holding the eye at the end of the password field shows the password.
  • Errors appear below the field and the first invalid field is focused.
  • On phones the card is full width, and when the keyboard opens the field does not stay under it.
  • Runs outside the panel layout, with its own layout (app/login).
Projene kopyala
Bash
npx @yasinsensoy/web template login

Dosyalar

  • app/login/page.tsx
  • app/login/actions.ts
  • app/login/login-form.tsx

settings

Settings page: Profile, Account, Notifications and Appearance tabs and a "Delete account" section.

  • Each tab is a separate Form and server action (actions.ts): validation happens in the browser (required, type, mask) and on the server, server errors are spread below the fields via Form state, and success is announced with toast.
  • The profile photo is picked with FileField and cropped round with edit (MediaEditor).
  • Phone uses mask="phone"; password fields reveal on press and hold.
  • The theme is changed with useTheme + ThemeView; no flicker on first paint.
  • Deletion is confirmed with await confirm(...); while deleting, the dialog's confirm button shows loading.
  • A tab can be linked to: /panel/settings?tab=account.
  • Icon names used: kullanici, kilit, zil, ayarlar.
Projene kopyala
Bash
npx @yasinsensoy/web template settings

Dosyalar

  • app/panel/settings/page.tsx
  • app/panel/settings/actions.ts
  • app/panel/settings/forms.tsx