The setup.sh script automates the initial configuration for local development environments.
The setup script handles:
- Environment file creation from templates
- Configuration validation
- Interactive setup flow
- Guidance for next steps
# Make script executable (first time only)
chmod +x scripts/setup.sh
# Run the setup script
./scripts/setup.shWhen you run the script, it will set up the environment for local development:
$ ./scripts/setup.sh
🚀 Full-Stack Storage and Booking App - Setup
=============================================
💻 Setting up for local development...- Creates
.env.localfrom.env.local.template - Validates configuration
- Provides next steps for local development
The script validates these variables for local development:
- SUPABASE_URL - Your Supabase project URL
- SUPABASE_ANON_KEY - Your Supabase anonymous key
- SUPABASE_SERVICE_ROLE_KEY - Your Supabase service role key
- EMAIL_FROM_2 - Your Gmail address for notifications
- GMAIL_APP_PASSWORD - Your Gmail app password
The script checks that environment variables are:
- Present in the environment file
- Not set to template placeholder values (e.g.,
YOUR_SUPABASE_URL) - Properly configured for local development
- 🟢 Green: Success messages
- 🟡 Yellow: Warnings and important notes
- 🔴 Red: Errors and failures
- 🔵 Cyan: Next step instructions
After successful setup, the script provides:
- Exact commands to run next
- Access URLs for the application
- Useful management commands
✅ Setup complete! Environment is configured.
Next steps for local development:
1. Install dependencies: npm run install-all
2. Run app: npm run dev
Access points after running:
- Frontend: http://localhost:5180
- Backend API: http://localhost:3000If you see:
❌ .env.production.template not found!Ensure you're running the script from the project root directory and the template file exists.
If variables are not configured:
❌ Found 2 unconfigured variables in .env.production
Please update these values before building the application.Edit your environment file with actual values (not placeholder values starting with YOUR_).
If you get permission denied:
chmod +x scripts/setup.shYou can also set up the environment manually without the script:
cp .env.local.template .env.local
# Edit .env.local with your values