From f5a633227fa87e8a1ae55448c679df8e8c5e6035 Mon Sep 17 00:00:00 2001 From: "Faizulhaq F.N" <101050815+zulzunman@users.noreply.github.com> Date: Thu, 27 Aug 2026 19:45:15 +0700 Subject: [PATCH] auto winn --- .agents/rules/coding-standards.md | 186 ++ .agents/rules/phase-workflow.md | 353 ++++ .agents/skills/feature-guide/SKILL.md | 229 +++ .agents/skills/react-component/SKILL.md | 160 ++ .agents/skills/state-management/SKILL.md | 212 ++ .agents/skills/ui-design/SKILL.md | 268 +++ .gitignore | 24 + .oxlintrc.json | 8 + AGENTS.md | 318 +++ README.md | 356 ++++ index.html | 18 + package-lock.json | 1925 ++++++++++++++++++ package.json | 32 + public/favicon.svg | 1 + public/icons.svg | 24 + src/App.jsx | 32 + src/assets/hero.png | Bin 0 -> 13057 bytes src/assets/react.svg | 1 + src/assets/vite.svg | 1 + src/components/budget/AddExpenseModal.jsx | 180 ++ src/components/budget/BudgetChart.jsx | 256 +++ src/components/budget/BudgetOverview.jsx | 281 +++ src/components/budget/ExpenseList.jsx | 330 +++ src/components/layout/Footer.jsx | 157 ++ src/components/layout/Navbar.jsx | 366 ++++ src/components/layout/PageWrapper.jsx | 19 + src/components/packing/PackingCategory.jsx | 255 +++ src/components/packing/PackingItem.jsx | 181 ++ src/components/packing/PackingOverview.jsx | 147 ++ src/components/packing/TemplateModal.jsx | 136 ++ src/components/schedule/ActivityItem.jsx | 299 +++ src/components/schedule/AddActivityModal.jsx | 256 +++ src/components/schedule/DayTabs.jsx | 127 ++ src/components/schedule/ScheduleTimeline.jsx | 145 ++ src/components/trip/CustomTripModal.jsx | 216 ++ src/components/trip/FilterBar.jsx | 172 ++ src/components/trip/HeroSection.jsx | 157 ++ src/components/trip/TripCard.jsx | 249 +++ src/components/trip/TripModal.jsx | 203 ++ src/components/ui/Badge.jsx | 48 + src/components/ui/Button.jsx | 83 + src/components/ui/Card.jsx | 47 + src/components/ui/EmptyState.jsx | 75 + src/components/ui/Modal.jsx | 180 ++ src/components/ui/ProgressBar.jsx | 76 + src/components/ui/ToastContainer.jsx | 138 ++ src/data/activities.js | 122 ++ src/data/destinations.js | 185 ++ src/data/packingTemplates.js | 168 ++ src/hooks/useBudget.js | 47 + src/hooks/usePackingList.js | 42 + src/hooks/useSchedule.js | 29 + src/hooks/useTripStore.js | 18 + src/index.css | 483 +++++ src/main.jsx | 10 + src/pages/Budget.jsx | 244 +++ src/pages/Home.jsx | 220 ++ src/pages/PackingList.jsx | 224 ++ src/pages/Schedule.jsx | 225 ++ src/store/toastStore.js | 31 + src/store/tourStore.js | 372 ++++ src/utils/dateHelpers.js | 69 + src/utils/formatCurrency.js | 53 + src/utils/helpers.js | 19 + task.md | 81 + vite.config.js | 7 + 66 files changed, 11576 insertions(+) create mode 100644 .agents/rules/coding-standards.md create mode 100644 .agents/rules/phase-workflow.md create mode 100644 .agents/skills/feature-guide/SKILL.md create mode 100644 .agents/skills/react-component/SKILL.md create mode 100644 .agents/skills/state-management/SKILL.md create mode 100644 .agents/skills/ui-design/SKILL.md create mode 100644 .gitignore create mode 100644 .oxlintrc.json create mode 100644 AGENTS.md create mode 100644 README.md create mode 100644 index.html create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 public/favicon.svg create mode 100644 public/icons.svg create mode 100644 src/App.jsx create mode 100644 src/assets/hero.png create mode 100644 src/assets/react.svg create mode 100644 src/assets/vite.svg create mode 100644 src/components/budget/AddExpenseModal.jsx create mode 100644 src/components/budget/BudgetChart.jsx create mode 100644 src/components/budget/BudgetOverview.jsx create mode 100644 src/components/budget/ExpenseList.jsx create mode 100644 src/components/layout/Footer.jsx create mode 100644 src/components/layout/Navbar.jsx create mode 100644 src/components/layout/PageWrapper.jsx create mode 100644 src/components/packing/PackingCategory.jsx create mode 100644 src/components/packing/PackingItem.jsx create mode 100644 src/components/packing/PackingOverview.jsx create mode 100644 src/components/packing/TemplateModal.jsx create mode 100644 src/components/schedule/ActivityItem.jsx create mode 100644 src/components/schedule/AddActivityModal.jsx create mode 100644 src/components/schedule/DayTabs.jsx create mode 100644 src/components/schedule/ScheduleTimeline.jsx create mode 100644 src/components/trip/CustomTripModal.jsx create mode 100644 src/components/trip/FilterBar.jsx create mode 100644 src/components/trip/HeroSection.jsx create mode 100644 src/components/trip/TripCard.jsx create mode 100644 src/components/trip/TripModal.jsx create mode 100644 src/components/ui/Badge.jsx create mode 100644 src/components/ui/Button.jsx create mode 100644 src/components/ui/Card.jsx create mode 100644 src/components/ui/EmptyState.jsx create mode 100644 src/components/ui/Modal.jsx create mode 100644 src/components/ui/ProgressBar.jsx create mode 100644 src/components/ui/ToastContainer.jsx create mode 100644 src/data/activities.js create mode 100644 src/data/destinations.js create mode 100644 src/data/packingTemplates.js create mode 100644 src/hooks/useBudget.js create mode 100644 src/hooks/usePackingList.js create mode 100644 src/hooks/useSchedule.js create mode 100644 src/hooks/useTripStore.js create mode 100644 src/index.css create mode 100644 src/main.jsx create mode 100644 src/pages/Budget.jsx create mode 100644 src/pages/Home.jsx create mode 100644 src/pages/PackingList.jsx create mode 100644 src/pages/Schedule.jsx create mode 100644 src/store/toastStore.js create mode 100644 src/store/tourStore.js create mode 100644 src/utils/dateHelpers.js create mode 100644 src/utils/formatCurrency.js create mode 100644 src/utils/helpers.js create mode 100644 task.md create mode 100644 vite.config.js diff --git a/.agents/rules/coding-standards.md b/.agents/rules/coding-standards.md new file mode 100644 index 0000000..12c1fc1 --- /dev/null +++ b/.agents/rules/coding-standards.md @@ -0,0 +1,186 @@ +# Coding Standards — Tour Planner App + +Aturan ini berlaku untuk semua kode yang ditulis dalam proyek ini. +AI agent wajib mengikuti seluruh aturan di bawah ini. + +--- + +## 1. Struktur Komponen + +```jsx +// ✅ BENAR — Functional component dengan arrow function +const MyComponent = ({ prop1, prop2 }) => { + // hooks di atas + // logic di tengah + // return di bawah + return
; +}; + +export default MyComponent; + +// ❌ SALAH — Jangan gunakan class component +class MyComponent extends React.Component { } +``` + +--- + +## 2. Styling + +```jsx +// ✅ BENAR — CSS variables dari design system +
+ +// ✅ BENAR — className dengan class yang didefinisikan di CSS +
+ +// ❌ SALAH — Hardcode warna +
+ +// ❌ SALAH — TailwindCSS +
+``` + +--- + +## 3. State Management + +```javascript +// ✅ BENAR — Gunakan Zustand store untuk state yang di-share +const { schedule, addActivity } = useTourStore(); + +// ✅ BENAR — useState untuk state lokal (form, toggle) +const [isOpen, setIsOpen] = useState(false); + +// ❌ SALAH — Prop drilling lebih dari 2 level + +``` + +--- + +## 4. Animasi + +```jsx +// ✅ BENAR — Selalu gunakan Framer Motion +import { motion } from 'framer-motion'; + + +// ❌ SALAH — Animasi manual +setTimeout(() => setVisible(true), 100); +element.style.transition = 'opacity 0.3s'; +``` + +--- + +## 5. Icons + +```jsx +// ✅ BENAR — Lucide React +import { MapPin, Calendar, Plane } from 'lucide-react'; + + +// ❌ SALAH — Emoji sebagai icon UI +📍 + +// ❌ SALAH — SVG inline tanpa abstraksi + +``` + +--- + +## 6. Data & Constants + +```javascript +// ✅ BENAR — Data di src/data/ +import { destinations } from '../data/destinations'; +import { CATEGORY_COLORS } from '../data/constants'; + +// ❌ SALAH — Data hardcode di dalam komponen +const destinations = [{ name: 'Bali', ... }]; // dalam file .jsx +``` + +--- + +## 7. File Naming + +| Tipe | Convention | Contoh | +|------|------------|--------| +| Component | PascalCase | `TripCard.jsx` | +| Hook | camelCase dengan "use" prefix | `useBudget.js` | +| Utility | camelCase | `formatCurrency.js` | +| Data file | camelCase | `destinations.js` | +| CSS | kebab-case | `trip-card.css` | + +--- + +## 8. Import Order + +```javascript +// 1. React & hooks +import { useState, useEffect } from 'react'; + +// 2. Third-party libraries +import { motion, AnimatePresence } from 'framer-motion'; +import { MapPin } from 'lucide-react'; + +// 3. Internal store & hooks +import { useTourStore } from '../store/tourStore'; +import { useBudget } from '../hooks/useBudget'; + +// 4. Components +import Button from '../components/ui/Button'; +import TripCard from '../components/trip/TripCard'; + +// 5. Data & utils +import { destinations } from '../data/destinations'; +import { formatIDR } from '../utils/formatCurrency'; + +// 6. Styles (jika ada) +import './ComponentName.css'; +``` + +--- + +## 9. Performance + +- Gunakan `useMemo` untuk kalkulasi berat (total budget, statistik packing) +- Gunakan `useCallback` untuk handler yang di-pass sebagai prop +- Gunakan `React.memo` untuk komponen list item yang berat +- Jangan lakukan side effect tanpa `useEffect` + +--- + +## 10. Batasan Fitur (TIDAK BOLEH DILANGGAR) + +| Larangan | Alasan | +|----------|--------| +| ❌ Login / Logout | Aplikasi ini sepenuhnya static & lokal | +| ❌ API call ke backend | Tidak ada server, semua data lokal | +| ❌ Menyimpan password atau data sensitif | Tidak ada autentikasi | +| ❌ TailwindCSS | Gunakan vanilla CSS + CSS variables | +| ❌ jQuery atau manipulasi DOM manual | Gunakan React state | +| ❌ `console.log` di production code | Hapus sebelum commit | + +--- + +## 11. Aksesibilitas (Minimum Requirements) + +- Semua tombol punya `aria-label` jika tidak ada teks +- Semua form field punya `