deploy 1
This commit is contained in:
235
README.md
235
README.md
@@ -1,119 +1,174 @@
|
||||
# Shadcn Admin Dashboard
|
||||
# Bogazici Admin Dashboard
|
||||
|
||||
Admin Dashboard UI crafted with Shadcn and Vite. Built with responsiveness and accessibility in mind.
|
||||
Bogazici Denizcilik yonetim paneli. Kurs, duyuru, sayfa, kullanici ve icerik yonetimi icin gelistirilmis kapsamli bir CMS admin uygulamasidir.
|
||||
|
||||

|
||||
## Ozellikler
|
||||
|
||||
[](https://go.clerk.com/GttUAaK)
|
||||
### Icerik Yonetimi
|
||||
|
||||
I've been creating dashboard UIs at work and for my personal projects. I always wanted to make a reusable collection of dashboard UI for future projects; and here it is now. While I've created a few custom components, some of the code is directly adapted from ShadcnUI examples.
|
||||
- **Kurslar** - Kurs olusturma, duzenleme, kategori atama, fiyatlandirma, gorsel yukleme
|
||||
- **Kurs Takvimleri** - Takvim planlamasi, kontenjan takibi, egitmen atama
|
||||
- **Kategoriler** - Kurslari kategorilere ayirma, slug, SEO meta bilgileri
|
||||
- **Duyurular** - Blog tarzinda duyurular, zengin metin editoru, one cikan gorseller
|
||||
- **Sayfalar** - Blok tabanli sayfa olusturucu ile dinamik CMS sayfalari
|
||||
- **SSS** - Sikca sorulan sorular yonetimi
|
||||
- **Basari Hikayeleri** - Musteri referanslari ve basari hikayeleri
|
||||
|
||||
> This is not a starter project (template) though. I'll probably make one in the future.
|
||||
### Site Yonetimi
|
||||
|
||||
## Features
|
||||
- **Hero Slider** - Ana sayfa karousel yonetimi (gorsel ve video destegi)
|
||||
- **Menuler** - Hiyerarsik navigasyon menu yonetimi
|
||||
- **Rehber Kartlari** - Bilgilendirme kartlari yonetimi
|
||||
- **Ayarlar** - Sistem genelinde yapilandirma
|
||||
|
||||
- Light/dark mode
|
||||
- Responsive
|
||||
- Accessible
|
||||
- With built-in Sidebar component
|
||||
- Global search command
|
||||
- 10+ pages
|
||||
- Extra custom components
|
||||
- RTL support
|
||||
### Kullanici ve Erisim
|
||||
|
||||
<details>
|
||||
<summary>Customized Components (click to expand)</summary>
|
||||
- **Kullanici Yonetimi** - Admin kullanicilari CRUD islemleri, rol atama
|
||||
- **Rol Tabanli Erisim Kontrolu (RBAC)** - Modullere gore ayrilmis detayli izin tanimlari
|
||||
- **Lead Yonetimi** - Farkli kaynaklardan (form, WhatsApp) gelen leadlerin takibi, UTM parametreleri, KVKK onay takibi
|
||||
- **Yorum Moderasyonu** - Yorumlari onaylama/reddetme, admin yaniti
|
||||
|
||||
This project uses Shadcn UI components, but some have been slightly modified for better RTL (Right-to-Left) support and other improvements. These customized components differ from the original Shadcn UI versions.
|
||||
### Arayuz
|
||||
|
||||
If you want to update components using the Shadcn CLI (e.g., `npx shadcn@latest add <component>`), it's generally safe for non-customized components. For the listed customized ones, you may need to manually merge changes to preserve the project's modifications and avoid overwriting RTL support or other updates.
|
||||
- Acik/karanlik/sistem tema destegi
|
||||
- Responsive tasarim
|
||||
- Komut paleti (Cmd/Ctrl+K) ile hizli navigasyon
|
||||
- Siralama, filtreleme ve sayfalama destekli veri tablolari
|
||||
- Zengin metin editoru (TipTap)
|
||||
- Gorsel ve video yukleme
|
||||
- Erisebilirlik (a11y) destegi
|
||||
- RTL/LTR dil yonu destegi
|
||||
- Toast bildirimleri ve ilerleme gostergeleri
|
||||
|
||||
> If you don't require RTL support, you can safely update the 'RTL Updated Components' via the Shadcn CLI, as these changes are primarily for RTL compatibility. The 'Modified Components' may have other customizations to consider.
|
||||
## Teknoloji Yigini
|
||||
|
||||
### Modified Components
|
||||
| Katman | Teknoloji |
|
||||
|---|---|
|
||||
| **UI Framework** | [React 19](https://react.dev) |
|
||||
| **Build** | [Vite 7](https://vitejs.dev) + [SWC](https://swc.rs) |
|
||||
| **Bilesenler** | [Shadcn UI](https://ui.shadcn.com) (TailwindCSS + Radix UI) |
|
||||
| **Routing** | [TanStack Router](https://tanstack.com/router) (dosya tabanli, otomatik code splitting) |
|
||||
| **Sunucu Durumu** | [TanStack React Query](https://tanstack.com/query) |
|
||||
| **Istemci Durumu** | [Zustand](https://zustand.docs.pmnd.rs) |
|
||||
| **Formlar** | [React Hook Form](https://react-hook-form.com) + [Zod](https://zod.dev) |
|
||||
| **Zengin Metin** | [TipTap](https://tiptap.dev) |
|
||||
| **Grafikler** | [Recharts](https://recharts.org) |
|
||||
| **Tablolar** | [TanStack Table](https://tanstack.com/table) |
|
||||
| **HTTP** | [Axios](https://axios-http.com) (Bearer token interceptor) |
|
||||
| **Stil** | [TailwindCSS 4](https://tailwindcss.com) |
|
||||
| **Ikonlar** | [Lucide](https://lucide.dev) |
|
||||
| **Dil** | [TypeScript](https://www.typescriptlang.org) |
|
||||
| **Lint/Format** | [ESLint](https://eslint.org) + [Prettier](https://prettier.io) |
|
||||
|
||||
- scroll-area
|
||||
- sonner
|
||||
- separator
|
||||
## Proje Yapisi
|
||||
|
||||
### RTL Updated Components
|
||||
|
||||
- alert-dialog
|
||||
- calendar
|
||||
- command
|
||||
- dialog
|
||||
- dropdown-menu
|
||||
- select
|
||||
- table
|
||||
- sheet
|
||||
- sidebar
|
||||
- switch
|
||||
|
||||
**Notes:**
|
||||
|
||||
- **Modified Components**: These have general updates, potentially including RTL adjustments.
|
||||
- **RTL Updated Components**: These have specific changes for RTL language support (e.g., layout, positioning).
|
||||
- For implementation details, check the source files in `src/components/ui/`.
|
||||
- All other Shadcn UI components in the project are standard and can be safely updated via the CLI.
|
||||
|
||||
</details>
|
||||
|
||||
## Tech Stack
|
||||
|
||||
**UI:** [ShadcnUI](https://ui.shadcn.com) (TailwindCSS + RadixUI)
|
||||
|
||||
**Build Tool:** [Vite](https://vitejs.dev/)
|
||||
|
||||
**Routing:** [TanStack Router](https://tanstack.com/router/latest)
|
||||
|
||||
**Type Checking:** [TypeScript](https://www.typescriptlang.org/)
|
||||
|
||||
**Linting/Formatting:** [ESLint](https://eslint.org/) & [Prettier](https://prettier.io/)
|
||||
|
||||
**Icons:** [Lucide Icons](https://lucide.dev/icons/), [Tabler Icons](https://tabler.io/icons) (Brand icons only)
|
||||
|
||||
**Auth (partial):** [Clerk](https://go.clerk.com/GttUAaK)
|
||||
|
||||
## Run Locally
|
||||
|
||||
Clone the project
|
||||
|
||||
```bash
|
||||
git clone https://github.com/satnaing/shadcn-admin.git
|
||||
```
|
||||
src/
|
||||
├── routes/ # TanStack Router dosya tabanli yonlendirme
|
||||
│ ├── (auth)/ # Giris sayfalari
|
||||
│ ├── _authenticated/ # Korunmus rotalar (auth guard)
|
||||
│ │ ├── dashboard/ # Ana panel
|
||||
│ │ ├── courses/ # Kurs yonetimi
|
||||
│ │ ├── categories/ # Kategori yonetimi
|
||||
│ │ ├── schedules/ # Takvim yonetimi
|
||||
│ │ ├── announcements/ # Duyuru yonetimi
|
||||
│ │ ├── pages/ # Sayfa yonetimi (CMS)
|
||||
│ │ ├── users/ # Kullanici yonetimi
|
||||
│ │ ├── roles/ # Rol yonetimi
|
||||
│ │ ├── leads/ # Lead yonetimi
|
||||
│ │ ├── comments/ # Yorum moderasyonu
|
||||
│ │ ├── hero-slides/ # Hero slider
|
||||
│ │ ├── faqs/ # SSS
|
||||
│ │ ├── menus/ # Menu yonetimi
|
||||
│ │ ├── guide-cards/ # Rehber kartlari
|
||||
│ │ ├── stories/ # Basari hikayeleri
|
||||
│ │ └── settings/ # Ayarlar
|
||||
│ └── (errors)/ # Hata sayfalari (403, 404, 500)
|
||||
├── features/ # Ozellik modulleri (her module CRUD islemleri)
|
||||
├── components/
|
||||
│ ├── ui/ # Shadcn UI bilesenler (40+)
|
||||
│ ├── layout/ # Sidebar, header, ana layout
|
||||
│ ├── data-table/ # Yeniden kullanilabilir tablo bilesenleri
|
||||
│ └── block-manager/ # Sayfa blok yonetimi
|
||||
├── lib/api/ # API istemcisi ve modul bazli API fonksiyonlari
|
||||
├── stores/ # Zustand durum yonetimi
|
||||
├── context/ # React context (tema, font, yon, layout)
|
||||
└── hooks/ # Ozel React hooklari
|
||||
```
|
||||
|
||||
Go to the project directory
|
||||
## Kurulum
|
||||
|
||||
### Gereksinimler
|
||||
|
||||
- Node.js 22+
|
||||
- pnpm
|
||||
|
||||
### Yerel Gelistirme
|
||||
|
||||
```bash
|
||||
cd shadcn-admin
|
||||
# Projeyi klonla
|
||||
git clone <repo-url>
|
||||
cd bogazici-admin
|
||||
|
||||
# Ortam degiskenlerini ayarla
|
||||
cp .env.example .env
|
||||
# .env dosyasinda VITE_API_BASE_URL degerini duzenle
|
||||
|
||||
# Bagimliliklari yukle
|
||||
pnpm install
|
||||
|
||||
# Gelistirme sunucusunu baslat
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Install dependencies
|
||||
### Mevcut Betikler
|
||||
|
||||
| Betik | Aciklama |
|
||||
|---|---|
|
||||
| `pnpm dev` | Gelistirme sunucusu |
|
||||
| `pnpm build` | TypeScript kontrolu + uretim derlemesi |
|
||||
| `pnpm preview` | Uretim derlemesini onizle |
|
||||
| `pnpm lint` | ESLint ile kod kontrolu |
|
||||
| `pnpm format` | Prettier ile otomatik formatlama |
|
||||
| `pnpm format:check` | Format kontrolu |
|
||||
| `pnpm knip` | Kullanilmayan dosya/bagimlilik tespiti |
|
||||
|
||||
### Ortam Degiskenleri
|
||||
|
||||
| Degisken | Aciklama |
|
||||
|---|---|
|
||||
| `VITE_API_BASE_URL` | Backend API adresi (orn: `https://bogazici-api.test`) |
|
||||
|
||||
## Deployment
|
||||
|
||||
### Docker
|
||||
|
||||
Proje, multi-stage Docker build ile Nginx uzerinde sunulmaktadir.
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
# Uretim imajini olustur
|
||||
docker build --build-arg VITE_API_BASE_URL=https://api.bogazicidenizcilik.com -t bogazici-admin .
|
||||
|
||||
# Calistir
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
Start the server
|
||||
### CI/CD (DroneCI)
|
||||
|
||||
```bash
|
||||
pnpm run dev
|
||||
```
|
||||
| Dal | Islem |
|
||||
|---|---|
|
||||
| `develop` | TypeScript kontrolu + build dogrulamasi |
|
||||
| `test` | Test sunucusuna otomatik deploy |
|
||||
| `main` | Uretim sunucusuna otomatik deploy |
|
||||
|
||||
## Sponsoring this project ❤️
|
||||
## Kimlik Dogrulama
|
||||
|
||||
If you find this project helpful or use this in your own work, consider [sponsoring me](https://github.com/sponsors/satnaing) to support development and maintenance. You can [buy me a coffee](https://buymeacoffee.com/satnaing) as well. Don’t worry, every penny helps. Thank you! 🙏
|
||||
- Email/sifre ile giris (`/sign-in`)
|
||||
- JWT Bearer token tabanli kimlik dogrulama
|
||||
- Token ve kullanici bilgisi Zustand store + cookie’lerde saklanir
|
||||
- 401 yaniti alindiginda otomatik oturum sonlandirma
|
||||
- Tum `/_authenticated` rotalari gecerli token gerektirir
|
||||
|
||||
For questions or sponsorship inquiries, feel free to reach out at [satnaingdev@gmail.com](mailto:satnaingdev@gmail.com).
|
||||
## Lisans
|
||||
|
||||
### Current Sponsor
|
||||
|
||||
- [Clerk](https://go.clerk.com/GttUAaK) - authentication and user management for the modern web
|
||||
|
||||
## Author
|
||||
|
||||
Crafted with 🤍 by [@satnaing](https://github.com/satnaing)
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the [MIT License](https://choosealicense.com/licenses/mit/)
|
||||
[MIT](https://choosealicense.com/licenses/mit/)
|
||||
|
||||
Reference in New Issue
Block a user