Hanzo Dev commited on
Commit
ddaec8b
Β·
1 Parent(s): eb916d9

Simplify Docker startup

Browse files
Files changed (4) hide show
  1. .npmrc +1 -0
  2. Dockerfile +7 -10
  3. README.bak.md +132 -0
  4. next.config.js +0 -1
.npmrc ADDED
@@ -0,0 +1 @@
 
 
1
+ legacy-peer-deps=true
Dockerfile CHANGED
@@ -2,20 +2,17 @@ FROM node:20-slim
2
 
3
  WORKDIR /app
4
 
5
- # Copy only package files first for better caching
6
- COPY package*.json ./
7
 
8
- # Install dependencies with legacy peer deps
9
  RUN npm ci --legacy-peer-deps
10
 
11
- # Copy the rest of the application
12
- COPY . .
13
-
14
- # Build the Next.js app
15
  RUN npm run build
16
 
17
- # Expose the port
18
  EXPOSE 3000
19
 
20
- # Use Node directly to avoid npm overhead
21
- CMD ["node", ".next/standalone/server.js"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Copy everything
6
+ COPY . .
7
 
8
+ # Install dependencies
9
  RUN npm ci --legacy-peer-deps
10
 
11
+ # Build the app
 
 
 
12
  RUN npm run build
13
 
14
+ # Expose port
15
  EXPOSE 3000
16
 
17
+ # Start with npm start
18
+ CMD ["npm", "start"]
README.bak.md ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ecommerce Storefront
2
+
3
+ Complete online store with cart and product management
4
+
5
+ Built with [@hanzo/ui](https://github.com/hanzoai/ui) components - a modern React component library based on Radix UI and Tailwind CSS.
6
+
7
+ ## πŸš€ Quick Start
8
+
9
+ ### Deploy to Hanzo Cloud
10
+
11
+ [![Deploy to Hanzo Cloud](https://img.shields.io/badge/Deploy%20to-Hanzo%20Cloud-purple?style=for-the-badge&logo=rocket)](https://hanzo.app/deploy?template=https://github.com/hanzoai/template-ecommerce-storefront)
12
+
13
+ **Instant deployment** - Click to deploy this template to Hanzo Cloud. If you're not signed in, we'll create a public repo for you and you can start editing immediately!
14
+
15
+ ### Edit on Hanzo
16
+
17
+ [![Edit on Hanzo](https://img.shields.io/badge/Edit%20on-Hanzo-blue?style=for-the-badge&logo=react)](https://hanzo.app/edit/github/hanzoai/template-ecommerce-storefront)
18
+
19
+ **Cloud IDE** - Click to open this template in Hanzo's cloud development environment. No local setup required!
20
+
21
+ ### Local Development
22
+
23
+ ```bash
24
+ # Clone this template
25
+ git clone https://github.com/hanzoai/template-ecommerce-storefront.git
26
+ cd ecommerce-storefront
27
+
28
+ # Install dependencies
29
+ npm install
30
+ # or
31
+ pnpm install
32
+
33
+ # Start development server
34
+ npm run dev
35
+ # or
36
+ pnpm dev
37
+
38
+ # Open http://localhost:3000
39
+ ```
40
+
41
+ ## 🚒 Deploy to Hugging Face
42
+
43
+ This template includes a built-in publish option for Hugging Face Spaces:
44
+
45
+ 1. **Login to Hugging Face** in your terminal:
46
+ ```bash
47
+ huggingface-cli login
48
+ ```
49
+
50
+ 2. **Use the built-in publish command**:
51
+ ```bash
52
+ npm run publish-hf
53
+ # or
54
+ pnpm publish-hf
55
+ ```
56
+
57
+ This will automatically:
58
+ - Create a new Space in your HF account
59
+ - Configure it for Next.js deployment
60
+ - Push all necessary files
61
+ - Your app will be live at: `https://huggingface.co/spaces/YOUR_USERNAME/ecommerce-storefront`
62
+
63
+ 3. **Or manually push** to an existing Space:
64
+ ```bash
65
+ git remote add hf https://huggingface.co/spaces/YOUR_USERNAME/ecommerce-storefront
66
+ git push hf main
67
+ ```
68
+
69
+ ## 🎨 Features
70
+
71
+ - **Product Grid**: Beautiful product showcase with filters
72
+ - **Shopping Cart**: Full cart functionality with quantity controls
73
+ - **Filters & Search**: Advanced product filtering
74
+ - **Responsive Design**: Works perfectly on all devices
75
+ - **Dark Mode**: Built-in dark mode support
76
+ - **TypeScript**: Full type safety
77
+
78
+ ## πŸ“¦ What's Included
79
+
80
+ - Next.js 14 with App Router
81
+ - React 18 with Server Components
82
+ - TypeScript configuration
83
+ - Tailwind CSS with custom theme
84
+ - ESLint and Prettier configs
85
+ - @hanzo/ui component library
86
+ - Lucide React icons
87
+ - Hugging Face deployment config
88
+
89
+ ## πŸ› οΈ Customization
90
+
91
+ ### Theme Colors
92
+
93
+ Edit `tailwind.config.js` to customize the color scheme:
94
+
95
+ ```js
96
+ theme: {
97
+ extend: {
98
+ colors: {
99
+ primary: {
100
+ DEFAULT: "hsl(var(--primary))",
101
+ foreground: "hsl(var(--primary-foreground))",
102
+ },
103
+ // Add your custom colors
104
+ }
105
+ }
106
+ }
107
+ ```
108
+
109
+ ### Components
110
+
111
+ All UI components are in `components/ui/`. They're built with:
112
+ - Radix UI primitives for accessibility
113
+ - Tailwind CSS for styling
114
+ - Full TypeScript support
115
+
116
+ ## πŸ“š Documentation
117
+
118
+ - [Hanzo Documentation](https://hanzo.app/docs)
119
+ - [@hanzo/ui Components](https://github.com/hanzoai/ui)
120
+ - [Template Gallery](https://huggingface.co/spaces/hanzo-community/gallery)
121
+
122
+ ## 🀝 Contributing
123
+
124
+ Contributions are welcome! Please feel free to submit a Pull Request.
125
+
126
+ ## πŸ“„ License
127
+
128
+ MIT License - see [LICENSE](LICENSE) file for details.
129
+
130
+ ---
131
+
132
+ Built with ❀️ by [Hanzo AI](https://hanzo.ai)
next.config.js CHANGED
@@ -1,6 +1,5 @@
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
3
- output: 'standalone',
4
  reactStrictMode: true,
5
  swcMinify: true,
6
  }
 
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
 
3
  reactStrictMode: true,
4
  swcMinify: true,
5
  }