pnpm install- Go to supabase.com
- Click "New Project"
- Fill in project details
- Save your database password
- Wait for project to initialize (~2 minutes)
- Go to SQL Editor in Supabase Dashboard
- Copy contents of
supabase/migrations/001_initial_schema.sql - Paste and run
- Copy contents of
supabase/migrations/002_rls_policies.sql - Paste and run
- Go to Storage in Supabase Dashboard
- Click "New Bucket"
- Name:
shop-images - Public: Yes
- File size limit: 5MB
- Allowed MIME types:
image/jpeg, image/png, image/webp
- Go to Authentication > Providers
- Enable Email provider
- Disable "Confirm email" (for easier testing)
- Set Site URL to
http://localhost:3000 - Add redirect URL:
http://localhost:3000/api/auth/callback
- Go to developer.here.com
- Sign up for free account
- Create new project
- Generate REST API key
- Copy the API key
- Go to valueserp.com
- Sign up for account
- Get API key from dashboard
cp .env.example .env.localEdit .env.local:
# Get these from Supabase Dashboard > Settings > API
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
# Get from HERE.com developer portal
HERE_API_KEY=your_here_api_key_here
# Optional: Get from ValueSERP
VALUESERP_API_KEY=your_valueserp_key_here
# Local development
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NODE_ENV=developmentpnpm dev- Visit http://localhost:3000/auth/login
- Enter your email
- Check email for magic link
- Click the link to login
- In Supabase Dashboard > Table Editor > profiles
- Find your user and set
is_admin = true
- Browse Shops: Visit homepage to see map
- Submit Shop: Click "Submit Shop" and fill form
- Review Submission: Login as admin, go to
/admin - Approve Shop: Review and approve your test submission
- View Shop: See it appear on the map!
# Development
pnpm dev # Start dev server (http://localhost:3000)
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
# Supabase (if using local development)
pnpx supabase start # Start local Supabase
pnpx supabase stop # Stop local Supabase
pnpx supabase db push # Push migrations to remote
pnpx supabase db pull # Pull schema from remote
pnpx supabase db reset # Reset local database-
Install Railway CLI
npm i -g @railway/cli
-
Login to Railway
railway login
-
Create New Project
railway init
-
Add Environment Variables
railway variables set NEXT_PUBLIC_SUPABASE_URL=your_url railway variables set NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key railway variables set SUPABASE_SERVICE_ROLE_KEY=your_key railway variables set HERE_API_KEY=your_key railway variables set NEXT_PUBLIC_SITE_URL=https://your-app.railway.app
-
Deploy
railway up
The railway.toml file is already configured!
-
Install Vercel CLI
npm i -g vercel
-
Deploy
vercel
-
Add Environment Variables
- Go to Vercel Dashboard
- Project Settings > Environment Variables
- Add all variables from
.env.example
- Check that Leaflet CSS is imported in
globals.css - Verify the component is using
dynamicimport withssr: false - Check browser console for errors
- Verify HERE_API_KEY is set correctly
- Check API key has geocoding permissions
- Look for CORS errors in console
- Verify storage bucket
shop-imagesexists - Check bucket is set to public
- Verify file size is under 5MB
- Check allowed MIME types
- Verify Supabase Auth is enabled
- Check redirect URLs are configured
- Ensure Site URL matches your domain
- Check email provider is enabled
- Verify migrations ran successfully
- Check RLS policies are enabled
- Ensure user has proper permissions
- Check Supabase logs for details
- Supabase Dashboard > Table Editor
- Or use SQL Editor for queries
pnpx supabase db dump -f backup.sqlpnpx supabase db reset- Environment variables not committed to git
- RLS policies enabled on all tables
- Service role key kept secret
- File upload size limits enforced
- Rate limiting configured (production)
- CORS properly configured
- Admin routes protected
- Supabase Dashboard > Logs
- Railway Dashboard > Metrics
- Browser DevTools > Network/Console
- Supabase Dashboard > Database > Query Performance
- Check slow queries
- Monitor connection pool
Edit tailwind.config.ts and public/manifest.json
Edit CRYPTO_OPTIONS in src/app/shops/submit/page.tsx
Change TileLayer URL in src/components/Map/ShopMap.tsx
- Check GitHub Issues
- Review Documentation
- Join our community discussions
Happy coding! ☕️₿