Prerequisites
Before you begin, make sure you have the following installed and ready:Node.js
Version 18.0 or higher
pnpm
Package manager (or npm/yarn)
Supabase Account
Free account at supabase.com
Vercel Account
Free account at vercel.com
This guide assumes you’re comfortable with the command line and have basic knowledge of Git and Node.js.
Step-by-Step Setup
Configure Environment Variables
Create a
.env.local file in the root directory with the following variables:.env.local
The
BLOB_READ_WRITE_TOKEN is automatically configured when you deploy to Vercel with Blob storage enabled. For local development, you’ll need to create a Vercel Blob store and add the token.Getting Your Supabase Credentials
- Go to supabase.com and create a new project
- Navigate to Settings → API
- Copy your Project URL (
NEXT_PUBLIC_SUPABASE_URL) - Copy your anon public key (
NEXT_PUBLIC_SUPABASE_ANON_KEY)
Setting Up Vercel Blob
- Local Development
- Production
- Install Vercel CLI:
npm i -g vercel - Run
vercel login - Create a Blob store in your Vercel dashboard
- Copy the read-write token to your
.env.local
Configure Supabase Authentication
Enable email authentication in your Supabase project:
- Go to Authentication → Providers
- Enable Email provider
- Configure email templates (optional)
- Set Site URL to your domain (e.g.,
http://localhost:3000for development) - Add redirect URLs under URL Configuration:
http://localhost:3000/gallery(development)https://yourdomain.com/gallery(production)
Run the Application
Start the development server:The application will be available at
http://localhost:3000Available Scripts
| Script | Command | Description |
|---|---|---|
| Development | pnpm dev | Start development server on port 3000 |
| Build | pnpm build | Build production bundle |
| Start | pnpm start | Start production server |
| Lint | pnpm lint | Run ESLint code checks |
Create Account and Upload Photos
Now you’re ready to use Galey Cloud!
- Navigate to
http://localhost:3000 - Click “Registrate” to create a new account
- Enter your email and password
- Verify your email (check Supabase email settings)
- Login to access your gallery
- Upload your first photo by clicking the upload button or dragging files
In development mode, Supabase may not send actual emails. You can confirm users manually in the Supabase dashboard under Authentication → Users.
Your First Photo Upload
- Via Drag & Drop
Verify Your Setup
After completing the setup, verify everything is working:- Authentication
- Photo Management
- Albums
- UI Features
- Can create new account
- Can login with email/password
- Can logout successfully
- Redirects to gallery after login
Troubleshooting
Authentication errors
Authentication errors
Problem: Cannot login or signup failsSolutions:
- Verify your
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYare correct - Check that email provider is enabled in Supabase
- Verify redirect URLs are configured in Supabase
- Check browser console for detailed error messages
Upload fails
Upload fails
Problem: Photos won’t uploadSolutions:
- Verify
BLOB_READ_WRITE_TOKENis set (for local development) - Check that Vercel Blob is properly configured
- Ensure you’re logged in (check Network tab for 401 errors)
- Verify photo file size is reasonable (< 50MB)
Database errors
Database errors
Problem: Cannot fetch photos or albumsSolutions:
- Verify all SQL scripts ran successfully
- Check that RLS policies are created
- Confirm tables exist in Supabase Table Editor
- Verify
auth.userstable has your user
Photos not displaying
Photos not displaying
Problem: Photos uploaded but not showingSolutions:
- Check browser console for CORS errors
- Verify blob URLs are accessible (try opening in new tab)
- Check that
photostable has entries with validblob_url - Verify user_id matches your authenticated user
Next Steps
Congratulations! You now have a working Galey Cloud instance.Environment Variables
Learn about environment variables configuration
Deployment
Deploy to production on Vercel
API Reference
Explore the API endpoints
Core Features
Learn about gallery features
Need Help?
Join our community or check the documentation for more detailed guides.
- Check the Troubleshooting section above for common questions
- Review the Introduction guide for architecture details
- Submit issues on GitHub for bugs or feature requests