Initialize project scaffold with full web and API setup.

Add the Vite frontend, Express API server, and supporting configuration files so the app can run locally on a complete development stack.

Made-with: Cursor
This commit is contained in:
Ebenezer
2026-04-15 17:41:46 +08:00
parent c44442de6f
commit 123f82e92c
108 changed files with 20910 additions and 1 deletions

34
vite.config.ts Normal file
View File

@@ -0,0 +1,34 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import path from "path";
import { componentTagger } from "lovable-tagger";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
server: {
// 127.0.0.1 avoids IPv6/Windows localhost quirks; 5173 avoids common 8080 conflicts (Docker, other apps).
host: "127.0.0.1",
port: 5173,
strictPort: false,
hmr: {
overlay: false,
},
proxy: {
"/api": {
target: "http://127.0.0.1:3001",
changeOrigin: true,
},
"/uploads": {
target: "http://127.0.0.1:3001",
changeOrigin: true,
},
},
},
plugins: [react(), mode === "development" && componentTagger()].filter(Boolean),
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
dedupe: ["react", "react-dom", "react/jsx-runtime", "react/jsx-dev-runtime"],
},
}));