This project is built with:
- Vite
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
All shadcn/ui components have been downloaded under @/components/ui.
index.html- HTML entry pointvite.config.ts- Vite configuration filetailwind.config.js- Tailwind CSS configuration filepackage.json- NPM dependencies and scriptssrc/app.tsx- Root component of the projectsrc/main.tsx- Project entry pointsrc/index.css- Existing CSS configurationsrc/pages/Index.tsx- Home page logic
- All shadcn/ui components are pre-downloaded and available at
@/components/ui
- Add global styles to
src/index.cssor create new CSS files as needed - Use Tailwind classes for styling components
- Import components from
@/components/uiin your React components - Customize the UI by modifying the Tailwind configuration
- The
@/path alias points to thesrc/directory - In your typescript code, don't re-export types that you're already importing
Install Dependencies
pnpm iAdd Dependencies
pnpm add some_new_dependency
**Start Preview**
```shell
pnpm run devTo build
pnpm run build- Repo root path for the server:
server/ - Start command:
node server/index.js - Environment variables (add in Render Dashboard or
.env):MONGODB_URI(required)JWT_SECRET(required)FRONTEND_URL(required) e.g.https://<your-vercel-app>.vercel.appPORT(Render sets automatically, default 3002 if running locally)- Optional:
PUBLIC_BASE_URL(e.g.https://<your-render-app>.onrender.com)
Uploads are saved to public/uploads. Render disk is ephemeral; acceptable for demos. For persistence in production, switch to S3/Cloudinary.
Routes exposed by the API:
/api/auth/*(auth)/api/products/*(products CRUD)/api/upload(single image upload, field name:image)/uploads/*(static file serving)
- Framework: Vite + React + TS
- Build command:
npm run build - Output directory:
dist - Environment variables (Vercel Project Settings):
VITE_API_BASE_URL=https://<your-render-app>.onrender.com/api
The app uses VITE_API_BASE_URL at runtime for all API requests and to render absolute image URLs.
vite.config.tsproxies both/apiand/uploadstohttp://localhost:3002.- Start backend locally:
npm run dev:server(usesserver/index.js). - Start frontend locally:
npm run dev:client(Vite on port 5175).
- Frontend example:
.env.exampleat repo root - Backend example:
server/.env.example
Copy them to .env and server/.env and fill values before deploying.