A minimal full-stack payment portal using Node.js, Express, Stripe, and Vanilla JS/Tailwind.
- Frontend: Clean, responsive UI with Tailwind CSS.
- Backend: Express server with Stripe integration.
- Auth: Simple JSON-based user storage (Signup/Login).
- Payment: Stripe Checkout integration.
- Node.js installed.
- Stripe Account (for API keys).
-
Clone/Open project.
-
Backend Setup:
cd backend npm installCreate a
.envfile inbackend/with:STRIPE_SECRET_KEY=sk_test_... CLIENT_URL=http://localhost:5500/frontend PORT=3000
Start the server:
npm start
-
Frontend Setup: Serve the
frontend/folder using a static file server (e.g., Live Server in VS Code). Ensure theCLIENT_URLin.envmatches your frontend URL.
- Create a new Web Service on Render.
- Connect your repository.
- Settings:
- Root Directory:
backend - Build Command:
npm install - Start Command:
node server.js
- Root Directory:
- Environment Variables: Add
STRIPE_SECRET_KEYandCLIENT_URL(URL of your deployed frontend).
- Push your code to GitHub.
- Go to Repo Settings -> Pages.
- Deploy from the
/rootor/docsfolder depending on structure.- Note: Since GitHub Pages serves fro root, you might need to move
frontend/*to root or configure deployment source tofrontend/. - Alternatively use Netlify/Vercel: Drag and drop
frontendfolder.
- Note: Since GitHub Pages serves fro root, you might need to move
- Important: Update the API URL in frontend JS files (
http://localhost:3000) to your deployed Render backend URL.- In
signup.html,login.html,dashboard.html.
- In
The user receives a visual confirmation on the success.html page after payment.