A simple full‑stack merch site to sell "Nerd by Day" T‑shirts. Built with a Vite + React frontend and an Express + Stripe backend.
/root
├─ frontend/ # Vite + React app
├─ backend/ # Express server with Stripe integration
├─ .gitignore # ignores node_modules, .env, etc.
└─ README.md # this file
- Node.js v18+
- npm or Yarn
- A Stripe account (for test & live API keys)
-
cd backend
-
Copy environment example and configure:
cp .env.example .env # Within .env, set: STRIPE_SECRET_KEY=sk_test_… CLIENT_URL=http://localhost:5173 STRIPE_WEBHOOK_SECRET=whsec_… # only if using webhooks
-
Install dependencies:
npm install
-
Start server:
npm run dev # or node server.js
-
cd frontend
-
Copy and configure:
cp .env.local.example .env.local # In .env.local, set: VITE_CLIENT_URL=http://localhost:3000
-
Install dependencies:
npm install
-
Start dev server:
npm run dev
Your app will run at:
- Frontend:
http://localhost:5173
- Backend:
http://localhost:3000
- Visit the homepage to browse products.
- Click Buy Now to open the Stripe Checkout page.
- Enter your shipping & payment details.
- After payment, you'll be redirected to
/success?session_id=…
to view and print your receipt.
npm run dev
– start development server
npm run dev
– start Vite dev servernpm run build
– create production build
- Frontend: Deploy the
dist
folder to Netlify, Vercel, or any static host. - Backend: Deploy to Heroku, Google Cloud Run, AWS Elastic Beanstalk, or any Node.js hosting.
- Configure environment variables (
STRIPE_SECRET_KEY
,CLIENT_URL
, etc.) in your production environment.
- Repository: https://github.com/stefanbobrowski/nerdbyday
- Author: Stefan Bobrowski (stefanbobrowski1@gmail.com)
- You can fulfill orders manually from the Stripe Dashboard until you're ready to automate with webhooks.
Enjoy selling those T‑shirts! 🎉