GithubHelp home page GithubHelp logo

corsego / corsego Goto Github PK

View Code? Open in Web Editor NEW
55.0 13.0 22.0 1.39 MB

๐Ÿ“•โ–ถ๏ธ๐ŸŽ“ corsego.com Ruby on Rails 6: Learn 25+ gems and build a Startup MVP 2020. Online learning platform (aka Udemy clone)

Home Page: https://www.udemy.com/course/2519558/?referralCode=4721E9D437DEE1734159

License: GNU General Public License v3.0

Ruby 62.40% JavaScript 5.67% HTML 2.18% SCSS 2.39% Haml 27.34% Procfile 0.02%
e-learning platform

corsego's Introduction

Corsego - online learning platform.

Best udemy clone on the market. Set up your online school in minutes!

N|Solid

Entity-Relationship Diagram

N|Solid

Video: How to install

Corsego e-learning platform: How to run localy on ubuntu + AWS C9

Installation Requirements

  • ruby v 2.7.1 +
  • rails 6.0.3 +
  • postgresql database
  • yarn

Connected services required

  • AWS S3 - file storage ** in production **
  • Amazon SES - sending emails ** in production **
  • google analytics code ** in production **
  • google recaptcha API for signing up ** in development & production **
  • google oauth API ** in development and production **
  • github oauth API ** in development and production **
  • facebook oauth API
  • stripe API ** in development and production **

1. Installing RoR

rvm install ruby-2.7.1
rvm --default use 2.7.1
rvm uninstall 2.6.3
gem install rails -v 6.0.3
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install postgresql libpq-dev redis-server redis-tools yarn

postgresql setup

sudo su postgres
createuser --interactive
ubuntu
y 
exit

2. Installation the app

  1. Create app
git clone https://github.com/rormvp/corsego
cd corsego
bundle
yarn

sudo apt-get install graphviz
sudo apt install imagemagick
  1. IMPORTANT Set up your secret credentials, otherwise you will not be able to run the app:

Go to config folder and delete the file credentials.yml.enc

EDITOR=vim rails credentials:edit

and inside the file:

awss3:
  access_key_id: YOUR_CODE_FOR_S3_STORAGE
  secret_access_key: YOUR_CODE_FOR_S3_STORAGE
google_analytics: YOUR_CODE_FOR_GOOGLE_ANALYTICS
recaptcha:
  site_key: YOUR_CODE_FOR_RECAPTCHA
  secret_key: YOUR_CODE_FOR_RECAPTCHA
google_oauth2:
  client_id: YOUR_CODE_FOR_OAUTH
  client_secret: YOUR_CODE_FOR_OAUTH
development:
  github:
    client: YOUR_CODE_FOR_OAUTH
    secret: YOUR_CODE_FOR_OAUTH
  stripe:
    publishable: YOUR_STRIPE_PUBLISHABLE
    secret: YOUR_STRIPE_SECRET
production:
  github:
    client: YOUR_CODE_FOR_OAUTH
    secret: YOUR_CODE_FOR_OAUTH
  stripe:
    publishable: YOUR_STRIPE_PUBLISHABLE
    secret: YOUR_STRIPE_SECRET
facebook:
  client: YOUR_CODE_FOR_OAUTH
  secret: YOUR_CODE_FOR_OAUTH
smtp:
  address: email-smtp.eu-central-1.amazonaws.com
  user_name: SMTP_CREDENTIALS_USER_NAME
  password: SMTP_CREDENTIALS_PASSWORD
  • i = to make the file editable
  • :set paste = to disable autoindentation when pasting
  • Ctrl + V = to paste
  • ESC + : + w + q + Enter = save changes in the file
  1. Run the migrations
rails db:create
rails db:migrate
  1. Configure your development environment in config/environments/development.rb
  2. Start the server
rails s

For production environments

heroku create
heroku rename *your-app-name*
heroku git:remote -a *your-app-name*
git push heroku master
heroku run rake db:migrate
heroku config:set RAILS_MASTER_KEY=`cat config/master.key`

If you have troubles running the app or any questions don't hesitate to contact me at [email protected] ๐Ÿง


Manually creating an enrollment:

PublicActivity.enabled = false
Enrollment.create(user: User.find(544), course: Course.find(56), price: 0)

[email protected]

add stripe ids to all exiting products

Course.all.each do |course|
  product = Stripe::Product.create(name: course.title)
  price = Stripe::Price.create(product: product, currency: "usd", unit_amount: course.price.to_i * 100)
  course.update(stripe_product_id: product.id, stripe_price_id: price.id)
end

corsego's People

Contributors

atayl16 avatar harritone avatar yshmarov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.