{"id":26546466,"url":"https://github.com/Tusflow/tusflow-api","last_synced_at":"2025-03-22T05:02:03.814Z","repository":{"id":271019338,"uuid":"911126824","full_name":"Tusflow/tusflow-api","owner":"Tusflow","description":"A serverless file upload service implementing the TUS resumable upload protocol using Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2025-03-01T09:25:52.000Z","size":69,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-12T15:52:14.432Z","etag":null,"topics":["aws-s3","betterstack","cloudflare-workers","hono","openstatus","unkey","unkey-ratelimit","upstash-redis"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Tusflow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T09:57:53.000Z","updated_at":"2025-03-12T11:40:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"9393c54e-0aeb-4877-a288-6e9ceb237300","html_url":"https://github.com/Tusflow/tusflow-api","commit_stats":null,"previous_names":["tusflow/tusflow-api"],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tusflow%2Ftusflow-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tusflow%2Ftusflow-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tusflow%2Ftusflow-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tusflow%2Ftusflow-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tusflow","download_url":"https://codeload.github.com/Tusflow/tusflow-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244907444,"owners_count":20529867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws-s3","betterstack","cloudflare-workers","hono","openstatus","unkey","unkey-ratelimit","upstash-redis"],"created_at":"2025-03-22T05:02:02.918Z","updated_at":"2025-03-22T05:02:03.808Z","avatar_url":"https://github.com/Tusflow.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\n# TusFlow API\n\nA high-performance, scalable implementation of the TUS resumable upload protocol using Cloudflare Workers. This API allows for reliable file uploads with support for resumption, chunking, and progress tracking.\n\n## Features\n\n- Full [TUS protocol](https://tus.io/) v1.0.0 implementation\n- Chunked upload support with dynamic chunk sizing\n- Upload resumption and progress tracking\n- AWS S3/R2 storage backend\n- Redis-based state management\n- Rate limiting and file validation\n- Health monitoring and metrics\n- CORS and security headers\n- Authentication middleware\n\n## Prerequisites\n\n- Node.js 16+ or Bun 1.0+\n- AWS S3 or Cloudflare R2 bucket\n- Upstash Redis instance\n- Cloudflare Workers account\n\n## Installation\n\n```bash\n# Using bun (recommended)\nbun install\n\n# Using npm\nnpm install\n```\n\n## Configuration\n\n1. Configure your `wrangler.toml` with appropriate values\n\n2. Set up your secrets using wrangler:\n\n```bash\nwrangler secret put AWS_ACCESS_KEY_ID\nwrangler secret put AWS_SECRET_ACCESS_KEY\nwrangler secret put UPSTASH_REDIS_REST_URL\nwrangler secret put UPSTASH_REDIS_REST_TOKEN\nwrangler secret put INTERNAL_API_KEY\n```\n\n4. Optional: Configure additional settings in `src/config`\n\n## Development\n\n```bash\n# Start development server\nbun run dev\n\n\n# Deploy to Cloudflare Workers\nbun run deploy\n```\n\n## API Documentation\n\n### Endpoints\n\n- `POST /files`: Initialize upload\n- `PATCH /files/{uploadId}`: Upload file chunk\n- `HEAD /files/{uploadId}`: Get upload status\n- `GET /files/{uploadId}/progress`: Get upload progress\n- `DELETE /files/{uploadId}`: Cancel upload\n- `GET /health`: Check API health\n\nFor detailed API documentation, see [API.md](./API.md)\n\n## Security\n\n- All endpoints (except /health) require authentication\n- File validation for type and size\n- Rate limiting per endpoint\n- Secure headers and CORS configuration\n- Environment-based configuration\n- Secrets management through Cloudflare Workers\n\n## Contributing\n\nContributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) for details.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [TUS Protocol](https://tus.io/)\n- [Cloudflare Workers](https://workers.cloudflare.com/)\n- [Hono](https://hono.dev/)\n- [Upstash Redis](https://upstash.com/)\n\n[![Formatted with Biome](https://img.shields.io/badge/Formatted_with-Biome-60a5fa?style=flat\u0026logo=biome)](https://biomejs.dev/)\n[![Linted with Biome](https://img.shields.io/badge/Linted_with-Biome-60a5fa?style=flat\u0026logo=biome)](https://biomejs.dev)\n[![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat\u0026logo=biome)](https://biomejs.dev)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTusflow%2Ftusflow-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTusflow%2Ftusflow-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTusflow%2Ftusflow-api/lists"}