SkillAgentSearch skills...

Corsego

📕▶️🎓 corsego.com Ruby on Rails 6: Learn 25+ gems and build a Startup MVP 2020. Online learning platform (aka Udemy clone)

Install / Use

/learn @corsego/Corsego
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Corsego

Publish a course on any topic and start earning, or enroll in one and learn at your own pace with lifetime access.

Demo

Entity-Relationship Diagram

ERD

Tech Stack

  • Ruby 3.3.6
  • Rails 7.1.6
  • PostgreSQL
  • Bun 1.3.6 (JavaScript bundler and package manager)
  • Bootstrap 4.5

Prerequisites

  • Ruby 3.3.6
  • Bun (v1.3+ recommended)
  • PostgreSQL
  • ImageMagick (for image processing)
  • Graphviz (optional, for generating ERD diagrams)

macOS

brew install postgresql imagemagick graphviz
curl -fsSL https://bun.sh/install | bash

Ubuntu/Debian

sudo apt-get install postgresql libpq-dev imagemagick graphviz
curl -fsSL https://bun.sh/install | bash

Installation

1. Clone the repository

git clone https://github.com/rormvp/corsego
cd corsego

2. Install dependencies

bundle install
bun install

3. Configure credentials

Delete the existing encrypted credentials and create your own:

rm config/credentials.yml.enc
EDITOR=vim rails credentials:edit

Add the following structure (replace with your actual keys):

awss3:
  access_key_id: YOUR_CODE_FOR_S3_STORAGE
  secret_access_key: YOUR_CODE_FOR_S3_STORAGE
google_analytics: YOUR_CODE_FOR_GOOGLE_ANALYTICS
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

4. Setup database

rails db:create db:migrate

Running the App Locally

Option 1: Using bin/dev (Recommended)

This starts both the Rails server and Bun watcher with a single command:

bin/dev

The app will be available at http://localhost:3000

Option 2: Run servers separately

In one terminal, start the Rails server:

rails server

In another terminal, start the Bun watcher for JavaScript:

bun run dev

The app will be available at http://localhost:3000

Option 3: Without live asset reloading

If you don't need live reloading, you can compile assets once and run just the Rails server:

bun run build
rails server

Connected Services

Required for full functionality

  • Stripe - Payment processing (development and production)
  • OAuth providers - Google, GitHub, Facebook authentication

Production only

  • AWS S3 - File storage
  • Amazon SES - Email delivery
  • Google Analytics - Usage tracking

Running Tests

# All tests
rails test

# System tests (browser-based)
rails test:system

# Controller tests only
rails test test/controllers

Deployment (Kamal + Hetzner)

See DEPLOYMENT.md for full deployment instructions.

kamal setup    # First-time setup
kamal deploy   # Deploy latest committed code

Useful Commands

Rails console

rails c

Creating an enrollment manually

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

Backfill Stripe IDs for existing courses

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

Generate ERD diagram

bundle exec erd

TODO

  • Code linting improvements

Video Tutorial

How to install

Related Skills

View on GitHub
GitHub Stars68
CategoryEducation
Updated1mo ago
Forks21

Languages

Ruby

Security Score

100/100

Audited on Feb 27, 2026

No findings