File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules /
2+ .next /
3+ dist /
4+ build /
5+ .git /
6+ .github /
7+ .vscode /
8+ .idea /
9+ .env.local
10+ .env. * .local
11+ * .log
12+ npm-debug.log *
13+ yarn-debug.log *
14+ yarn-error.log *
15+ .DS_Store
16+ .env
Original file line number Diff line number Diff line change 1+ # imgshape UI - Vercel Deployment
2+
3+ ## Environment Variables
4+
5+ Set these in Vercel project settings:
6+
7+ ```
8+ VITE_API_BASE_URL=https://imgshape-947614788790.asia-south1.run.app
9+ ```
10+
11+ ## Deploy Steps
12+
13+ 1 . ** Connect GitHub Repository**
14+ - Go to [ vercel.com] ( https://vercel.com )
15+ - Click "Add New..." → "Project"
16+ - Select your GitHub repo: ` STiFLeR7/imgshape `
17+ - Import the project
18+
19+ 2 . ** Configure Settings**
20+ - Root Directory: ` ui `
21+ - Framework: ` Vite `
22+ - Build Command: ` npm run build `
23+ - Output Directory: ` dist `
24+
25+ 3 . ** Add Environment Variable**
26+ - In Vercel project settings → Environment Variables
27+ - Add: ` VITE_API_BASE_URL ` = ` https://imgshape-947614788790.asia-south1.run.app `
28+
29+ 4 . ** Deploy**
30+ - Click "Deploy"
31+ - Vercel will build and deploy automatically
32+
33+ ## Live URLs
34+
35+ - ** UI** : https://imgshape.vercel.app (or your custom domain)
36+ - ** API** : https://imgshape-947614788790.asia-south1.run.app
37+ - Health: ` /health `
38+ - Analyze v4: ` /v4/analyze `
39+ - Augment: ` /augment `
40+ - Report: ` /generate_report `
41+
42+ ## Local Development
43+
44+ ``` bash
45+ cd ui
46+ npm install
47+ npm run dev
48+ ```
49+
50+ Open [ http://localhost:3000 ] ( http://localhost:3000 )
51+
52+ ## Notes
53+
54+ - UI is deployed on free Vercel tier
55+ - Backend API runs on Cloud Run (also cost-efficient)
56+ - Environment variable automatically passed to build
57+ - The API base URL can be overridden at build time
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " imgshape-ui" ,
3+ "version" : 2 ,
4+ "buildCommand" : " npm run build" ,
5+ "outputDirectory" : " dist" ,
6+ "framework" : " vite" ,
7+ "nodeVersion" : " 18.x" ,
8+ "env" : {
9+ "VITE_API_BASE_URL" : {
10+ "default" : " https://imgshape-947614788790.asia-south1.run.app" ,
11+ "description" : " Backend API base URL"
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ export default defineConfig(({ mode }) => {
1111 } ,
1212 plugins : [ react ( ) ] ,
1313 define : {
14- 'process.env.API_KEY ' : JSON . stringify ( env . GEMINI_API_KEY ) ,
15- 'process.env.GEMINI_API_KEY ' : JSON . stringify ( env . GEMINI_API_KEY )
14+ 'process.env.GEMINI_API_KEY ' : JSON . stringify ( env . GEMINI_API_KEY ) ,
15+ 'process.env.VITE_API_BASE_URL ' : JSON . stringify ( env . VITE_API_BASE_URL || 'http://localhost:8000' )
1616 } ,
1717 resolve : {
1818 alias : {
You can’t perform that action at this time.
0 commit comments