{"id":13825224,"url":"https://github.com/ryuzee/SlideHub","last_synced_at":"2025-07-08T21:31:39.482Z","repository":{"id":2803818,"uuid":"47168038","full_name":"ryuzee/SlideHub","owner":"ryuzee","description":"SlideHub is an Open Source Slide Sharing Application for Azure / AWS","archived":false,"fork":false,"pushed_at":"2024-03-30T11:39:37.000Z","size":15573,"stargazers_count":145,"open_issues_count":26,"forks_count":29,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-17T14:56:43.489Z","etag":null,"topics":["aws","azure","deck","docker","mit-license","rails","slide","slidehub","slides","slideshare","speakerdeck","uploading-slides"],"latest_commit_sha":null,"homepage":"https://slide.meguro.ryuzee.com","language":"Ruby","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/ryuzee.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":"2015-12-01T05:36:48.000Z","updated_at":"2024-09-03T07:05:42.000Z","dependencies_parsed_at":"2024-01-10T22:18:18.458Z","dependency_job_id":null,"html_url":"https://github.com/ryuzee/SlideHub","commit_stats":{"total_commits":1209,"total_committers":9,"mean_commits":"134.33333333333334","dds":"0.12489660876757647","last_synced_commit":"669724dfc50d2df956f2a7ebc9f1997074b21ce8"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuzee%2FSlideHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuzee%2FSlideHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuzee%2FSlideHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuzee%2FSlideHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryuzee","download_url":"https://codeload.github.com/ryuzee/SlideHub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225465291,"owners_count":17478518,"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","azure","deck","docker","mit-license","rails","slide","slidehub","slides","slideshare","speakerdeck","uploading-slides"],"created_at":"2024-08-04T09:01:16.854Z","updated_at":"2025-07-08T21:31:39.469Z","avatar_url":"https://github.com/ryuzee.png","language":"Ruby","readme":"# SlideHub [![Circle CI](https://circleci.com/gh/ryuzee/SlideHub.svg?style=svg)](https://circleci.com/gh/ryuzee/SlideHub)  [![Test Coverage](https://codeclimate.com/github/ryuzee/SlideHub/badges/coverage.svg)](https://codeclimate.com/github/ryuzee/SlideHub/coverage)\n\n**This is an open source slidesharing application with Azure / AWS.**\n\nIf you like or use this project, please provide feedback to author - Star it ★\n\nThe previous version of SlideHub was made with CakePHP. And this version is a successor of the previous version and is made with Ruby on Rails 5.\n\n![Screenshot](docs/images/capture1.png)\n\nYou can see other screenshot [here](docs/images/capture2.png).\n\n## Notice\n\n* v1.7 Removing paperclip gem causes a tiny breaking change. You need to set your avatar icon again to show your avatar.\n\n## Features\n\n- Uploading slides (pptx, pdf)\n- Listing slides by category, user and so on\n- Showing slide without Flash Player\n- Showing slide vertically\n- Storing all slides in Azure Blob Storage or Amazon S3. Thus terribly scalabale\n- Searching slides\n- i18n\n- Responsive design\n- Embedded player\n- RSS\n- Statistics\n- Transcript\n- API\n- Admin Dashboard to overview statistics and edit slides\n\n## Requirements\n\nThis application depends on following technologies.\n\n* Docker (Azure Virtual Machine or Amazon EC2 is NOT required)\n* MySQL\n* AWS or Azure\n * AWS: Amazon S3 / Amazon SQS\n * Azure: Blob Storage / Blob Queue\n\n## Run the application on Azure Environment within 20 minutes\n\n**If you want to get the application running on Azure without manual efforts, See [the instruction](docs/azure.md).**\n\n## Preparing Infrastructure\n\n### AWS\n\n* Create two Amazon S3 buckets (cf. slidehub-slides, slidehub-images)\n* Set CORS policy for bucket that will store the slide decks as follows\n\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cCORSConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"\u003e\n    \u003cCORSRule\u003e\n        \u003cAllowedOrigin\u003e*\u003c/AllowedOrigin\u003e\n        \u003cAllowedMethod\u003eGET\u003c/AllowedMethod\u003e\n        \u003cAllowedMethod\u003ePUT\u003c/AllowedMethod\u003e\n        \u003cAllowedMethod\u003ePOST\u003c/AllowedMethod\u003e\n        \u003cAllowedMethod\u003eHEAD\u003c/AllowedMethod\u003e\n        \u003cAllowedHeader\u003e*\u003c/AllowedHeader\u003e\n        \u003cExposeHeader\u003eAccess-Control-Allow-Origin\u003c/ExposeHeader\u003e\n        \u003cMaxAgeSeconds\u003e3000\u003c/MaxAgeSeconds\u003e\n    \u003c/CORSRule\u003e\n\u003c/CORSConfiguration\u003e\n```\n\n* Create SQS queue (cf. slidehub-convert) and note the url.\n\n### Azure\n\n* Create two Azure Blob containers (cf. slidehub-slides, slidehub-images)\n* Set CORS policy for the container that will store the slide decks as follows\n\n```\nrequire 'azure'\n\nAzure.config.storage_account_name = 'YOUR_AZURE_STORAGE_ACCOUNT_NAME'\nAzure.config.storage_access_key = 'YOUR_AZURE_STORAGE_ACCESS_KEY'\n\nblob_service = Azure::Blob::BlobService.new\nprops = Azure::Service::StorageServiceProperties.new\n\nprops.logging = nil\nprops.hour_metrics = nil\nprops.minute_metrics = nil\n\n# Create a rule\nrule = Azure::Service::CorsRule.new\nrule.allowed_headers = [\"*\"]\nrule.allowed_methods = [\"PUT\", \"GET\", \"HEAD\", \"POST\", \"OPTIONS\"]\nrule.allowed_origins = [\"*\"]\nrule.exposed_headers = [\"*\"]\nrule.max_age_in_seconds = 1800\n\nprops.cors.cors_rules = [rule]\nblob_service.set_service_properties(props)\n\nputs blob_service.get_service_properties.inspect\n```\n\n* Create Azure Blob Queue (cf. slidehub-convert) and note the name.\n\n## Prepare Database Server\n\nSlideHub can use MySQL (including Azure Database for MySQL).\nThere are several options to run a database server as follows.\n\n* Launch virtual machine and install database software by your own\n* Use Amazon Relational Database Services (RDS)\n* Use Azure Database for MySQL\n\nYou need to get these variables as follows.\n\n* Database URL\n* Database user name\n* Database password\n\nAnd then, create database for the app. (Tables can be created by Rails migration)\n\n### Retrieve Docker Image\n\n```\ndocker pull ryuzee/slidehub:latest\n```\n\n## Run Application\n\nThe easiest way to run the app is to use Kubernetes, Amazon ECS(Elastic Container Service), Azure Web Apps on Linux or Azure Container Service.\nHowever, if you want to run app by docker command, see follows.\n\n```\n$CONTAINER_ID=/usr/bin/docker run -d \\\n  --env SLIDEHUB_REGION=$SLIDEHUB_REGION \\\n  --env SLIDEHUB_SQS_URL=$SLIDEHUB_SQS_URL \\\n  --env SLIDEHUB_BUCKET_NAME=$SLIDEHUB_BUCKET_NAME \\\n  --env SLIDEHUB_IMAGE_BUCKET_NAME=$SLIDEHUB_IMAGE_BUCKET_NAME \\\n  --env SLIDEHUB_USE_S3_STATIC_HOSTING=$SLIDEHUB_USE_S3_STATIC_HOSTING \\\n  --env SLIDEHUB_AWS_SECRET_KEY=$SLIDEHUB_AWS_SECRET_KEY \\\n  --env SLIDEHUB_AWS_ACCESS_ID=$SLIDEHUB_AWS_ACCESS_ID \\\n  --env SLIDEHUB_USE_AZURE=$SLIDEHUB_USE_AZURE \\\n  --env SLIDEHUB_AZURE_CONTAINER_NAME=$SLIDEHUB_AZURE_CONTAINER_NAME \\\n  --env SLIDEHUB_AZURE_IMAGE_CONTAINER_NAME=$SLIDEHUB_AZURE_IMAGE_CONTAINER_NAME \\\n  --env SLIDEHUB_AZURE_CDN_BASE_URL=$SLIDEHUB_AZURE_CDN_BASE_URL \\\n  --env SLIDEHUB_AZURE_QUEUE_NAME=$SLIDEHUB_AZURE_QUEUE_NAME \\\n  --env SLIDEHUB_AZURE_STORAGE_ACCESS_KEY=$SLIDEHUB_AZURE_STORAGE_ACCESS_KEY \\\n  --env SLIDEHUB_AZURE_STORAGE_ACCOUNT_NAME=$SLIDEHUB_AZURE_STORAGE_ACCOUNT_NAME \\\n  --env SLIDEHUB_SECRET_KEY_BASE=$SLIDEHUB_SECRET_KEY_BASE \\\n  --env SLIDEHUB_DB_NAME=$SLIDEHUB_DB_NAME \\\n  --env SLIDEHUB_DB_USERNAME=$SLIDEHUB_DB_USERNAME \\\n  --env SLIDEHUB_DB_PASSWORD=$SLIDEHUB_DB_PASSWORD \\\n  --env SLIDEHUB_DB_URL=$SLIDEHUB_DB_URL \\\n  --env SLIDEHUB_DB_PORT=$SLIDEHUB_DB_PORT \\\n  --env SLIDEHUB_DB_ENGINE=$SLIDEHUB_DB_ENGINE \\\n  --env SLIDEHUB_DB_USE_AZURE=$SLIDEHUB_DB_USE_AZURE \\\n  --env SLIDEHUB_SMTP_SERVER=$SLIDEHUB_SMTP_SERVER \\\n  --env SLIDEHUB_SMTP_PORT=$SLIDEHUB_SMTP_PORT \\\n  --env SLIDEHUB_SMTP_USERNAME=$SLIDEHUB_SMTP_USERNAME \\\n  --env SLIDEHUB_SMTP_PASSWORD=$SLIDEHUB_SMTP_PASSWORD \\\n  --env SLIDEHUB_SMTP_AUTH_METHOD=$SLIDEHUB_SMTP_AUTH_METHOD \\\n  --env SLIDEHUB_PRODUCTION_HOST=$SLIDEHUB_PRODUCTION_HOST \\\n  --env SLIDEHUB_ROOT_URL=$SLIDEHUB_ROOT_URL \\\n  --env RAILS_LOG_TO_STDOUT=1 \\\n  --env SLIDEHUB_TIMEZONE=Asia/Tokyo \\\n-P --name slidehub ryuzee/slidehub:latest`\n```\n\nThen prepare database as follows.\n\n```\n`docker exec $CONTAINER_ID bash -l -c 'bundle exec rake db:create RAILS_ENV=production'`\n`docker exec $CONTAINER_ID bash -l -c 'bundle exec rake db:migrate RAILS_ENV=production'`\n`docker exec $CONTAINER_ID bash -l -c 'bundle exec rake db:seed RAILS_ENV=production'\n```\n\n### Environmental Variables\n\nThe easiest way is to add these lines to `docker-compose.yml` when you are testing the app in your local environment.\nIf you are trying to use the app for production, set these variables via any Docker platform.\n\n** Environment valiables must start with SLIDEHUB_ or OSS_ **\n\n#### Cloud Settings (Azure)\n\n```\nSLIDEHUB_USE_AZURE=[0|1] # If you want to use Azure, set 1\nSLIDEHUB_AZURE_CONTAINER_NAME=[Original file container name]\nSLIDEHUB_AZURE_IMAGE_CONTAINER_NAME=[Image container name]\nSLIDEHUB_AZURE_CDN_BASE_URL=[Set value if you are using CDN]\nSLIDEHUB_AZURE_QUEUE_NAME=[BLOB queue name]\nSLIDEHUB_AZURE_STORAGE_ACCESS_KEY=[Azure Storage Access Key]\nSLIDEHUB_AZURE_STORAGE_ACCOUNT_NAME=[Azure Storage Accout Name]\n```\n\n#### Cloud Settings (AWS)\n\n```\nSLIDEHUB_BUCKET_NAME=[Original file bucket name]\nSLIDEHUB_IMAGE_BUCKET_NAME=[Image bucket name]\nSLIDEHUB_USE_S3_STATIC_HOSTING=[1|0]\nSLIDEHUB_REGION=[ap-northeast-1]\nSLIDEHUB_CDN_BASE_URL=[Set value if you are using CDN]\nSLIDEHUB_SQS_URL=[SQS URL]\nSLIDEHUB_AWS_ACCESS_ID=[Your AWS Access Key if you run app out of AWS]\nSLIDEHUB_AWS_SECRET_KEY=[Your AWS Secret Key if you run app out of AWS]\n```\n\n#### General Settings\n\n```\n# Rails\nRAILS_ENV=[production|development]\nRAILS_LOG_TO_STDOUT=[1] # set the variable if you want the standard output\n\n# Mandatory\nSLIDEHUB_SECRET_KEY_BASE=[Your Secret Key Base]\n\n# Timezone\nSLIDEHUB_TIMEZONE=[Your Timezone] # Default Asia/Tokyo\n\n# Mail settings\nSLIDEHUB_SMTP_SERVER=[Your SMTP server]\nSLIDEHUB_SMTP_PORT=[587]\nSLIDEHUB_SMTP_USERNAME=[Your SMTP account]\nSLIDEHUB_SMTP_PASSWORD=[Your SMTP password]\nSLIDEHUB_SMTP_AUTH_METHOD=plain\nSLIDEHUB_FROM_EMAIL=[Email address that will be used sender]\n\nSLIDEHUB_PRODUCTION_HOST=[hoge.example.com]\nSLIDEHUB_ROOT_URL=[http://your_root_url]\nSLIDEHUB_LOGIN_REQUIRED=[1] # set the variable if you would like to force users login to view any pages\n\n# For production (closely related to rails environment)\nSLIDEHUB_DB_NAME=[DB name for Prod] # Set openslideshare if using installer\nSLIDEHUB_DB_USERNAME=[DB Username for Prod] # Set root if using installer\nSLIDEHUB_DB_PASSWORD=[DB Password for Prod] # Set passw0rd if using installer\nSLIDEHUB_DB_URL=[DB URL for Prod] # Set localhost if using installer\nSLIDEHUB_DB_ENGINE=[DB Engine] # Default 'mysql2'. You can set 'mysql2' or 'sqlserver' (NOT 'mysql')\nSLIDEHUB_DB_PORT=[DB Port] # Default 3306\nSLIDEHUB_DB_USE_AZURE=[false|true] # If you are using Azure Database for MySQL, set true\n\n# For development\nSLIDEHUB_DB_NAME_DEV=[DB name for Dev]\nSLIDEHUB_DB_USERNAME_DEV=[DB Username for Dev]\nSLIDEHUB_DB_PASSWORD_DEV=[DB Password for Dev]\nSLIDEHUB_DB_URL_DEV=[DB URL for Dev]\nSLIDEHUB_DB_ENGINE_DEV=[DB ENGINE for Dev]\nSLIDEHUB_DB_PORT_DEV=[DB PORT for Dev]\nSLIDEHUB_DB_USE_AZURE_DEV=[Use Azure Database for MySQL for Dev]\n\n# For test\nSLIDEHUB_DB_NAME_TEST=[DB name for Test]\nSLIDEHUB_DB_USERNAME_TEST=[DB Username for Test]\nSLIDEHUB_DB_PASSWORD_TEST=[DB Password for Test]\nSLIDEHUB_DB_URL_TEST=[DB URL for Test]\nSLIDEHUB_DB_ENGINE_TEST=[DB ENGINE for Test]\nSLIDEHUB_DB_PORT_TEST=[DB PORT for Test]\nSLIDEHUB_DB_USE_AZURE_TEST=[Use Azure Database for MySQL for Test]\n```\n\n## For Development mode\n\n### Requirements\n\n- Docker (\u003e= 17.06)\n- docker-compose (\u003e= 1.12.0)\n- Ruby environment including bundler\n- yarn\n\nAfter cloning the repository, you have to run `yarn` command to retrieve libraries.\n\n\n### Build images and run the app for testing\n\nYou can use docker-compose for development. Try the commands as follows.\nBefore running the command, please set several environmental variables in your computer.\nSee docker-compose.yml\n\n```\ndocker-compose build\ndocker-compose run app bash -l -c 'bundle exec rake db:create RAILS_ENV=development'\ndocker-compose run app bash -l -c 'bundle exec rake db:migrate RAILS_ENV=development'\ndocker-compose run app bash -l -c 'bundle exec rake db:seed RAILS_ENV=development'\n\ndocker-compose up -d\n```\n\n### Run tests\n\n```\ndocker-compose run app bash -l -c 'bundle exec rake db:create RAILS_ENV=test'\ndocker-compose run app bash -l -c 'bundle exec rake db:test:prepare'\ndocker-compose run app bash -l -c 'bundle exec rspec'\n```\n\nIf you want to run conversion process in the development environment, run the command as follows.\n\n```\ndocker-compose run app bash -l -c 'bin/rails runner -e development \"require \\\"./lib/slide_hub/batch\\\"; SlideHub::Batch.execute\"'\n```\n\n## Register batch procedure to cron (If you do not use Docker)\n\n* Handling uploaded slides (Mandatory)\n\n```\n*/1 * * * * /bin/bash -lc 'export PATH=\"/root/.rbenv/bin:$PATH\" ; eval \"$(rbenv init -)\"; cd /opt/application/current ; bin/rails runner -e production \"require \\\"./lib/slide_hub/batch\\\"; SlideHub::Batch.execute\"'\n```\n\n## Login to the app\n\nDefault account is `admin@example.com` and the password is `passw0rd`.\n*You need to change this account's password after the first login.*\n\n## Run rubocop or other tools on Mac OS\n\nWhen running some commands in your MacOS, you need to install some dependencies for installing gem files.\n\n```\nbrew install freetds\nbrew install imagemagick@6\nbrew link --force imagemagick@6\nbrew install pkg-config\nbrew install libmagic\nbundle\n```\n\n## Contributing\n\n1. Fork the repository on Github\n2. Create a named feature branch (like `add_component_x`)\n3. Write your change\n4. Write tests for your change (if applicable)\n5. Run the tests, ensuring they all pass\n6. Submit a Pull Request using Github\n\n## License\n\nMIT License\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryuzee%2FSlideHub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryuzee%2FSlideHub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryuzee%2FSlideHub/lists"}