An authentic western-wear e-commerce application.
This project has been restructured for modern, free-tier deployment:
- Frontend: Static HTML, CSS, Vanilla JS. Deployable on Vercel or Netlify.
- Backend: Node.js & Express API. Deployable on Render.
- Database: MySQL. Requires a free external provider (like Railway, Aiven, or TiDB Cloud).
Follow these steps to deploy the application for free.
- Create a free database on Aiven or TiDB Cloud.
- Get your connection details (Host, Port, User, Password, Database Name).
- Connect to your database using a local client (like DBeaver or MySQL Workbench) and import the
bronco_db.sqlfile located in the root directory to create the tables.
- Push this entire repository to GitHub.
- Go to Render.com and create a new Web Service.
- Connect your GitHub repository.
- Render will automatically detect the settings from
render.yaml. - In the Render Dashboard, fill in the Environment Variables:
DB_HOST,DB_PORT,DB_USER,DB_PASS,DB_NAME(from Phase 1)STORE_EMAILandSTORE_EMAIL_PASSWORD(Your Gmail and App Password for sending emails)CORS_ORIGINS: Set this to your frontend domain later (e.g.,https://bronco-store.vercel.app)BASE_URL: Set this to your frontend domain as well.
- Deploy! Once live, copy the Render URL (e.g.,
https://bronco-api-xyz.onrender.com).
- Open the
config.jsfile in the root directory. - Update
window.BRONCO_API_URLto your Render backend URL:window.BRONCO_API_URL = 'https://bronco-api-xyz.onrender.com';
- Commit and push this change to GitHub.
- Go to Vercel.com and create a New Project.
- Import your GitHub repository.
- The
vercel.jsonfile will automatically configure the routing. - Deploy!
- Copy your new Vercel frontend URL.
- Go back to your Render Dashboard > Environment Variables.
- Update the
CORS_ORIGINSandBASE_URLvariables with your Vercel URL. - Restart the Render Web Service.
You're done! Your BRONCO store is now live.
If you want to run the project locally on your machine:
- Start MySQL: Use XAMPP or a local MySQL server. Import
bronco_db.sql. - Configure Backend:
cd server- Copy
.env.exampleto.envand update your DB credentials. - Run
npm install - Run
npm start(API runs on port 3001)
- Configure Frontend:
- Open
config.jsand setwindow.BRONCO_API_URL = 'http://localhost:3001';
- Open
- Run Frontend:
- Use an extension like Live Server in VS Code to open
index.html.
- Use an extension like Live Server in VS Code to open