แอปพลิเคชัน SvelteKit ที่ออกแบบมาเพื่อรองรับการขยายตัว พร้อมระบบ Authentication และ Admin Panel
src/
├── lib/ # Shared Layer
│ ├── components/ # Component ใช้ซ้ำ
│ ├── layouts/ # Layout หลัก
│ ├── services/ # ฟังก์ชันเรียก API
│ ├── stores/ # Global store
│ ├── utils/ # Helper functions
│ └── types/ # TypeScript interfaces
│
├── features/ # ฟีเจอร์ตามโมดูล
│ ├── auth/ # Authentication
│ │ ├── components/ # LoginForm, RegisterForm
│ │ ├── services/ # authService
│ │ └── stores/ # authStore
│ │
│ └── admin/ # Admin features
│ ├── services/ # adminService
│ └── stores/ # adminStore
│
├── routes/ # Routing หลัก
│ ├── (public)/ # Routes สาธารณะ
│ ├── (admin)/ # Routes สำหรับ Admin
│ └── (auth)/ # Routes สำหรับ Auth
│
└── hooks.server.ts # Server hooks
Clone โปรเจ็กต์
git clone [repository-url]
cd sveltekit-scaleable
ติดตั้ง dependencies
npm install
# หรือ
bun install
คัดลอก environment variables
cp .env.example .env
แก้ไขไฟล์ .env
ตามการตั้งค่าของคุณ
เริ่มการพัฒนา
npm run dev
# หรือ
bun dev
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.