{"id":26166027,"url":"https://github.com/mstgnz/self-hosted-serverless","last_synced_at":"2026-04-18T16:38:15.832Z","repository":{"id":281551202,"uuid":"945608358","full_name":"mstgnz/self-hosted-serverless","owner":"mstgnz","description":"Self Hosted Serverless","archived":false,"fork":false,"pushed_at":"2025-03-09T21:40:16.000Z","size":73,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-02T13:39:19.406Z","etag":null,"topics":["go","grpc","serverless"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mstgnz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mstgnz"}},"created_at":"2025-03-09T20:10:20.000Z","updated_at":"2025-03-18T18:35:57.000Z","dependencies_parsed_at":"2025-03-09T21:38:48.588Z","dependency_job_id":null,"html_url":"https://github.com/mstgnz/self-hosted-serverless","commit_stats":null,"previous_names":["mstgnz/self-hosted-serverless"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mstgnz/self-hosted-serverless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstgnz%2Fself-hosted-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstgnz%2Fself-hosted-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstgnz%2Fself-hosted-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstgnz%2Fself-hosted-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mstgnz","download_url":"https://codeload.github.com/mstgnz/self-hosted-serverless/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstgnz%2Fself-hosted-serverless/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31976798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T16:27:12.723Z","status":"ssl_error","status_checked_at":"2026-04-18T16:27:11.140Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","grpc","serverless"],"created_at":"2025-03-11T16:28:22.649Z","updated_at":"2026-04-18T16:38:15.786Z","avatar_url":"https://github.com/mstgnz.png","language":"Go","funding_links":["https://github.com/sponsors/mstgnz"],"categories":[],"sub_categories":[],"readme":"# Self-Hosted Serverless\n\nA lightweight, self-hostable alternative to traditional serverless solutions like AWS Lambda and Google Cloud Functions. Built with Go, this framework provides a fast, scalable, and independent serverless platform that you can run on your own infrastructure.\n\n## 🚀 Overview\n\nSelf-Hosted Serverless gives you complete control over your serverless environment with these key advantages:\n\n- **Cloud Independence**: Run on your own infrastructure without vendor lock-in\n- **Superior Performance**: Leverage Go's speed for significantly faster cold starts\n- **Complete Control**: Manage your own resource limits, timeouts, and scaling\n- **Cost Efficiency**: Reduce expenses compared to public cloud solutions\n\nFunctions can run as independent containers or processes, with a central dispatcher handling HTTP/gRPC requests. WebAssembly support enables running code written in multiple languages.\n\n## ✨ Core Features\n\n- **HTTP and gRPC Support**: Dual protocol support for maximum flexibility\n- **WebAssembly Runtime**: Run functions compiled from various languages\n- **Database Integration**: Built-in support for PostgreSQL, SQLite, and Redis\n- **Event-Driven Architecture**: Publish and subscribe to events across functions\n- **Lightweight Runtime**: Minimal resource footprint with maximum performance\n- **Simple CLI**: Easy function management and deployment\n- **Docker Ready**: Containerized deployment with included configurations\n- **Function Metrics**: Track execution times, error rates, and cold starts\n\n## 🛠️ Technical Architecture\n\n- **Independent Operation**: No external cloud dependencies\n- **High Performance**: Go's concurrency model enables efficient processing\n- **Multi-Language Support**: Write functions in Go or any WebAssembly-compatible language\n- **Scalable Design**: Process requests efficiently using goroutines and channels\n- **Simple Integration**: Easy to connect with API gateways and database systems\n- **Observability**: Built-in metrics collection for function performance monitoring\n\n## 📚 Examples\n\nCheck out the [examples directory](./examples) for detailed examples of all features:\n\n- [HTTP Functions](./examples/http)\n- [gRPC Functions](./examples/grpc)\n- [WebAssembly Functions](./examples/wasm)\n- [Database Integration](./examples/database)\n- [Event-Driven Architecture](./examples/events)\n- [Metrics and Observability](./examples/metrics)\n\n## 🌐 Installation\n\n### Requirements\n\n- Go 1.24+\n- Docker (optional for containerized deployment)\n- PostgreSQL (optional for database features)\n\n### Quick Start\n\n```sh\n# Clone the repository\ngit clone https://github.com/mstgnz/self-hosted-serverless.git\ncd self-hosted-serverless\n\n# Install dependencies\ngo mod tidy\n\n# Start the server\ngo run cmd/main.go\n```\n\n### Docker Deployment\n\n```sh\ndocker build -t self-hosted-serverless .\ndocker run -p 8080:8080 -p 9090:9090 self-hosted-serverless\n```\n\n## ⚙️ Usage Guide\n\n### Creating a Function\n\n```sh\ngo run cmd/main.go create function myFunction\n```\n\nThis creates a `functions/myFunction/main.go` file with a template function.\n\n### Executing Functions\n\n**Via HTTP API:**\n\n```sh\ncurl -X POST http://localhost:8080/run/myFunction -d '{\"key\": \"value\"}'\n```\n\n**Via gRPC:**\nUse any gRPC client to connect to port 9090 and call the `ExecuteFunction` method.\n\n### WebAssembly Functions\n\nPlace WebAssembly files in the functions directory for automatic loading:\n\n```sh\ncp my-function.wasm functions/\n```\n\n### Database Operations\n\nExecute database queries through the API:\n\n```sh\ncurl -X POST http://localhost:8080/db -d '{\"query\": \"SELECT * FROM users\", \"args\": []}'\n```\n\n### Monitoring Functions\n\n**View metrics for all functions:**\n\n```sh\ngo run cmd/main.go metrics\n```\n\n**View metrics for a specific function:**\n\n```sh\ngo run cmd/main.go metrics myFunction\n```\n\n**Via HTTP API:**\n\n```sh\n# Get metrics for all functions\ncurl http://localhost:8080/metrics\n\n# Get metrics for a specific function\ncurl http://localhost:8080/metrics/myFunction\n```\n\n## 🎯 Use Cases\n\n- **API Backends**: Create lightweight API services with minimal overhead\n- **Webhook Processing**: Handle incoming webhooks with custom logic\n- **Data Processing**: Process data streams or batch operations efficiently\n- **Machine Learning Inference**: Serve ML models with low latency\n- **Real-Time Notifications**: Build event-driven notification systems\n- **Database Operations**: Perform database operations without managing connections\n- **Performance Monitoring**: Track function performance and identify bottlenecks\n\n## 🔧 Development\n\nTo contribute to the project:\n\n```sh\ngit clone https://github.com/mstgnz/self-hosted-serverless.git\ncd self-hosted-serverless\ngit checkout -b feature-branch\n# Make your changes\ngo test ./...  # Run tests before submitting\n```\n\n## 🗺️ Roadmap\n\n- [x] WebAssembly Support\n- [x] Function metrics and observability\n- [ ] Advanced CLI with monitoring capabilities\n- [ ] Kubernetes integration for orchestrated deployment\n- [ ] Enhanced security features\n\n## 📄 License\n\nThis project is provided under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstgnz%2Fself-hosted-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmstgnz%2Fself-hosted-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstgnz%2Fself-hosted-serverless/lists"}