{"id":18064315,"url":"https://github.com/rockyessel/w3s","last_synced_at":"2026-01-26T18:03:21.928Z","repository":{"id":252562248,"uuid":"840788405","full_name":"rockyessel/w3s","owner":"rockyessel","description":"A Node.js backend service for developers to upload files to IPFS and convert text to audio, with both functionalities powered by Web3.Storage.","archived":false,"fork":false,"pushed_at":"2024-10-27T15:25:18.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-01T15:37:59.637Z","etag":null,"topics":["api","backend","decentralized-storage","expressjs","ipfs","nodejs","text-to-speech","web3-backend","web3-storage"],"latest_commit_sha":null,"homepage":"https://w3s-z3x3.onrender.com","language":"JavaScript","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/rockyessel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-08-10T17:26:34.000Z","updated_at":"2024-11-02T22:45:38.000Z","dependencies_parsed_at":"2024-08-10T19:36:37.278Z","dependency_job_id":"4f48ac27-5eb6-4be3-bb9a-2c30506c65fc","html_url":"https://github.com/rockyessel/w3s","commit_stats":null,"previous_names":["rockyessel/w3s"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rockyessel/w3s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockyessel%2Fw3s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockyessel%2Fw3s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockyessel%2Fw3s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockyessel%2Fw3s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rockyessel","download_url":"https://codeload.github.com/rockyessel/w3s/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockyessel%2Fw3s/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28784093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"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":["api","backend","decentralized-storage","expressjs","ipfs","nodejs","text-to-speech","web3-backend","web3-storage"],"created_at":"2024-10-31T06:05:28.543Z","updated_at":"2026-01-26T18:03:21.909Z","avatar_url":"https://github.com/rockyessel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# w3s - IPFS File Upload \u0026 Text-to-Speech Service\n\n`w3s` is a server-side application that offers developers a streamlined way to upload files to IPFS via `@web3-storage`. It also provides a text-to-speech (TTS) service, converting raw text into audio and returning the content identifier (CID) for easy access and retrieval.\n\n## Table of Contents\n- [Features](#features)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Usage](#usage)\n- [API Endpoints](#api-endpoints)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n- **IPFS File Upload**: Effortlessly upload single or multiple files to IPFS with CIDs returned for easy retrieval.\n- **Text-to-Speech Conversion**: Send raw text to the server, which returns an audio file as a CID after conversion.\n- **Integrated Web3.Storage Client**: Utilizes `@web3-storage` for reliable IPFS file handling.\n\n## Installation\n\n1. **Clone the Repository**\n   ```bash\n   git clone https://github.com/rockyessel/w3s.git\n   cd w3s\n   ```\n\n2. **Install Dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Environment Setup**\n   Copy the provided `.env.example` file and fill in your Web3.Storage and AWS credentials.\n\n   ```bash\n   cp .env.example .env\n   ```\n\n## Configuration\n\nPopulate your `.env` file with the necessary configuration settings:\n\n- `AWS_ACCESS_KEY_ID` - AWS Access Key for any AWS-based services.\n- `AWS_REGION` - AWS region for accessing AWS resources.\n- `AWS_SECRET_ACCESS_KEY` - AWS Secret Key for secure access.\n- `WEB3STORAGE_EMAIL` - Registered email address with Web3.Storage.\n- `WEB3STORAGE_SPACE_DID` - Decentralized Identifier (DID) for space in Web3.Storage.\n\nThese values are essential for the Web3.Storage integration and for accessing AWS services.\n\n## Usage\n\nStart the server with:\n```bash\nnpm run dev\n```\n\nThe server will be running on `http://localhost:8000` by default (or the port specified in your `.env` file).\n\n## API Endpoints\n\n### 1. File Upload - Single File\n- **Endpoint**: `POST /api/v1/file`\n- **Description**: Upload a single file to IPFS.\n- **Request Body**: `file` - File to upload (multipart/form-data).\n- **Response**: JSON containing the CID of the uploaded file.\n\n### 2. File Upload - Multiple Files\n- **Endpoint**: `POST /api/v1/files`\n- **Description**: Upload multiple files to IPFS in a single request.\n- **Request Body**: `files[]` - Array of files (multipart/form-data).\n- **Response**: JSON array with CIDs for each uploaded file.\n\n### 3. Text-to-Speech (TTS)\n- **Endpoint**: `POST /api/v1/tts`\n- **Description**: Convert raw text into an audio file and store it on IPFS.\n- **Request Body**: `text` - Raw text to convert into audio.\n- **Response**: JSON containing the CID of the generated audio file.\n\n## Web3.Storage Client\n\nTo utilize Web3.Storage effectively, `w3s` comes with a helper function for initializing the client.\n\n```javascript\nimport { w3sClient } from '/lib/configs/w3s.js';\n\nconst client = await w3sClient();\n// Now you can use the client to upload files to IPFS\n```\n\nThe client:\n- Logs in to Web3.Storage using the configured email.\n- Sets the current space based on the DID provided.\n- Checks and ensures an active payment plan is in place. Offers free plan (5.0 GB)\n\n## Deployment Environment\n\n`w3s` is hosted and deployed on [Render.com](https://render.com), which offers flexible deployment options for scaling web applications and APIs with features like autoscaling, private networking, and zero-downtime deploys.\n\n### Key Features of the Render Deployment\n\n- **Automatic Deploys**: Automatically redeploys the app on each push to the main branch, ensuring the latest code is always live.\n- **Zero Downtime**: Render provides zero-downtime deploys, minimizing disruption during updates.\n- **Scalability**: The platform supports load-based autoscaling, enabling `w3s` to handle increased traffic seamlessly.\n- **Managed PostgreSQL and Redis**: For data storage and caching needs, Render offers integrated, managed data services with high availability and compliance standards (e.g., SOC 2, GDPR).\n\n## Example Usage\n\n```bash\ncurl -X POST \"http://localhost:8000/api/v1/file\" \\\n     -H \"Content-Type: multipart/form-data\" \\\n     -F \"file=@path/to/your-file\"\n```\n\n## Contributing\n\nFeel free to fork, contribute, or raise issues to improve the project. We welcome contributions to expand functionality and documentation.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockyessel%2Fw3s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frockyessel%2Fw3s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockyessel%2Fw3s/lists"}