{"id":20794579,"url":"https://github.com/silexlabs/cloudexplorer2","last_synced_at":"2025-08-08T04:14:42.776Z","repository":{"id":50704780,"uuid":"62834473","full_name":"silexlabs/CloudExplorer2","owner":"silexlabs","description":"Manage your users' cloud services from your application","archived":false,"fork":false,"pushed_at":"2023-06-19T15:25:14.000Z","size":4159,"stargazers_count":101,"open_issues_count":11,"forks_count":21,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-06T00:18:45.829Z","etag":null,"topics":["cloud","cloud-explorer","cloud-service","cloud-storage","dropbox","dropbox-chooser","dropbox-client","file-manager","file-picker","file-upload","ftp","ftp-client","github","github-client","react","reactjs","storage","unifile","webdav","webdav-client"],"latest_commit_sha":null,"homepage":"http://cloud-explorer.org/","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/silexlabs.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}},"created_at":"2016-07-07T19:55:42.000Z","updated_at":"2024-12-31T19:00:15.000Z","dependencies_parsed_at":"2024-01-13T19:25:51.437Z","dependency_job_id":"c7666cd0-70f3-4e05-bae7-0aa0478110de","html_url":"https://github.com/silexlabs/CloudExplorer2","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/silexlabs/CloudExplorer2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silexlabs%2FCloudExplorer2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silexlabs%2FCloudExplorer2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silexlabs%2FCloudExplorer2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silexlabs%2FCloudExplorer2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silexlabs","download_url":"https://codeload.github.com/silexlabs/CloudExplorer2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silexlabs%2FCloudExplorer2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269361861,"owners_count":24404436,"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-08T02:00:09.200Z","response_time":72,"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":["cloud","cloud-explorer","cloud-service","cloud-storage","dropbox","dropbox-chooser","dropbox-client","file-manager","file-picker","file-upload","ftp","ftp-client","github","github-client","react","reactjs","storage","unifile","webdav","webdav-client"],"created_at":"2024-11-17T16:15:51.725Z","updated_at":"2025-08-08T04:14:42.743Z","avatar_url":"https://github.com/silexlabs.png","language":"JavaScript","readme":"# CloudExplorer2\n\nManage your users' cloud services from your application.\n\n![screenshot from 2017-10-04 11-09-53](https://user-images.githubusercontent.com/715377/31186578-a357a146-a8f4-11e7-8650-f95d16f643b0.png)\n\nThere is [a live demo here](https://demo.cloud-explorer.org/ce/cloud-explorer/)\n\n## Install\n\n```\n$ npm install --save cloud-explorer\n```\n\n## Use\n\nHere is an example on how to use Cloud Explorer's router to expose an API used by the front end to list files, read and write - [see this file for a complete example](https://github.com/silexlabs/CloudExplorer2/blob/main/lib/index.js)\n\n```js\n// before this create an express application\n\nconst CloudExplorer = require('cloud-explorer');\n\nconst router = new Router({\n  dropbox: {\n    clientId: '8lxz0i3aeztt0im',\n    clientSecret: 'twhvu6ztqnefkh6',\n    redirectUri: `${rootUrl}/ce/dropbox/oauth_callback`,\n    state: 'abcd'\n  },\n  ftp: {redirectUri: `${rootUrl}/ce/ftp/signin`},\n});\n\napp.use('/ce', router);\n```\n\nThere is also an [example of use in Silex website builder here](https://github.com/silexlabs/Silex/blob/develop/dist/server/CloudExplorerRouter.js).\n\nAnd here is an easy way to run a local ftp for tests: `npx ftp-srv ftp://0.0.0.0:2121 --root .`\n\n### Client side\n\nFor a complete example see the dist folder.\n\nOn the client side, the HTML:\n\n```html\n\u003ciframe id=\"ceIFrame\" class=\"container\" src=\"/ce/cloud-explorer/cloud-explorer.html\" /\u003e\n```\n\nAnd the Javascript:\n\n```javascript\nconst ce = document.querySelector('#ceIFrame').contentWindow.ce;\nce.showThumbnails(true);\nce.openFile(['.jpg', '.jpeg', '.png', '.gif'])\n.then(fileInfo =\u003e {\n    if(fileInfo) alert('you chose:' + fileInfo.path);\n    else alert('you canceled');\n})\n.catch(e =\u003e alert('an error occured: ' + e.message));\n```\n\nIn order to know what are the possible options, please [read the code](./src/js/App.jsx)\n\n### Server side config\n\nWhen creating CE2 router, your app can pass it options, please see the example in `lib/index.js`. This is how you are supposed to enable or disable cloud services, or features.\n\nAlso you can add custom services and image banks, for this you can use the methods of the Router class: `addService` and `addImageBank`.\n\nNotes:\n\n* if you enable only one service, CE2 will be in \"single service\" mode and the user will not be presented the list of services but directly enters the only service (if logged in).\n\n### API\n\nYou can use only CE2 API, it makes Dropbox, FTP, SFTP, Webdav protocols accessible over HTTPS\n\n| Method | Path | Params | Description | Example |\n| -- | -- | -- | -- | -- |\n| GET | `/services` |  | List all installed services (Dropbox, FTP...) | `curl 'http://localhost:6805/ce/services'` returns `[{\"isDir\":true,\"isService\":true,\"mime\":\"application/json\",\"name\":\"github\",\"isLoggedIn\":false,\"isOAuth\":true,\"displayName\":\"GitHub\",\"icon\":\"../assets/github.png\",\"description\":\"Edit files from your GitHub repository.\"},{\"isDir\":true,\"isService\":true,\"mime\":\"application/json\",\"name\":\"dropbox\",\"isLoggedIn\":false,\"isOAuth\":true,\"displayName\":\"Dropbox\",\"icon\":\"../assets/dropbox.png\",\"description\":\"Edit files from your Dropbox.\"},{\"isDir\":true,\"isService\":true,\"mime\":\"application/json\",\"name\":\"ftp\",\"isLoggedIn\":false,\"isOAuth\":false,\"displayName\":\"FTP\",\"icon\":\"../assets/ftp.png\",\"description\":\"Edit files on a web FTP server.\"},{\"isDir\":true,\"isService\":true,\"mime\":\"application/json\",\"name\":\"fs\",\"isLoggedIn\":true,\"isOAuth\":false,\"username\":\"lexoyo\",\"displayName\":\"Your Computer\",\"icon\":\"\",\"description\":\"Edit files on your local drive.\"}]` |\n| POST | `/:connector/authorize` | Connector name (dropbox, ftp, sftp, webdav...) | Get the URL to redirecto the user to for oauth flow | `` |\n| POST | `/:connector/logout` | Connector name | Logout | `` |\n| GET | `/\\/(.*)\\/ls\\/(.*)/` | Connector name, path | List folder content | `curl 'http://localhost:6805/ce/ftp/ls/' -H 'UNIFILE_FTP_HOST: localhost' -H 'UNIFILE_FTP_TOKEN: demo' -H 'UNIFILE_FTP_PORT: 2121' -H 'UNIFILE_FTP_USER: demo'` returns `[{\"size\":0,\"modified\":\"2001-03-01T12:30:00.000Z\",\"name\":\"upload\",\"isDir\":true,\"mime\":\"application/directory\"},{\"size\":0,\"modified\":\"2022-12-01T23:00:00.000Z\",\"name\":\"download\",\"isDir\":true,\"mime\":\"application/directory\"}]` |\n| GET  | `/\\/(.*)\\/get\\/(.*)/` | Connector name, path | Get the content of a file | `curl 'http://localhost:6805/ce/ftp/get/path/to/test.png' -H 'UNIFILE_FTP_HOST: localhost' -H 'UNIFILE_FTP_TOKEN: demo' -H 'UNIFILE_FTP_PORT: 2121' -H 'UNIFILE_FTP_USER: demo'\n` returns the content of test.png |\n| POST  | `/\\/(.*)\\/upload\\/(.*)/` | Connector name, path | Upload file(s) to the server | `curl 'http://localhost:6805/ce/ftp/upload/' -X POST -H 'UNIFILE_FTP_HOST: localhost' -H 'UNIFILE_FTP_PASSWORD: demo' -H 'UNIFILE_FTP_TOKEN: nothing' -H 'UNIFILE_FTP_PORT: 2121' -H 'UNIFILE_FTP_USER: demo'  -H 'Content-Type: multipart/form-data; boundary=---------------------------2814941533969992343925519265' --data-binary $'-----------------------------2814941533969992343925519265\\r\\nContent-Disposition: form-data; name=\"content\"; filename=\"croix.svg\"\\r\\nContent-Type: image/svg+xml\\r\\n\\r\\n-----------------------------2814941533969992343925519265--\\r\\n'` |\n| DELETE | `/\\/(.*)\\/rm\\//` | Connector name, files to delete | Delete file(s) | `curl 'http://localhost:6805/ce/ftp/rm/' -X DELETE -H 'Content-Type: application/json' -H 'UNIFILE_FTP_HOST: localhost' -H 'UNIFILE_FTP_PASSWORD: demo' -H 'UNIFILE_FTP_TOKEN: nothing' -H 'UNIFILE_FTP_PORT: 2121' -H 'UNIFILE_FTP_USER: demo' --data-binary '[{\"name\":\"unlink\",\"path\":\"tmp/croix.svg\"}]'` |\n| PUT  |  |  | mkdir |  |\n| GET  | `\\/(.*)\\/stat\\/(.*)/` |  |  |  |\n| TODO  |  |  |  |  |\n| TODO  |  |  |  |  |\n| TODO  |  |  |  |  |\n| TODO  |  |  |  |  |\n| TODO  |  |  |  |  |\n| TODO  |  |  |  |  |\n| TODO  |  |  |  |  |\n\n#### Cookies or headers\n\nAuthentication uses cookie session or can be set from headers. The headers starting with `UNIFILE_` are recognized and expected to be `UNIFILE_{connector}_{key}_{value}`, e.g. `curl 'http://localhost:6805/ce/ftp/ls/' -H 'UNIFILE_FTP_HOST: localhost' -H 'UNIFILE_FTP_TOKEN: demo' -H 'UNIFILE_FTP_PORT: 21' -H 'UNIFILE_FTP_USER: demo'`\n\n\nWARNING: you need to allow underscores (`_`) in headers if you are using nginx or apache servers\n\n## Dev setup\n\nTo contribute to Cloud Explorer, clone this repo and build:\n\n```\n$ git clone github:silexlabs/CloudExplorer2\n$ cd CloudExplorer2\n$ npm i\n$ npm run build\n```\n\nThis will compile the JS files from `src/` with [ReactJS](https://facebook.github.io/react/) and [Babel](https://babeljs.io/). The generated files will go in `dist/`.\n\nYou can serve `dist` on `http://localhost:6805` with\n\n```\n$ npm start\n```\n\nAnd then access the demo app on `http://localhost:6805/ce/cloud-explorer/`\n\n## Docs\n\nPlease feel free to ask in the issues, and contribute docs in the wiki.\n\nFor now, the best way to know the API is to [take a look at the `App` class which exposes all CE methods here](https://github.com/silexlabs/CloudExplorer2/blob/main/src/js/App.jsx#L106).\n\n## Env vars\n\nCE is configured with environment variables:\n\n| Name | Default | Description |\n| -- | -- | -- |\n| PORT | 6805 | |\n| SERVER_PATH | '' | Example: '/a-path' |\n| SERVER_URL | http://localhost:${port}${rootPath} | |\n| DROPBOX_APP_ID | undefined | |\n| DROBOX_APP_SECRET | undefined | |\n| DROPBOX_APP_REDIRECT | undefined | |\n| GITHUB_APP_ID | undefined | |\n| GITHUB_APP_SECRET | undefined | |\n| GITHUB_APP_REDIRECT | undefined | |\n| UNSPLASH_ACCESS_KEY | undefined | |\n| UNSPLASH_APP_NAME | undefined | |\n| UNSPLASH_OFFLINE_TEST_PATH | undefined | |\n| ENABLE_HYPERDRIVE | undefined | \"true\" or anything else |\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilexlabs%2Fcloudexplorer2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilexlabs%2Fcloudexplorer2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilexlabs%2Fcloudexplorer2/lists"}