Giter Site home page Giter Site logo

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

SupeRails.com's Projects

101-icalendar icon 101-icalendar

Ruby on Rails #101 iCalendar and .ics format. Add events to calendar, Ruby on Rails #102 Email Calendar Invite

106-gem-geocoder icon 106-gem-geocoder

Ruby on Rails #106 How to use gem Geocoder, GPS coordinates, distance calculation, map markers

107-gem-mapkick icon 107-gem-mapkick

Ruby on Rails #107 How to display locations on a map with Mapbox API and gem Mapkick like AirBnB

110-live-users-count icon 110-live-users-count

Ruby on Rails #110 Realtime Online User Tracking with Actioncable, Kredis, Turbo Broadcasts

118-dark-mode icon 118-dark-mode

Ruby on Rails #118 Dark mode. Toggle inside your app or use OS default prefered color scheme

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.