npm install # Install dependencies
npm run dev # Start development server (http://localhost:5173)
npm run build # Build for production
npm run preview # Preview production buildThis repository includes a GitHub Actions workflow for automatic deployment!
-
Enable GitHub Pages:
- Go to Settings → Pages
- Set Source to "GitHub Actions"
-
Push to main branch:
git push origin main
-
Access your app:
- Wait 2-3 minutes for the workflow to complete
- Visit:
https://officiallygod.github.io/Recalla/
For detailed instructions and troubleshooting, see GITHUB_ACTIONS_GUIDE.md
The workflow automatically:
- ✅ Installs dependencies
- ✅ Builds your app
- ✅ Deploys to GitHub Pages
- ✅ Runs on every push to main
- ✅ Can be triggered manually from Actions tab
- Push your code to GitHub
- Go to vercel.com and sign up
- Click "New Project" and import your repository
- Vercel will auto-detect Vite - just click "Deploy"
That's it! Vercel will:
- Build your app automatically
- Provide HTTPS
- Enable PWA features
- Give you a live URL
- Sign up at netlify.com
- Click "New site from Git"
- Connect your GitHub repository
- Build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
- Click "Deploy site"
If you prefer manual deployment instead of automated GitHub Actions:
- Install the gh-pages package:
npm install --save-dev gh-pages- Add to
package.json:
{
"homepage": "https://yourusername.github.io/Recalla",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"
}
}- Update
vite.config.js:
export default defineConfig({
base: '/Recalla/',
// ... rest of config
})- Deploy:
npm run deploy- Sign up at pages.cloudflare.com
- Connect your GitHub repository
- Build settings:
- Build command:
npm run build - Build output directory:
dist - Node version: 18 or higher
- Build command:
- Deploy
Build the app:
npm run buildUpload the contents of the dist/ folder to your hosting:
- AWS S3 + CloudFront
- Firebase Hosting
- Azure Static Web Apps
- DigitalOcean App Platform
- Railway
- Render
If you add environment variables later (for API keys, etc.), create a .env file:
VITE_API_URL=your_api_url
VITE_API_KEY=your_api_key
Access in code:
const apiUrl = import.meta.env.VITE_API_URLPWA features (service worker, installation) require HTTPS in production. All hosting services listed above provide HTTPS automatically.
npm run build
npm run previewOpen http://localhost:4173 to test the production build locally.
Most hosting providers allow custom domains:
- Vercel: Project Settings → Domains → Add
- Netlify: Site Settings → Domain Management → Add custom domain
- Cloudflare: Configure in Pages settings
- Image Optimization: Use WebP format for images
- Code Splitting: Vite handles this automatically
- Lazy Loading: Use React.lazy() for route components
- Bundle Analysis: Add
rollup-plugin-visualizer
- Ensure Node.js version is 18+
- Clear cache:
rm -rf node_modules dist && npm install - Check for TypeScript errors if using TS
- Must be served over HTTPS (except localhost)
- Check service worker registration in DevTools
- Clear browser cache and reload
Add a _redirects file (Netlify) or vercel.json (Vercel):
Netlify (public/_redirects):
/* /index.html 200
Vercel (vercel.json):
{
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
}Vite automatically adds content hashes to filenames for cache busting. When you deploy a new version:
- Users will automatically get the latest version
- Service worker will update in the background
- No manual cache clearing needed
Consider adding:
- Google Analytics
- Sentry for error tracking
- Web Vitals monitoring
To update dependencies:
npm update
npm audit fixFor major version updates:
npx npm-check-updates -u
npm install