@adlas/create-app 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +476 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +39 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/figma.d.ts +16 -0
- package/dist/commands/figma.d.ts.map +1 -0
- package/dist/commands/figma.js +172 -0
- package/dist/commands/figma.js.map +1 -0
- package/dist/commands/index.d.ts +5 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +5 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1471 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/swagger.d.ts +16 -0
- package/dist/commands/swagger.d.ts.map +1 -0
- package/dist/commands/swagger.js +404 -0
- package/dist/commands/swagger.js.map +1 -0
- package/dist/commands/update.d.ts +15 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +93 -0
- package/dist/commands/update.js.map +1 -0
- package/package.json +63 -0
- package/templates/.vscode/extensions.json +9 -0
- package/templates/.vscode/launch.json +26 -0
- package/templates/.vscode/settings.json +67 -0
- package/templates/.vscode/tasks.json +21 -0
- package/templates/boilerplate/config/fonts.ts +10 -0
- package/templates/boilerplate/config/navigationUrls.ts +47 -0
- package/templates/boilerplate/config/site.ts +96 -0
- package/templates/boilerplate/libs/I18n.ts +15 -0
- package/templates/boilerplate/libs/I18nNavigation.ts +5 -0
- package/templates/boilerplate/libs/I18nRouting.ts +9 -0
- package/templates/boilerplate/libs/env.ts +21 -0
- package/templates/boilerplate/libs/react-query/ReactQueryProvider.tsx +21 -0
- package/templates/boilerplate/libs/react-query/index.ts +2 -0
- package/templates/boilerplate/libs/react-query/queryClient.ts +62 -0
- package/templates/boilerplate/libs/react-query/queryKeys.ts +5 -0
- package/templates/boilerplate/public/images/index.ts +1 -0
- package/templates/boilerplate/reset.d.ts +2 -0
- package/templates/boilerplate/styles/globals.css +308 -0
- package/templates/boilerplate/types/i18n.ts +10 -0
- package/templates/boilerplate/types/locale.ts +8 -0
- package/templates/boilerplate/utils/file/fileConfig.ts +123 -0
- package/templates/boilerplate/utils/file/fileValidation.ts +78 -0
- package/templates/boilerplate/utils/file/imageCompression.ts +182 -0
- package/templates/boilerplate/utils/file/index.ts +3 -0
- package/templates/boilerplate/utils/helpers.ts +55 -0
- package/templates/boilerplate/validations/auth.validation.ts +92 -0
- package/templates/boilerplate/validations/commonValidations.ts +258 -0
- package/templates/boilerplate/validations/zodErrorMap.ts +101 -0
- package/templates/configs/.env.example +8 -0
- package/templates/configs/.prettierignore +23 -0
- package/templates/configs/.prettierrc.cjs +26 -0
- package/templates/configs/.prettierrc.icons.cjs +11 -0
- package/templates/configs/Dockerfile +6 -0
- package/templates/configs/commitlint.config.ts +8 -0
- package/templates/configs/eslint.config.mjs +119 -0
- package/templates/configs/knip.config.ts +32 -0
- package/templates/configs/lefthook.yml +42 -0
- package/templates/configs/lint-staged.config.js +8 -0
- package/templates/configs/next.config.template.ts +77 -0
- package/templates/configs/next.config.ts +43 -0
- package/templates/configs/package.json +75 -0
- package/templates/configs/postcss.config.mjs +15 -0
- package/templates/configs/svgr.config.mjs +129 -0
- package/templates/configs/tsconfig.json +75 -0
- package/templates/docs/AI_QUICK_REFERENCE.md +379 -0
- package/templates/docs/ARCHITECTURE_PATTERNS.md +927 -0
- package/templates/docs/DOCUMENTATION_INDEX.md +411 -0
- package/templates/docs/FIGMA_TO_CODE_GUIDE.md +768 -0
- package/templates/docs/IMPLEMENTATION_GUIDE.md +892 -0
- package/templates/docs/PROJECT_OVERVIEW.md +302 -0
- package/templates/docs/REFACTOR_PROGRESS.md +1113 -0
- package/templates/docs/SHADCN_TO_HEROUI_MIGRATION.md +1375 -0
- package/templates/docs/UI_COMPONENTS_GUIDE.md +893 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# Berndorf E-Commerce Project - Overview
|
|
2
|
+
|
|
3
|
+
## 📋 Project Summary
|
|
4
|
+
|
|
5
|
+
This is a **Next.js 15 E-commerce Application** built as a Headless commerce solution with **Saleor GraphQL** backend. The project includes an online store, gift registry system, wishlist, user profile management, and other features.
|
|
6
|
+
|
|
7
|
+
## 🛠️ Tech Stack
|
|
8
|
+
|
|
9
|
+
### Core Technologies
|
|
10
|
+
- **Framework**: Next.js 15.5.4 (App Router + Turbopack)
|
|
11
|
+
- **React**: 19.2.0
|
|
12
|
+
- **TypeScript**: 5.9.3 (Strict Mode)
|
|
13
|
+
- **Node.js**: ES2017 target
|
|
14
|
+
- **Package Manager**: pnpm
|
|
15
|
+
|
|
16
|
+
### UI & Styling
|
|
17
|
+
- **UI Library**: `@heroui/react` v2.8.5 (Primary UI library)
|
|
18
|
+
- **Styling**: Tailwind CSS v4.1.17
|
|
19
|
+
- **Icons**: 54 SVG icons in `/src/assets/icons`
|
|
20
|
+
- **Fonts**:
|
|
21
|
+
- Raleway (Primary)
|
|
22
|
+
- Inter (Secondary)
|
|
23
|
+
- Water Brush (Decorative)
|
|
24
|
+
|
|
25
|
+
### State Management & Data Fetching
|
|
26
|
+
- **Global State**: Zustand v5.0.8
|
|
27
|
+
- **Server State**: TanStack React Query v5.90.7
|
|
28
|
+
- **Forms**: react-hook-form v7.66.0
|
|
29
|
+
- **Validation**: Zod v4.1.12
|
|
30
|
+
|
|
31
|
+
### Internationalization
|
|
32
|
+
- **Library**: next-intl v4.5.0
|
|
33
|
+
- **Languages**: English (en), German (de - default)
|
|
34
|
+
- **Locale Files**: `/src/locales/en.json`, `/src/locales/de.json`
|
|
35
|
+
|
|
36
|
+
### Backend Integration
|
|
37
|
+
- **E-commerce**: Saleor GraphQL
|
|
38
|
+
- **Auth**: @saleor/auth-sdk v1.0.3
|
|
39
|
+
- **GraphQL**: TypedDocumentString pattern
|
|
40
|
+
|
|
41
|
+
### Animation & Interactions
|
|
42
|
+
- **Animation**: GSAP v3.13.0
|
|
43
|
+
- **Carousel**: embla-carousel v8.6.0
|
|
44
|
+
- **Maps**: react-leaflet v5.0.0
|
|
45
|
+
|
|
46
|
+
### Development Tools
|
|
47
|
+
- **Linting**: ESLint v9 (@antfu/eslint-config)
|
|
48
|
+
- **Formatting**: Prettier v3.6.2 + prettier-plugin-tailwindcss
|
|
49
|
+
- **Git Hooks**: Lefthook v1.13.6
|
|
50
|
+
- **Type Checking**: TypeScript strict mode
|
|
51
|
+
- **Commitlint**: Conventional commits
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 📁 Project Structure
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
berndorf-front/
|
|
59
|
+
├── src/
|
|
60
|
+
│ ├── app/ # Next.js App Router
|
|
61
|
+
│ │ ├── [locale]/ # Internationalized routes
|
|
62
|
+
│ │ │ ├── (website)/ # Public pages (home, products, etc.)
|
|
63
|
+
│ │ │ ├── (dashboard)/ # Protected pages (profile, gift-list, etc.)
|
|
64
|
+
│ │ │ └── auth/ # Authentication pages
|
|
65
|
+
│ │ ├── api/ # API routes
|
|
66
|
+
│ │ └── providers.tsx # App-level providers
|
|
67
|
+
│ │
|
|
68
|
+
│ ├── components/ # React Components
|
|
69
|
+
│ │ ├── ui/ # Base UI components (HeroUI extensions)
|
|
70
|
+
│ │ ├── elements/ # Composite components
|
|
71
|
+
│ │ ├── pages/ # Page-specific components
|
|
72
|
+
│ │ ├── layout/ # Layout components (Navbar, Footer, etc.)
|
|
73
|
+
│ │ ├── modals/ # Modal dialogs
|
|
74
|
+
│ │ ├── auth/ # Authentication components
|
|
75
|
+
│ │ └── icons/ # Generated icon components
|
|
76
|
+
│ │
|
|
77
|
+
│ ├── services/ # Service Layer (API + Business Logic)
|
|
78
|
+
│ │ ├── {module}/
|
|
79
|
+
│ │ │ ├── api/ # GraphQL API calls
|
|
80
|
+
│ │ │ ├── actions/ # Server Actions
|
|
81
|
+
│ │ │ ├── queries/ # GraphQL queries
|
|
82
|
+
│ │ │ ├── helpers/ # Transformation functions
|
|
83
|
+
│ │ │ ├── store/ # Zustand stores
|
|
84
|
+
│ │ │ ├── types/ # TypeScript types
|
|
85
|
+
│ │ │ └── index.ts # Public exports
|
|
86
|
+
│ │
|
|
87
|
+
│ ├── hooks/ # Custom React hooks
|
|
88
|
+
│ ├── utils/ # Utility functions
|
|
89
|
+
│ ├── validations/ # Zod validation schemas
|
|
90
|
+
│ ├── config/ # App configuration
|
|
91
|
+
│ ├── libs/ # Third-party library configs
|
|
92
|
+
│ ├── locales/ # Translation files
|
|
93
|
+
│ ├── styles/ # Global styles
|
|
94
|
+
│ ├── types/ # Global TypeScript types
|
|
95
|
+
│ └── assets/ # Static assets (icons, images)
|
|
96
|
+
│
|
|
97
|
+
├── public/ # Public static files
|
|
98
|
+
├── .env.example # Environment variables template
|
|
99
|
+
├── next.config.ts # Next.js configuration
|
|
100
|
+
├── tailwind.config (in globals.css)
|
|
101
|
+
├── tsconfig.json # TypeScript configuration
|
|
102
|
+
├── lefthook.yml # Git hooks configuration
|
|
103
|
+
└── package.json # Dependencies and scripts
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 🎯 Key Features
|
|
109
|
+
|
|
110
|
+
### 1. Authentication System
|
|
111
|
+
- ✅ Login / Register
|
|
112
|
+
- ✅ Password Reset
|
|
113
|
+
- ✅ Protected Routes (Middleware)
|
|
114
|
+
- ✅ HttpOnly Cookies (Saleor SDK)
|
|
115
|
+
- ✅ Multi-step Registration Form
|
|
116
|
+
|
|
117
|
+
### 2. E-commerce Features
|
|
118
|
+
- ✅ Product Catalog with Category/Collection Filtering
|
|
119
|
+
- ✅ Product Detail with Variants
|
|
120
|
+
- ✅ Wishlist
|
|
121
|
+
- ✅ Shopping Cart (in development)
|
|
122
|
+
- ✅ Pricing & Inventory Management
|
|
123
|
+
|
|
124
|
+
### 3. Gift Registry
|
|
125
|
+
- ✅ Create Gift List
|
|
126
|
+
- ✅ Add/Remove Products
|
|
127
|
+
- ✅ Public Gift List URL
|
|
128
|
+
- ✅ Share Gift List
|
|
129
|
+
- ✅ Track Gift Purchases
|
|
130
|
+
|
|
131
|
+
### 4. User Profile
|
|
132
|
+
- ✅ Profile Management
|
|
133
|
+
- ✅ My Requests
|
|
134
|
+
- ✅ Gift List Management
|
|
135
|
+
- ✅ Wishlist Management
|
|
136
|
+
- ✅ Profile Image Upload
|
|
137
|
+
|
|
138
|
+
### 5. Additional Features
|
|
139
|
+
- ✅ News/Blog System (with Editor.js)
|
|
140
|
+
- ✅ Store Locator (Leaflet Maps)
|
|
141
|
+
- ✅ Newsletter Subscription
|
|
142
|
+
- ✅ Contact Form
|
|
143
|
+
- ✅ Care Instructions
|
|
144
|
+
- ✅ Downloads Center
|
|
145
|
+
- ✅ Multi-language Support (EN/DE)
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 🔑 Critical Information for AI
|
|
150
|
+
|
|
151
|
+
### ⚠️ DO NOT Install New Packages
|
|
152
|
+
This project uses **HeroUI** as the primary UI library. NEVER use other UI libraries (shadcn/ui, MUI, Ant Design, etc.).
|
|
153
|
+
|
|
154
|
+
### ✅ Always Use Existing Components
|
|
155
|
+
All necessary components are available in `/src/components/ui/`:
|
|
156
|
+
- Button, Input, Select, Checkbox, etc.
|
|
157
|
+
- Modal, Tabs, Carousel, etc.
|
|
158
|
+
- Form components
|
|
159
|
+
|
|
160
|
+
### 📚 Component Import Pattern
|
|
161
|
+
```typescript
|
|
162
|
+
// ✅ Correct
|
|
163
|
+
import { Button, Input } from '@/components/ui';
|
|
164
|
+
|
|
165
|
+
// ❌ Wrong - Don't install new packages
|
|
166
|
+
import { Button } from 'shadcn/ui';
|
|
167
|
+
import { TextField } from '@mui/material';
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### 🎨 Styling Pattern
|
|
171
|
+
```typescript
|
|
172
|
+
// ✅ Use Tailwind classes
|
|
173
|
+
<div className="flex flex-col gap-4 p-6">
|
|
174
|
+
|
|
175
|
+
// ✅ Use utility classes from globals.css
|
|
176
|
+
<div className="web-container">
|
|
177
|
+
<div className="dashboard-container">
|
|
178
|
+
|
|
179
|
+
// ❌ Don't use inline styles
|
|
180
|
+
<div style={{ display: 'flex' }}>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 📄 Page Implementation Rules
|
|
184
|
+
1. **Server Components** by default
|
|
185
|
+
2. **Client Components** only when state/hooks are needed (`'use client'`)
|
|
186
|
+
3. **Data Fetching** in Server Component
|
|
187
|
+
4. **Translations** with `getTranslations()` (server) or `useTranslations()` (client)
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## 🌐 Environment Variables
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# Saleor Backend
|
|
195
|
+
SALEOR_SERVER_TOKEN= # Server-side token
|
|
196
|
+
NEXT_PUBLIC_SALEOR_API_URL= # GraphQL endpoint
|
|
197
|
+
|
|
198
|
+
# App Config
|
|
199
|
+
NEXT_PUBLIC_SITE_URL= # Base URL
|
|
200
|
+
NODE_ENV= # development/production
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 📦 Important Scripts
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Development
|
|
209
|
+
pnpm dev # Start dev server with Turbopack
|
|
210
|
+
pnpm build # Build for production
|
|
211
|
+
pnpm start # Start production server
|
|
212
|
+
|
|
213
|
+
# Code Quality
|
|
214
|
+
pnpm lint # Run ESLint
|
|
215
|
+
pnpm check:types # TypeScript type checking
|
|
216
|
+
pnpm check:i18n # Validate translation keys
|
|
217
|
+
|
|
218
|
+
# Testing
|
|
219
|
+
pnpm test # Run tests (if configured)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 🗂️ Service Modules
|
|
225
|
+
|
|
226
|
+
Each service module in `/src/services/` follows a consistent structure:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
services/{module}/
|
|
230
|
+
├── api/ # executeGraphQL calls
|
|
231
|
+
├── actions/ # Server Actions (mutations)
|
|
232
|
+
├── queries/ # GraphQL query documents
|
|
233
|
+
├── helpers/ # Transformation/normalization
|
|
234
|
+
├── store/ # Zustand store (optional)
|
|
235
|
+
├── types/ # TypeScript types
|
|
236
|
+
└── index.ts # Public exports
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Available Modules:**
|
|
240
|
+
- `auth` - Authentication
|
|
241
|
+
- `product` - Products
|
|
242
|
+
- `category` - Categories
|
|
243
|
+
- `collection` - Collections
|
|
244
|
+
- `user` - User profile, wishlist, gift list
|
|
245
|
+
- `news` - News/blog
|
|
246
|
+
- `stores` - Physical stores
|
|
247
|
+
- `newsletter` - Newsletter
|
|
248
|
+
- `careInstructions` - Care guides
|
|
249
|
+
- `downloads` - Downloads
|
|
250
|
+
- `ads` - Advertisements
|
|
251
|
+
- `home` - Home page data
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## 🎨 Design System
|
|
256
|
+
|
|
257
|
+
### Colors
|
|
258
|
+
- **Primary**: Berndorf brand color
|
|
259
|
+
- **Secondary**: Secondary actions
|
|
260
|
+
- **Tertiary**: Custom tertiary palette (50-900)
|
|
261
|
+
- **Info**: Custom info palette (25-900)
|
|
262
|
+
|
|
263
|
+
### Typography
|
|
264
|
+
- **Headers**: Raleway font
|
|
265
|
+
- **Body**: Inter font
|
|
266
|
+
- **Decorative**: Water Brush font
|
|
267
|
+
|
|
268
|
+
### Spacing
|
|
269
|
+
- **Container**: `.web-container`, `.dashboard-container`
|
|
270
|
+
- **Gaps**: `gap-4`, `gap-6`, `gap-8`
|
|
271
|
+
- **Padding**: `p-4`, `p-6`, `px-6 py-4`
|
|
272
|
+
|
|
273
|
+
### Breakpoints
|
|
274
|
+
```css
|
|
275
|
+
/* Custom breakpoints */
|
|
276
|
+
max-2xl: 1440px
|
|
277
|
+
max-xl: 1280px
|
|
278
|
+
max-lg: 1024px
|
|
279
|
+
max-md: 768px
|
|
280
|
+
max-sm: 640px
|
|
281
|
+
max-xs: 375px
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## 🚀 Next Steps
|
|
287
|
+
|
|
288
|
+
To implement new pages:
|
|
289
|
+
1. 📖 Read `UI_COMPONENTS_GUIDE.md` for component usage
|
|
290
|
+
2. 🏗️ Read `ARCHITECTURE_PATTERNS.md` for architectural patterns
|
|
291
|
+
3. 📝 Read `IMPLEMENTATION_GUIDE.md` for step-by-step guide
|
|
292
|
+
4. 🎨 Review Figma designs
|
|
293
|
+
5. 💻 Start implementation following existing patterns
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 📞 Support
|
|
298
|
+
|
|
299
|
+
For questions or issues:
|
|
300
|
+
- Review existing code in the project
|
|
301
|
+
- Read documentation files
|
|
302
|
+
- Check HeroUI docs: https://www.heroui.com
|