- New Express + TypeScript backend (server/) with pg, Better Auth, local file storage - De-Supabased Postgres schema (server/db) and TS reimplementations of DB functions - Frontend data layer rewired to REST (rest-client + backend-client compat shim) - Removed all Supabase references (code, config, deps, docs) - New brand assets: gradient favicon/app icons + dark/white wordmark logos Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
85 lines
2.3 KiB
TypeScript
85 lines
2.3 KiB
TypeScript
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";
|
|
import tailwindcss from "tailwindcss";
|
|
import autoprefixer from "autoprefixer";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ mode }) => ({
|
|
server: {
|
|
host: "::",
|
|
port: 8080,
|
|
proxy: {
|
|
// Forward API + auth + stored files to the Express backend
|
|
"/api": { target: "http://localhost:8787", changeOrigin: true },
|
|
"/storage": { target: "http://localhost:8787", changeOrigin: true },
|
|
},
|
|
},
|
|
css: {
|
|
postcss: {
|
|
plugins: [tailwindcss(), autoprefixer()],
|
|
},
|
|
},
|
|
plugins: [
|
|
react(),
|
|
mode === "development" && componentTagger(),
|
|
VitePWA({
|
|
registerType: "autoUpdate",
|
|
includeAssets: ["favicon.ico", "robots.txt"],
|
|
manifest: {
|
|
name: "AppForge - Convert Websites to Apps",
|
|
short_name: "AppForge",
|
|
description: "Convert any website into a native mobile app with AppForge",
|
|
theme_color: "#6366f1",
|
|
background_color: "#0f0f23",
|
|
display: "standalone",
|
|
orientation: "portrait",
|
|
scope: "/",
|
|
start_url: "/",
|
|
icons: [
|
|
{
|
|
src: "/pwa-192x192.png",
|
|
sizes: "192x192",
|
|
type: "image/png",
|
|
},
|
|
{
|
|
src: "/pwa-512x512.png",
|
|
sizes: "512x512",
|
|
type: "image/png",
|
|
},
|
|
{
|
|
src: "/pwa-maskable-512x512.png",
|
|
sizes: "512x512",
|
|
type: "image/png",
|
|
purpose: "maskable",
|
|
},
|
|
],
|
|
},
|
|
workbox: {
|
|
globPatterns: ["**/*.{js,css,html,ico,png,svg,woff2}"],
|
|
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5 MB limit
|
|
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"),
|
|
},
|
|
},
|
|
}));
|