A lightweight, reusable system for deploying and sharing HTML/CSS/JavaScript prototypes across multiple projects. Each project gets its own unified gallery deployed to Vercel with all prototypes accessible from a single URL.
-
Clone this repository:
git clone https://github.com/WayOfTheMap/prototype-gallery.git cd prototype-gallery -
In your project directory, create a configuration file:
# Create .gallery-config in your project root cat > .gallery-config << 'EOF' PROJECT_NAME="my-project-prototypes" PROJECT_TITLE="My Project Prototypes" PROJECT_DESCRIPTION="Interactive prototypes for My Project" VERCEL_PROJECT_NAME="my-project-prototypes" PROTOTYPES_DIR="./prototypes" EOF
-
Create your deployment script:
cat > deploy-prototypes.sh << 'EOF' #!/bin/bash GALLERY_REPO_PATH="$HOME/Developer/prototype-gallery" CONFIG_FILE="./.gallery-config" PROTOTYPES_DIR="./prototypes" cd "$GALLERY_REPO_PATH" ./deploy.sh --source-dir "$PROTOTYPES_DIR" --config "$CONFIG_FILE" --verbose EOF chmod +x deploy-prototypes.sh
-
Deploy your prototypes:
./deploy-prototypes.sh
prototype-gallery/
βββ deploy.sh # Generic deployment script
βββ README.md # This documentation
βββ gallery/ # Generated gallery files (temporary)
your-project/
βββ prototypes/ # Your HTML prototypes
β βββ feature-a/
β β βββ prototype-1.html
β β βββ prototype-2.html
β βββ feature-b/
β βββ prototype-3.html
βββ .gallery-config # Configuration file
βββ deploy-prototypes.sh # Deployment script
Create a .gallery-config file in your project root with these variables:
# Required settings
PROJECT_NAME="unique-project-identifier" # Used for internal references
PROJECT_TITLE="Display Name for Gallery" # Shown in gallery header
VERCEL_PROJECT_NAME="vercel-deployment-name" # Vercel project name
PROTOTYPES_DIR="./prototypes" # Path to prototypes directory
# Optional settings
PROJECT_DESCRIPTION="Description for your gallery"
CONTACT_EMAIL="your-email@example.com"
GITHUB_REPO="https://github.com/your-org/your-repo"
GALLERY_THEME="default"
SHOW_DEPLOYMENT_DATES="true"
ENABLE_SEARCH="true"Simple Project:
PROJECT_NAME="design-system-prototypes"
PROJECT_TITLE="Design System Prototypes"
VERCEL_PROJECT_NAME="design-system-prototypes"
PROTOTYPES_DIR="./prototypes"Complex Project:
PROJECT_NAME="saas-app-prototypes"
PROJECT_TITLE="SaaS Application Prototypes"
PROJECT_DESCRIPTION="Interactive prototypes for our SaaS platform redesign"
VERCEL_PROJECT_NAME="saas-app-prototypes"
PROTOTYPES_DIR="./design/prototypes"
CONTACT_EMAIL="design-team@company.com"
GITHUB_REPO="https://github.com/company/saas-app"- Scan: The system scans your prototypes directory for HTML files
- Copy: All prototypes are copied to a temporary gallery structure
- Generate: A unified index.html is generated with navigation
- Deploy: Everything is deployed as a single Vercel project
- Access: Your gallery is available at
https://your-project-name.vercel.app
After deployment, your prototypes are available at:
https://your-project-name.vercel.app/ # Gallery index
https://your-project-name.vercel.app/feature-a/prototype-1.html
https://your-project-name.vercel.app/feature-b/prototype-3.html
The system automatically organizes prototypes by directory structure:
prototypes/
βββ authentication/
β βββ login-form.html β Authentication β Login Form
β βββ signup-flow.html β Authentication β Signup Flow
βββ dashboard/
β βββ main-view.html β Dashboard β Main View
βββ onboarding/
βββ welcome.html β Onboarding β Welcome
βββ tutorial.html β Onboarding β Tutorial
- Node.js (for gallery generation)
- Vercel CLI (
npm install -g vercel) - Bash (for deployment scripts)
- Git (for repository management)
# Check if everything is installed
node --version
vercel --version
vercel whoami # Must be logged in# Install Vercel CLI globally
npm install -g vercel
# Login to Vercel
vercel login
# Test deployment (run from your project directory)
./deploy-prototypes.sh<!DOCTYPE html>
<html>
<head>
<title>Login Form Prototype</title>
<style>/* Your styles */</style>
</head>
<body>
<h1>Login Form</h1>
<!-- Your prototype content -->
<script>/* Your JavaScript */</script>
</body>
</html><!DOCTYPE html>
<html>
<head>
<title>Dashboard Prototype</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
</head>
<body>
<!-- Alpine.js interactive prototype -->
<div x-data="{ tab: 'overview' }">
<!-- Your interactive content -->
</div>
</body>
</html>- Use descriptive directory names (
authentication,dashboard,onboarding) - Use descriptive file names (
login-form.html,signup-flow.html) - Keep each prototype focused on a single feature or flow
- Use relative paths for assets within prototypes
- Include meaningful
<title>tags (used for gallery navigation) - Use semantic HTML for better accessibility
- Include meta viewport tags for mobile compatibility
- Keep external dependencies to a minimum
- Create/modify prototypes locally
- Test prototypes by opening HTML files in browser
- Run deployment script when ready to share
- Share the gallery URL with your team
You can have different configurations for different environments:
# .gallery-config.dev
PROJECT_NAME="myapp-prototypes-dev"
VERCEL_PROJECT_NAME="myapp-prototypes-dev"
# .gallery-config.prod
PROJECT_NAME="myapp-prototypes"
VERCEL_PROJECT_NAME="myapp-prototypes"
# Deploy to different environments
./deploy.sh --config .gallery-config.dev
./deploy.sh --config .gallery-config.prodCreate project-specific deployment logic:
#!/bin/bash
# custom-deploy.sh
# Pre-deployment: Build prototypes
npm run build-prototypes
# Deploy with custom config
cd "$HOME/Developer/prototype-gallery"
./deploy.sh --source-dir ./build/prototypes --config ./.gallery-config
# Post-deployment: Notify team
curl -X POST "$SLACK_WEBHOOK" -d '{"text":"Prototypes deployed!"}'Add to your GitHub Actions or similar:
- name: Deploy Prototypes
run: |
cd prototype-gallery
./deploy.sh --source-dir ../my-project/prototypes --config ../my-project/.gallery-config"Vercel CLI not found"
npm install -g vercel"Not logged in to Vercel"
vercel login"No prototypes found"
- Check that your
PROTOTYPES_DIRpath is correct - Ensure your prototypes directory contains
.htmlfiles - Verify directory structure matches expected format
"Deployment failed"
- Check Vercel project name is unique and valid
- Ensure you have permission to create projects in your Vercel account
- Try deploying with
--verboseflag for more details
Run with verbose output to see detailed information:
./deploy.sh --source-dir ./prototypes --config ./.gallery-config --verboseThis is a generic tool designed to work with any project. If you find issues or want to improve the system:
- Fork this repository
- Make your changes to the generic scripts
- Test with multiple project configurations
- Submit a pull request
- Keep all scripts project-agnostic
- Use configuration files for project-specific settings
- Maintain backward compatibility when possible
- Include clear error messages and documentation
MIT License - feel free to use this in your projects!
- Create issues in this repository for bugs or feature requests
- Check existing issues for common problems
- Review the troubleshooting section above
Happy prototyping! π¨