Garage Multi-App Setup Guide
Project Structure
Garage/ # Root repository
├── garage-home/ # Landing page app
│ ├── src/ # Source files
│ ├── dist/ # Build output
│ ├── package.json
│ └── vite.config.js
├── app-name/ # Your new app
│ ├── src/
│ ├── dist/
│ ├── package.json
│ └── vite.config.js
└── netlify.toml # Deployment configuration
Adding a New App
-
Create New App
-
Configure Vite In your new app’s
vite.config.js
: -
Update Landing Page In
garage-home/src/App.jsx
, add your new app to theapps
array: -
Update Netlify Configuration In
netlify.toml
, add your new app to the build process: -
Commit and Deploy
The new app will be automatically deployed to garage.rudrakabir.com/app-name
Important Notes
- Each app must have a unique base path in its
vite.config.js
- The base path must match:
- The directory name
- The path in netlify.toml redirects
- The link in the landing page
- Always test the build locally before pushing:
Domain Configuration
- Main site: garage.rudrakabir.com
- Each app: garage.rudrakabir.com/app-name
Troubleshooting
If deployment fails:
- Check that the app name is consistent across all configurations
- Verify all necessary dependencies are in package.json
- Test the build locally first
- Check Netlify logs for specific error messages
Example: Adding a Calculator App
Prompt for my buddy claude
You’re helping me with my Garage multi-app setup:
- Root repo (Garage/)
- garage-home as base (garage.rudrakabir.com landing)
- Apps in separate dirs, routed as /app-name
- Current netlify.toml:
[build]
base = “garage-home”
command = """
npm run build &&
cd ../shanty-generator && npm install && npm run build &&
mkdir -p ../garage-home/dist/shanty &&
cp -r dist/* ../garage-home/dist/shanty/ """ publish = “dist” redirects from = “/shanty/” to = “/shanty/index.html” status = 200 redirects from = ”/” to = “/index.html” status = 200
Each app needs:
- vite.config with base: ‘/app-name/’
- Entry in garage-home App.jsx apps array
- Build step in netlify.toml
- Redirect rule in netlify.toml