{"id":16060911,"url":"https://github.com/orgoldfus/rapid-s3","last_synced_at":"2025-08-12T16:39:36.100Z","repository":{"id":99151038,"uuid":"149607692","full_name":"orgoldfus/Rapid-s3","owner":"orgoldfus","description":"s3-like Object Storage API","archived":false,"fork":false,"pushed_at":"2018-09-26T18:00:58.000Z","size":75,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T09:12:09.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orgoldfus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-09-20T12:43:16.000Z","updated_at":"2023-12-19T03:48:49.000Z","dependencies_parsed_at":"2023-06-25T22:36:44.098Z","dependency_job_id":null,"html_url":"https://github.com/orgoldfus/Rapid-s3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/orgoldfus/Rapid-s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orgoldfus%2FRapid-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orgoldfus%2FRapid-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orgoldfus%2FRapid-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orgoldfus%2FRapid-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orgoldfus","download_url":"https://codeload.github.com/orgoldfus/Rapid-s3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orgoldfus%2FRapid-s3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270099177,"owners_count":24527027,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-09T04:07:12.209Z","updated_at":"2025-08-12T16:39:36.047Z","avatar_url":"https://github.com/orgoldfus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rapid-s3\ns3-like Object Storage API (RapidAPI code challenge)\n \n ## How to use?\n 1. clone the repository\n ```\n git clone https://github.com/orgoldfus/Rapid-s3.git\n ```\n\n 2. Start a mongodb server (you can use the supplied docker-compose file:\n ```\n docker-compose up\n ```\n this will start a mongodb server and a mongo-express server to allow easy DB management.)\n\n3. Define the required environment variables:\n* `DB_HOST` - The mongodb server address. If the default docker-compose file is used to create the db, the address is: `mongodb://localhost:27017`\n* `DB_NAME` - The db name. If this env variable is not defined, the name `rapids3` is used by default.\n* `STORAGE_PATH` - The path to the storage folder. Uploaded files will be stored in this folder. The folder must be created manually before starting the server.\n\n**The easiest way to define these variables is by adding them to a `.env` file.**\n\n4. Install the required dependencies by running `yarn`\n\n5. start the server:\n```\nyarn start\n```\n\n***\n\nHere are the available API endpoints:\n\n### Upload file - `POST /:userId`\nAllows a user uploading a file. Body type should be `form-data`.\n\n#### Allowed props:\n* `file` - the uploaded file \n* `accessType` - can be either `private` or `public`\n\n#### Response:\nIf the upload ended successfully, a JSON object in the following structure will be returned:\n```\n{\n    \"fileId\": \"84a8b2e3a8c46803cea5a425cf684c30\",\n    \"accessType\": \"public\"\n}\n```\n\nor, for private files:\n```\n{\n    \"fileId\": \"cbff509b837fb15a1d05475d60a76b9d\",\n    \"accessType\": \"private\",\n    \"accessToken\": \"Cz1Xj_7gF\"\n}\n```\n\n### Update file metadata - `POST /:userId/:fileIdentifier`\nAllows a user updating a previously uploaded file metadata (currently - only access type). Body type should be JSON.\nfileIdentifier is the file name (e.g: `example.txt`) if the file is `public` and file Id if the file is `private`.\nAlso, if the file current accessType is `private`, an access token should be provided as a query param (e.g: `localhost:3000/hT9Lmdx/cbff509b837fb15a1d?access_token=GkVflhqld`).\n\n#### Allowed props:\n* `accessType` - can be either `private` or `public`\n\n#### Response:\nIf the update ended successfully, a JSON object in the following structure will be returned:\n```\n{\n    \"fileId\": \"84a8b2e3a8c46803cea5a425cf684c30\",\n    \"accessType\": \"public\"\n}\n```\n\nor, for private files:\n```\n{\n    \"fileId\": \"cbff509b837fb15a1d05475d60a76b9d\",\n    \"accessType\": \"private\",\n    \"accessToken\": \"Cz1Xj_7gF\"\n}\n```\n\n### Download file - `GET /:userId/:fileIdentifier`\nAllows downloading a file / getting file metadata.\nfileIdentifier is the file name (e.g: `example.txt`) if the file is `public` and file Id if the file is `private`.\nAlso, if the file current accessType is `private`, an access token should be provided as a query param (e.g: `localhost:3000/hT9Lmdx/cbff509b837fb15a1d?access_token=GkVflhqld`).\nYou can get the file metadata instead by adding the `metadata` query param (e.g: `localhost:3000/hT9Lmdx/example.txt?metadata=true`)\n\n#### Response:\nThe requested file.\nIf the metadata flag was added, a JSON object in the following structure will be returned:\n```\n{\n    \"fileName\": \"example.txt\",\n    \"fileSize\": 28,\n    \"createdAt\": \"2018-09-26T13:59:05.394Z\",\n    \"updatedAt\": \"2018-09-26T17:17:51.479Z\",\n    \"deletedAt\": \"2018-09-26T17:26:37.861Z\"\n}\n```\n\n### Delete file - `DELETE /:userId/:fileIdentifier`\nAllows deleting a previously uploaded file.\nfileIdentifier is the file name (e.g: `example.txt`) if the file is `public` and file Id if the file is `private`.\nAlso, if the file current accessType is `private`, an access token should be provided as a query param (e.g: `localhost:3000/hT9Lmdx/cbff509b837fb15a1d?access_token=GkVflhqld`).\n\n***\n\n## Testing the API\nYou can test the API using the attached postman collection (v2.1) (can be found under the `postman` folder).\nImport the collection into postman and make sure to attach a file when testing the 'upload' endpoint.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forgoldfus%2Frapid-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forgoldfus%2Frapid-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forgoldfus%2Frapid-s3/lists"}