Prerequisites
Complete Supabase Setup
Ensure your Supabase project is fully configured:
- Database schema created
- Authentication providers enabled
- Edge Functions deployed
Prepare Environment Variables
Have all required environment variables ready:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_SUPABASE_EF_ANON_KEYVITE_SUPABASE_META_URLVITE_SUPABASE_GENERATE_TAGS_URL
Build Configuration
The application uses Vite for building. The build configuration is defined in/vite.config.ts:1-8:
Build Command
tsc && vite build from /package.json:8):
- Runs TypeScript compiler to check types
- Builds optimized production assets to
dist/directory
The build output is a static site in the
dist/ directory that can be deployed to any static hosting service.Deployment Options
- Vercel
- Netlify
- Other Platforms
Deploy to Vercel
Vercel offers the best developer experience with zero-config deployments.Deploy
From your project directory:Follow the prompts:
- Set up and deploy: Yes
- Which scope: Select your account
- Link to existing project: No
- Project name: bookmarks (or your preferred name)
- Directory: **./
- Override settings: No
Add Environment Variables
Via Vercel Dashboard:Or via CLI:
- Go to your project settings
- Navigate to Settings > Environment Variables
- Add each variable:
Automatic Deployments
Connect your Git repository for automatic deployments:- Go to vercel.com/new
- Import your Git repository
- Configure project settings:
- Framework Preset: Vite
- Build Command:
npm run build - Output Directory:
dist
- Add environment variables
- Click Deploy
Every push to your main branch will trigger a new production deployment. Pull requests create preview deployments.
Post-Deployment Configuration
Update Supabase Redirect URLs
Add your production domain to Supabase:
- Go to Supabase Dashboard > Authentication > URL Configuration
- Add your production URL to Redirect URLs:
- Update Site URL to your production domain
Configure OAuth Providers
Update OAuth app redirect URIs:For each OAuth provider (Google, GitHub, etc.):
- Go to the provider’s developer console
- Add your production callback URL:
Test Production Deployment
Verify all features work in production:
Authentication
Authentication
- Test OAuth login with each provider
- Test magic link email authentication
- Verify redirect URLs work correctly
Bookmarks
Bookmarks
- Add a new bookmark
- Verify metadata is fetched correctly
- Test tag generation
- Test updating and deleting bookmarks
Performance
Performance
- Check page load times
- Verify images load properly
- Test on mobile devices
Custom Domain Setup
- Vercel
- Netlify
Performance Optimization
Enable Compression
Enable Compression
Most platforms enable gzip/brotli compression by default. Verify in network tab:
- Response headers should include
Content-Encoding: brorgzip
Configure Caching
Configure Caching
Optimize cache headers for static assets:Vercel: Create Netlify: Create
vercel.json:netlify.toml:Enable Analytics
Enable Analytics
The application includes Vercel Analytics (
@vercel/analytics in /package.json:15).To use it, import in your main app file:Monitoring and Debugging
Monitor Supabase
Use Supabase Dashboard to monitor:
- API request volume
- Database performance
- Auth events
- Edge Function logs
Troubleshooting
Build fails with type errors
Build fails with type errors
Solution:
- Run
npm run buildlocally to reproduce the error - Fix TypeScript errors in your code
- Ensure all dependencies are installed
Environment variables not working
Environment variables not working
Solution:
- Verify variables are prefixed with
VITE_ - Check that variables are set for the production environment
- Redeploy after adding variables
OAuth redirect fails
OAuth redirect fails
Solution:
- Verify production domain is added to Supabase redirect URLs
- Check OAuth app configuration includes production callback URL
- Ensure HTTPS is enabled on your custom domain
White screen after deployment
White screen after deployment
Solution:
- Check browser console for errors
- Verify all environment variables are set
- Check that assets are loading (network tab)
- Review build logs for missing files
Edge Functions not working
Edge Functions not working
Solution:
- Verify Edge Function URLs in environment variables
- Check that functions are deployed in Supabase
- Review Edge Function logs for errors
- Test function endpoints directly with curl/Postman
Continuous Deployment
Both Vercel and Netlify support automatic deployments from Git:Development Workflow
- Create a feature branch
- Make changes and commit
- Push to GitHub/GitLab
- Platform creates a preview deployment
- Review changes on preview URL
Next Steps
Monitor Performance
Set up analytics and error tracking
Custom Domain
Configure your custom domain and SSL
Optimize Assets
Configure caching and compression
Set Up CI/CD
Automate testing and deployment