IPFS implementation with Google Cloud Storage backend using Helia, Express.js, and Docker.
- IPFS file storage using Helia (modern IPFS implementation)
- Google Cloud Storage as persistent block storage
- REST API for file upload/download
- Docker Compose setup for easy deployment
- Memory cache with GCS fallback for optimal performance
- Kubernetes-ready for production deployment
# Clone the repository
git clone https://github.com/allenday/ipfs-gcs-example.git
cd ipfs-gcs-example
# Copy environment variables
cp .env.example .env
# Add your GCS service account key
# Edit .env with your bucket name
# Run with Docker Compose
docker compose upSee DEVELOPMENT.md for detailed development setup.
# Quick deploy to Kubernetes
kubectl create secret generic gcs-key --from-file=key.json=serviceAccountKey.json
kubectl apply -f k8s/See PRODUCTION.md for detailed production deployment guide.
curl -F "upload=@/path/to/file" -X POST http://localhost:3000/uploadcurl http://localhost:3000/download/ipfs/[hash]curl http://localhost:3000/healthThe application uses:
- Helia: Modern IPFS implementation for content addressing
- Custom GCS Blockstore: Stores IPFS blocks in Google Cloud Storage
- Express.js: Lightweight REST API server
- Docker: Containerized deployment
All uploaded files are content-addressed using IPFS and stored as blocks in your GCS bucket under the blocks/ prefix.
# Show all available commands
make help
# Start development environment
make dev
# Run full CI pipeline locally
make ci
# Build and test Docker image
make docker-build docker-test
# Get deployed environment URLs
make get-staging-url
make get-prod-url
# Run smoke tests against deployed environments
make smoke-test-staging
make smoke-test-prod
# Set up branch protection (one-time setup)
make setup-branch-protection- Development Guide - Local setup, debugging, architecture details
- Production Guide - Kubernetes deployment, scaling, monitoring
- Deployment Guide - CI/CD setup and deployment workflows
- Branch Protection Setup - Repository security and workflow
- Kubernetes Manifests - K8s configuration details
MIT
Based on original work from catcatio/ipfs-gcs