Added PWA functionality

Configured the app as a Progressive Web App (PWA) by installing and integrating `vite-plugin-pwa`. This includes setting up a manifest file, adding necessary meta tags to `index.html`, and copying the logo to PWA icon assets.

X-Lovable-Edit-ID: edt-3493df6c-b8ff-442d-b00a-257c1772a508
This commit is contained in:
gpt-engineer-app[bot] 2026-01-29 21:11:56 +00:00
commit e5eeff31ec
7 changed files with 4177 additions and 139 deletions

View file

@ -2,21 +2,32 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- TODO: Set the document title to the name of your application -->
<title>Lovable App</title>
<meta name="description" content="Lovable Generated Project" />
<meta name="author" content="Lovable" />
<!-- TODO: Update og:title to match your application name -->
<meta property="og:title" content="Lovable App" />
<meta property="og:description" content="Lovable Generated Project" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Ore Cart - Industrial Supplies</title>
<meta name="description" content="Premium industrial equipment, tools, and supplies for mining and construction professionals" />
<meta name="author" content="Ore Cart" />
<!-- PWA Meta Tags -->
<meta name="theme-color" content="#3f3f46" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Ore Cart" />
<!-- PWA Icons -->
<link rel="icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<!-- Open Graph -->
<meta property="og:title" content="Ore Cart - Industrial Supplies" />
<meta property="og:description" content="Premium industrial equipment, tools, and supplies for mining and construction professionals" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://lovable.dev/opengraph-image-p98pqg.png" />
<meta property="og:image" content="/pwa-icon-512.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@Lovable" />
<meta name="twitter:image" content="https://lovable.dev/opengraph-image-p98pqg.png" />
<meta name="twitter:site" content="@OreCart" />
<meta name="twitter:image" content="/pwa-icon-512.png" />
</head>
<body>

4225
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -62,6 +62,7 @@
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"vaul": "^0.9.9",
"vite-plugin-pwa": "^1.2.0",
"zod": "^3.25.76"
},
"devDependencies": {

BIN
public/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
public/pwa-icon-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
public/pwa-icon-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View file

@ -2,6 +2,7 @@ import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import path from "path";
import { componentTagger } from "lovable-tagger";
import { VitePWA } from "vite-plugin-pwa";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
@ -12,7 +13,59 @@ export default defineConfig(({ mode }) => ({
overlay: false,
},
},
plugins: [react(), mode === "development" && componentTagger()].filter(Boolean),
plugins: [
react(),
mode === "development" && componentTagger(),
VitePWA({
registerType: "autoUpdate",
includeAssets: ["favicon.ico", "apple-touch-icon.png", "pwa-icon-192.png", "pwa-icon-512.png"],
manifest: {
name: "Ore Cart - Industrial Supplies",
short_name: "Ore Cart",
description: "Premium industrial equipment and tools for mining and construction",
theme_color: "#3f3f46",
background_color: "#ffffff",
display: "standalone",
orientation: "portrait",
scope: "/",
start_url: "/",
icons: [
{
src: "/pwa-icon-192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/pwa-icon-512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "/pwa-icon-512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
workbox: {
globPatterns: ["**/*.{js,css,html,ico,png,svg,jpg,jpeg,webp}"],
runtimeCaching: [
{
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,
handler: "CacheFirst",
options: {
cacheName: "google-fonts-cache",
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365,
},
},
},
],
},
}),
].filter(Boolean),
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),