This guide shows how to deploy the Sales Tracker app to GitHub Pages.
- GitHub repository created at
https://github.com/YOUR_USERNAME/sales-tracker - Node.js and npm installed
- Code pushed to GitHub
Replace YOUR_GITHUB_USERNAME in package.json with your actual GitHub username:
"homepage": "https://YOUR_GITHUB_USERNAME.github.io/sales-tracker"npm installThis will install gh-pages which is already added to devDependencies.
Run the deploy command:
npm run deployThis will:
- Build the app (
npm run build) - Deploy the
distfolder to thegh-pagesbranch - Push to GitHub
- Go to your repository on GitHub
- Click Settings → Pages
- Under Source, select:
- Branch:
gh-pages - Folder:
/ (root)
- Branch:
- Click Save
After a few minutes, your app will be live at:
https://YOUR_GITHUB_USERNAME.github.io/sales-tracker
Recommendations:
- Use a separate API key for production with rate limits
- Set up allowed origins in Alchemy dashboard to restrict to your GitHub Pages domain
- Consider using a backend proxy for API calls in production
For better security, you can:
- Create a simple backend (Vercel/Netlify Functions)
- Store API keys server-side
- Have the frontend call your backend, which then calls Alchemy
The app uses localStorage for:
- API configuration
- Wallet labels
- Analysis history
This data stays in the user's browser and is not shared.
To update your deployed app:
npm run deployThis rebuilds and redeploys automatically.
To use a custom domain:
-
Add a
CNAMEfile to thepublicfolder with your domain:yourdomain.com -
Configure DNS:
- Add a CNAME record pointing to
YOUR_USERNAME.github.io
- Add a CNAME record pointing to
-
In GitHub Settings → Pages, enter your custom domain
- Check browser console for errors
- Verify
base: '/sales-tracker/'invite.config.tsmatches your repo name - Ensure
homepageinpackage.jsonis correct
- Make sure GitHub Pages is enabled and using
gh-pagesbranch - Wait a few minutes for deployment to complete
- Clear browser cache
- Check Alchemy API key is configured in the app
- Verify API key has correct permissions
- Check browser console for CORS errors
If GitHub Pages doesn't meet your needs:
npm install -g vercel
vercelnpm install -g netlify-cli
netlify deploy --prod- Connect GitHub repo in Cloudflare dashboard
- Build command:
npm run build - Output directory:
dist
These platforms support:
- Environment variables (secure API keys)
- Serverless functions (API proxy)
- Custom domains
- Automatic deployments on git push
- Never commit API keys to git
- Use environment variables for sensitive data
- Implement rate limiting on API calls
- Add domain restrictions in Alchemy dashboard
- Consider a backend proxy for API calls
- Use HTTPS (GitHub Pages provides this automatically)
npm run dev- Uses
http://localhost:5173 - API keys from localStorage
- Hot reload enabled
npm run deploy- Uses
https://YOUR_USERNAME.github.io/sales-tracker - API keys from localStorage (user must configure)
- Optimized build
After deployment, monitor:
- Alchemy API usage in dashboard
- Browser console for errors
- GitHub Pages build status
For issues:
- Check browser console
- Verify API configuration
- Test on localhost first
- Check GitHub Actions logs (if using workflows)