├── .devcontainer
├── Dockerfile
├── compose.yaml
└── devcontainer.json
├── .dockerignore
├── .env.development
├── .env.test
├── .gitattributes
├── .github
└── workflows
│ └── ci.yml
├── .gitignore
├── .node-version
├── .rubocop.yml
├── .ruby-version
├── .tool-versions
├── .yarn
└── releases
│ └── yarn-1.22.19.cjs
├── .yarnrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Capfile
├── Dockerfile
├── Gemfile
├── Gemfile.lock
├── OLDREADME.md
├── Procfile.dev
├── ProdDockerfile
├── README.md
├── Rakefile
├── app
├── assets
│ ├── builds
│ │ └── .keep
│ ├── config
│ │ └── manifest.js
│ ├── images
│ │ ├── .keep
│ │ ├── activities_local_conferences.png
│ │ ├── activities_local_hackathons.png
│ │ ├── activities_local_meetups.png
│ │ ├── activities_local_programming.png
│ │ ├── activities_local_workshops.png
│ │ ├── add.png
│ │ ├── arc_dark_gray_logo.png
│ │ ├── arc_logo_coloured.png
│ │ ├── brands_facebook.png
│ │ ├── brands_github.png
│ │ ├── brands_instagram.png
│ │ ├── brands_linkedin.png
│ │ ├── brands_telegram.png
│ │ ├── brands_twitter.png
│ │ ├── chapter.jpg
│ │ ├── conference.jpg
│ │ ├── countries.png
│ │ ├── country_kenya.png
│ │ ├── country_rwanda.png
│ │ ├── country_tanzania.png
│ │ ├── country_uganda.png
│ │ ├── developers.jpg
│ │ ├── email_arc_logo.png
│ │ ├── favicon.ico
│ │ ├── intro-landing.jpg
│ │ ├── sign_up_karate.png
│ │ ├── sponsors
│ │ │ ├── current
│ │ │ │ ├── app_signal.png
│ │ │ │ ├── finplus.png
│ │ │ │ ├── friendly_rb.jpg
│ │ │ │ ├── kca.png
│ │ │ │ ├── kopo_kopo.png
│ │ │ │ ├── microverse.png
│ │ │ │ ├── nairobits.png
│ │ │ │ ├── planet_argon.png
│ │ │ │ ├── ruby_central.png
│ │ │ │ └── solutech_official.svg
│ │ │ └── previous
│ │ │ │ ├── andela.png
│ │ │ │ ├── ihub.png
│ │ │ │ ├── kopokopo.png
│ │ │ │ ├── kwara.png
│ │ │ │ ├── shopify.webp
│ │ │ │ └── turing.png
│ │ └── workshop.jpg
│ └── stylesheets
│ │ ├── application.tailwind.css
│ │ └── mailgun_mails.css
├── channels
│ └── application_cable
│ │ ├── channel.rb
│ │ └── connection.rb
├── controllers
│ ├── application_controller.rb
│ ├── chapters_controller.rb
│ ├── concerns
│ │ └── .keep
│ ├── countries_controller.rb
│ ├── landing_controller.rb
│ ├── projects_controller.rb
│ ├── turbo_devise_controller.rb
│ └── users
│ │ └── registrations_controller.rb
├── helpers
│ ├── application_helper.rb
│ ├── chapters_helper.rb
│ ├── countries_helper.rb
│ └── projects_helper.rb
├── javascript
│ ├── application.js
│ └── controllers
│ │ ├── application.js
│ │ ├── hello_controller.js
│ │ ├── index.js
│ │ ├── removals_controller.js
│ │ └── turbo_frames_controller.js
├── jobs
│ └── application_job.rb
├── mailers
│ ├── application_mailer.rb
│ └── devise_mailer.rb
├── models
│ ├── ability.rb
│ ├── application_record.rb
│ ├── chapter.rb
│ ├── concerns
│ │ └── .keep
│ ├── country.rb
│ ├── feature_flag.rb
│ ├── motor
│ │ └── ability.rb
│ ├── project.rb
│ ├── user.rb
│ └── users_chapter.rb
└── views
│ ├── chapters
│ ├── _chapter.html.erb
│ ├── index.html.erb
│ └── show.html.erb
│ ├── countries
│ ├── _country.html.erb
│ ├── _created_country.html.erb
│ ├── index.html.erb
│ └── show.html.erb
│ ├── devise
│ ├── confirmations
│ │ └── new.html.erb
│ ├── mailer
│ │ ├── confirmation_instructions.html.erb
│ │ ├── email_changed.html.erb
│ │ ├── password_change.html.erb
│ │ ├── reset_password_instructions.html.erb
│ │ └── unlock_instructions.html.erb
│ ├── passwords
│ │ ├── edit.html.erb
│ │ └── new.html.erb
│ ├── registrations
│ │ ├── edit.html.erb
│ │ └── new.html.erb
│ ├── sessions
│ │ └── new.html.erb
│ ├── shared
│ │ ├── _error_messages.html.erb
│ │ └── _links.html.erb
│ └── unlocks
│ │ └── new.html.erb
│ ├── landing
│ ├── about.html.erb
│ ├── home
│ │ ├── _activities.html.erb
│ │ ├── _chapters.html.erb
│ │ ├── _coming_up_events.html.erb
│ │ ├── _featured_sponsors.html.erb
│ │ ├── _intro.html.erb
│ │ ├── _previous_sponsors.html.erb
│ │ ├── _projects.html.erb
│ │ └── _who_we_are.html.erb
│ ├── index.html.erb
│ └── learn.html.erb
│ ├── layouts
│ ├── _flash_messages.html.erb
│ ├── _footer.html.erb
│ ├── _navbar.html.erb
│ ├── application.html.erb
│ ├── mailer.html.erb
│ └── mailer.text.erb
│ └── projects
│ ├── _project.html.erb
│ ├── index.html.erb
│ └── show.html.erb
├── bin
├── bundle
├── dev
├── docker-entrypoint
├── rails
├── rake
└── setup
├── config.ru
├── config
├── application.rb
├── boot.rb
├── cable.yml
├── credentials.yml.enc
├── credentials
│ └── production.yml.enc
├── database.yml
├── deploy.rb
├── deploy
│ └── production.rb
├── dockerfile.yml
├── environment.rb
├── environments
│ ├── development.rb
│ ├── production.rb
│ └── test.rb
├── initializers
│ ├── assets.rb
│ ├── content_security_policy.rb
│ ├── devise.rb
│ ├── filter_parameter_logging.rb
│ ├── inflections.rb
│ ├── permissions_policy.rb
│ ├── simple_form.rb
│ └── simple_form_daisy.rb
├── locales
│ ├── devise.en.yml
│ ├── en.yml
│ └── simple_form.en.yml
├── motor.yml
├── puma.rb
├── routes.rb
├── sitemap.rb
└── storage.yml
├── db
├── migrate
│ ├── 20221118122721_devise_create_users.rb
│ ├── 20221227125811_create_countries.rb
│ ├── 20230117033124_create_chapters.rb
│ ├── 20230212202017_create_projects.rb
│ ├── 20230225213826_add_role_to_users.rb
│ ├── 20230225222048_create_users_chapters.rb
│ ├── 20230226063248_add_extra_fields_to_users.rb
│ ├── 20230305084113_install_motor_admin.rb
│ ├── 20230305235848_create_active_storage_tables.active_storage.rb
│ ├── 20230309154521_create_feature_flags.rb
│ ├── 20230313002939_rename_feature_to_name_for_feature_flags.rb
│ └── 20230531154135_add_index_to_columns.rb
├── schema.rb
└── seeds.rb
├── dev-docker-entrypoint.sh
├── docker-compose.yml
├── fly.toml
├── lib
├── assets
│ └── .keep
├── tasks
│ ├── .keep
│ └── auto_annotate_models.rake
└── templates
│ └── erb
│ └── scaffold
│ └── _form.html.erb
├── log
└── .keep
├── package.json
├── public
├── 404.html
├── 422.html
├── 500.html
├── apple-touch-icon-precomposed.png
├── apple-touch-icon.png
├── favicon.ico
├── robots.txt
└── sitemap.xml
├── storage
└── .keep
├── tailwind.config.js
├── test-docker-entrypoint.sh
├── test
├── application_system_test_case.rb
├── channels
│ └── application_cable
│ │ └── connection_test.rb
├── controllers
│ ├── .keep
│ ├── chapters_controller_test.rb
│ ├── countries_controller_test.rb
│ └── projects_controller_test.rb
├── fixtures
│ ├── chapters.yml
│ ├── countries.yml
│ ├── feature_flags.yml
│ ├── files
│ │ └── .keep
│ ├── projects.yml
│ ├── users.yml
│ └── users_chapters.yml
├── helpers
│ └── .keep
├── integration
│ └── .keep
├── mailers
│ └── .keep
├── models
│ ├── .keep
│ ├── chapter_test.rb
│ ├── country_test.rb
│ ├── feature_flag_test.rb
│ ├── project_test.rb
│ ├── user_test.rb
│ └── users_chapter_test.rb
├── system
│ ├── .keep
│ ├── chapters_test.rb
│ ├── countries_test.rb
│ └── projects_test.rb
└── test_helper.rb
├── tmp
├── .keep
├── pids
│ └── .keep
└── storage
│ └── .keep
├── vendor
└── .keep
└── yarn.lock
/.devcontainer/Dockerfile:
--------------------------------------------------------------------------------
1 | # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
2 | ARG RUBY_VERSION=3.4.1
3 | FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
4 |
--------------------------------------------------------------------------------
/.devcontainer/compose.yaml:
--------------------------------------------------------------------------------
1 | name: "arc_platform"
2 |
3 | services:
4 | rails-app:
5 | build:
6 | context: ..
7 | dockerfile: .devcontainer/Dockerfile
8 |
9 | volumes:
10 | - ../..:/workspaces:cached
11 |
12 | # Overrides default command so things don't shut down after the process ends.
13 | command: sleep infinity
14 |
15 | # Uncomment the next line to use a non-root user for all processes.
16 | # user: vscode
17 |
18 | # Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
19 | # (Adding the "ports" property to this file will not forward from a Codespace.)
20 | depends_on:
21 | - selenium
22 | - redis
23 | - postgres
24 |
25 | selenium:
26 | image: selenium/standalone-chromium
27 | restart: unless-stopped
28 |
29 | redis:
30 | image: redis:7.2
31 | restart: unless-stopped
32 | volumes:
33 | - redis-data:/data
34 |
35 | postgres:
36 | image: postgres:16.1
37 | restart: unless-stopped
38 | networks:
39 | - default
40 | volumes:
41 | - postgres-data:/var/lib/postgresql/data
42 | environment:
43 | POSTGRES_USER: postgres
44 | POSTGRES_PASSWORD: postgres
45 |
46 | volumes:
47 | redis-data:
48 | postgres-data:
49 |
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2 | // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3 | {
4 | "name": "arc_platform",
5 | "dockerComposeFile": "compose.yaml",
6 | "service": "rails-app",
7 | "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
8 |
9 | // Features to add to the dev container. More info: https://containers.dev/features.
10 | "features": {
11 | "ghcr.io/devcontainers/features/github-cli:1": {},
12 | "ghcr.io/rails/devcontainer/features/activestorage": {},
13 | "ghcr.io/devcontainers/features/node:1": {},
14 | "ghcr.io/rails/devcontainer/features/postgres-client": {}
15 | },
16 |
17 | "containerEnv": {
18 | "CAPYBARA_SERVER_PORT": "45678",
19 | "SELENIUM_HOST": "selenium",
20 | "REDIS_URL": "redis://redis:6379/1",
21 | "DB_HOST": "postgres"
22 | },
23 |
24 | // Use 'forwardPorts' to make a list of ports inside the container available locally.
25 | "forwardPorts": [3000, 5432, 6379],
26 |
27 | // Configure tool-specific properties.
28 | // "customizations": {},
29 |
30 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
31 | // "remoteUser": "root",
32 |
33 |
34 | // Use 'postCreateCommand' to run commands after the container is created.
35 | "postCreateCommand": "bin/setup"
36 | }
37 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | # See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
2 |
3 | # Ignore git directory.
4 | /.git/
5 |
6 | # Ignore bundler config.
7 | /.bundle
8 |
9 | # Ignore all default key files.
10 | /config/master.key
11 | /config/credentials/*.key
12 |
13 | # Ignore all environment files.
14 | /.env*
15 | !/.env.example
16 |
17 | # Ignore all logfiles and tempfiles.
18 | /log/*
19 | /tmp/*
20 | !/log/.keep
21 | !/tmp/.keep
22 |
23 | # Ignore pidfiles, but keep the directory.
24 | /tmp/pids/*
25 | !/tmp/pids/
26 | !/tmp/pids/.keep
27 |
28 | # Ignore storage (uploaded files in development and any SQLite databases).
29 | /storage/*
30 | !/storage/.keep
31 | /tmp/storage/*
32 | !/tmp/storage/
33 | !/tmp/storage/.keep
34 |
35 | # Ignore assets.
36 | /node_modules/
37 | /app/assets/builds/*
38 | !/app/assets/builds/.keep
39 | /public/assets
40 |
--------------------------------------------------------------------------------
/.env.development:
--------------------------------------------------------------------------------
1 | DATABASE_HOST=arc_db
2 | DATABASE_USERNAME=postgres
3 | DATABASE_PASSWORD=password
4 | DATABASE_NAME=arc_development
5 | DATABASE_PORT=5432
--------------------------------------------------------------------------------
/.env.test:
--------------------------------------------------------------------------------
1 | DATABASE_HOST=arc_db
2 | DATABASE_USERNAME=postgres
3 | DATABASE_PASSWORD=password
4 | DATABASE_NAME=arc_development
5 | DATABASE_PORT=5432
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2 |
3 | # Mark the database schema as having been generated.
4 | db/schema.rb linguist-generated
5 |
6 | # Mark any vendored files as having been vendored.
7 | vendor/* linguist-vendored
8 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: Arc Platform CI Workflow
2 | on: [push, pull_request]
3 | jobs:
4 | linters:
5 | name: RuboCop Linter
6 | runs-on: ubuntu-latest
7 | steps:
8 | - uses: actions/checkout@v4
9 | - name: Setup Ruby 3.4.1
10 | uses: ruby/setup-ruby@v1
11 | with:
12 | ruby-version: '3.4.1' # Not needed with a .ruby-version file
13 | bundler-cache: true
14 |
15 | - run: bundle exec rubocop
16 |
17 | test:
18 | name: Rails Test
19 | runs-on: ubuntu-latest
20 | services:
21 | db:
22 | image: postgres:11@sha256:85d79cba2d4942dad7c99f84ec389a5b9cc84fb07a3dcd3aff0fb06948cdc03b
23 | ports: ['5432:5432']
24 | options: >-
25 | --health-cmd pg_isready
26 | --health-interval 10s
27 | --health-timeout 5s
28 | --health-retries 5
29 |
30 | steps:
31 | - uses: actions/checkout@v4
32 | - name: Setup Ruby 3.4.1
33 | uses: ruby/setup-ruby@v1
34 | with:
35 | ruby-version: '3.4.1' # Not needed with a .ruby-version file
36 | bundler-cache: true
37 |
38 | - name: Setup Node
39 | uses: actions/setup-node@v4
40 | with:
41 | node-version: '18'
42 |
43 | - name: Find yarn cache location
44 | id: yarn-cache
45 | run: echo "::set-output name=dir::$(yarn cache dir)"
46 |
47 | - name: JS package cache
48 | uses: actions/cache@v4
49 | with:
50 | path: ${{ steps.yarn-cache.outputs.dir }}
51 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
52 | restore-keys: |
53 | ${{ runner.os }}-yarn-
54 | - name: Install packages
55 | run: |
56 | yarn install --pure-lockfile
57 |
58 | - name: Build and run tests
59 | env:
60 | DATABASE_URL: postgres://postgres:@localhost:5432/test
61 | #POSTGRES_PASSWORD: postgres
62 | RAILS_ENV: test
63 | #RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
64 | run: |
65 | sudo apt-get -yqq install libpq-dev
66 | gem install bundler
67 | bundle install --jobs 4 --retry 3
68 | bin/rails javascript:build
69 | bin/rails css:build
70 | bundle exec rails db:prepare
71 | bundle exec rails test
72 |
73 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2 | #
3 | # If you find yourself ignoring temporary files generated by your text editor
4 | # or operating system, you probably want to add a global ignore instead:
5 | # git config --global core.excludesfile '~/.gitignore_global'
6 |
7 | # Ignore bundler config.
8 | /.bundle
9 |
10 | # Ignore all logfiles and tempfiles.
11 | /log/*
12 | /tmp/*
13 | !/log/.keep
14 | !/tmp/.keep
15 |
16 | # Ignore pidfiles, but keep the directory.
17 | /tmp/pids/*
18 | !/tmp/pids/
19 | !/tmp/pids/.keep
20 |
21 | # Ignore uploaded files in development.
22 | /storage/*
23 | !/storage/.keep
24 | /tmp/storage/*
25 | !/tmp/storage/
26 | !/tmp/storage/.keep
27 |
28 | /public/assets
29 |
30 | # Ignore master key for decrypting credentials and more.
31 | /config/master.key
32 |
33 | /app/assets/builds/*
34 | !/app/assets/builds/.keep
35 |
36 | /node_modules
37 |
38 | /config/credentials/production.key
39 |
40 | coverage/
41 |
42 | # Ignore JetBrains IDE .idea directory
43 | .idea/
44 |
--------------------------------------------------------------------------------
/.node-version:
--------------------------------------------------------------------------------
1 | 18.14.0
--------------------------------------------------------------------------------
/.rubocop.yml:
--------------------------------------------------------------------------------
1 | require:
2 | - rubocop-performance
3 | - rubocop-rails
4 |
5 | AllCops:
6 | NewCops: enable
7 | SuggestExtensions:
8 | rubocop-rake: false
9 | TargetRubyVersion: 3.0.2
10 | Exclude:
11 | - bin/**/*
12 | - config/**/*
13 | - db/migrate/*
14 | - db/schema.rb
15 | - node_modules/**/*
16 | - public/**/*
17 | - tmp/**/*
18 | - vendor/**/*
19 |
20 | Style/Documentation:
21 | Enabled: false
22 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | 3.4.1
2 |
--------------------------------------------------------------------------------
/.tool-versions:
--------------------------------------------------------------------------------
1 | nodejs 20.9.0
2 | ruby 3.4.1
--------------------------------------------------------------------------------
/.yarnrc:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | yarn-path ".yarn/releases/yarn-1.22.19.cjs"
6 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | ## Code of Conduct
2 |
3 | Everyone interacting in the ARC project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the following code of conduct:
4 |
5 | * Be respectful of others.
6 | * Avoid name-calling, personal attacks, and other forms of harassment.
7 | * Be inclusive and welcoming to everyone, regardless of their background or experience.
8 | * Resolve conflict constructively.
9 | * Use clear and concise language.
10 | * Stay on topic.
11 |
12 |
13 | ### Enforcement
14 |
15 | Enforcement of this code of conduct is at the discretion of the maintainers. If a maintainer determines that someone has violated the code of conduct, they may take any action they deem appropriate, including issuing warnings, temporary bans, or permanent bans.
16 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing
2 |
3 | Thank you for your interest in contributing to the ARC project! We welcome code and non-code contributions from new and seasoned developers at any career stage, and any sector.
4 |
5 | [Hactoberfest participation guide](https://hacktoberfest.com/participation/#contributors)
6 |
7 |
8 | ### Finding Issues to Work On
9 |
10 | We label our issues to help contributors find ones that match their skills and experience level. Here are some labels you might find helpful:
11 |
12 |
13 | | Difficulty Level | Description | Label |
14 | |------------------|------------------------------------------|----------|
15 | | Easy/ Beginner/ Novice | Issues that are ideal for first-time contributors | |
16 | | Very Easy | Simple issues that can be fixed quickly | |
17 | | Average/ Normal/ Medium/ Standard/ Intermediate | Issues that require some understanding of the codebase |  |
18 | | Hard/ Expert/ Difficult | Issues that require a significant amount of time and effort |  |
19 | | Harder | Very challenging issues that require advanced knowledge | |
20 |
21 |
22 |
23 | ### Making Changes
24 |
25 | Once you have found an issue you want to work on, follow these steps to make changes:
26 |
27 | 1. Fork the repository.
28 | 2. Create a new branch for your changes.
29 | 3. Make your changes to the codebase.
30 | 4. Add unit tests for your changes.
31 | 5. Commit your changes and push them to your fork.
32 | 6. Create a pull request against the upstream repository.
33 |
34 |
35 | Once you have created a pull request, a maintainer will review your changes. If your changes are approved, they will be merged into the upstream repository.
36 |
37 | ## Hactoberfest technical contributions
38 |
39 |
40 | ## Non-code and Low-code Contribution
41 |
42 | [Low-code and non-code contributions](https://www.youtube.com/watch?v=Z7ppp_DrxyM) are an excellent way to get involved in supporting the ARC project. Here are some examples of ways you can contribute:
43 |
44 | LOW-CODE
45 |
46 | - Technical documentation
47 | - User experience testing
48 | - Technical blog post or tutorial
49 | - Case studies
50 |
51 | NON-CODE CONTRIBUTIONS:
52 |
53 | - Writing
54 | - Translating
55 | - Talks or presentations
56 | - Social media
57 | - Blog posts
58 |
59 |
60 | ### Thank You!
61 |
62 | Thank you for taking the time to contribute to the ARC platform project! Your contributions help to make the project better for everyone.
63 |
--------------------------------------------------------------------------------
/Capfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Load DSL and set up stages
4 | require 'capistrano/setup'
5 |
6 | # Include default deployment tasks
7 | require 'capistrano/deploy'
8 |
9 | # Load the SCM plugin appropriate to your project:
10 | #
11 | # require "capistrano/scm/hg"
12 | # install_plugin Capistrano::SCM::Hg
13 | # or
14 | # require "capistrano/scm/svn"
15 | # install_plugin Capistrano::SCM::Svn
16 | # or
17 | require 'capistrano/scm/git'
18 | install_plugin Capistrano::SCM::Git
19 |
20 | # Include tasks from other gems included in your Gemfile
21 | #
22 | # For documentation on these, see for example:
23 | #
24 | # https://github.com/capistrano/rvm
25 | # https://github.com/capistrano/rbenv
26 | # https://github.com/capistrano/chruby
27 | # https://github.com/capistrano/bundler
28 | # https://github.com/capistrano/rails
29 | # https://github.com/capistrano/passenger
30 | #
31 | # require "capistrano/rvm"
32 | # require "capistrano/rbenv"
33 | # require "capistrano/chruby"
34 | # require "capistrano/bundler"
35 | # require "capistrano/rails/assets"
36 | # require "capistrano/rails/migrations"
37 | require 'capistrano/passenger'
38 | require 'capistrano/rails'
39 | require 'capistrano/sidekiq'
40 | require 'capistrano/asdf'
41 |
42 | # Load custom tasks from `lib/capistrano/tasks` if you have any defined
43 | Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
44 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ruby:3.4.1-alpine
2 |
3 | ENV APP_PATH /var/app
4 | ENV BUNDLE_VERSION 2.3.1
5 | ENV BUNDLE_PATH /usr/local/bundle/gems
6 | ENV TMP_PATH /tmp/
7 | ENV RAILS_LOG_TO_STDOUT true
8 | ENV RAILS_PORT 3000
9 |
10 | # Install system dependencies
11 | RUN apt-get update && apt-get install -y \
12 | build-essential \
13 | git \
14 | postgresql-client \
15 | libxml2-dev \
16 | libxslt-dev \
17 | nodejs \
18 | npm \
19 | imagemagick \
20 | tzdata \
21 | less \
22 | && rm -rf /var/lib/apt/lists/* \
23 | && mkdir -p $APP_PATH
24 |
25 | RUN gem install bundler --version "$BUNDLE_VERSION" \
26 | && rm -rf $GEM_HOME/cache/*
27 |
28 | # navigate to app directory
29 | WORKDIR $APP_PATH
30 |
31 | EXPOSE $RAILS_PORT
32 |
33 | ENTRYPOINT [ "bundle", "exec" ]
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | source 'https://rubygems.org'
4 | git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5 |
6 | ruby '3.4.1'
7 |
8 | gem 'active_storage_validations', '~> 1.0' # Active Storage gems for validating attachments https://github.com/igorkasyanchuk/active_storage_validations
9 | gem 'aws-sdk-s3', '~> 1.119', require: false # Official AWS Ruby gem for Amazon S3
10 | gem 'bootsnap', require: false # Reduces boot times through caching; required in config/boot.rb
11 | gem 'cancancan', '~> 3.4' # Authorization library which restricts what resources a given user is allowed to access
12 | gem 'cssbundling-rails' # Bundle and process CSS [https://github.com/rails/cssbundling-rails]
13 | gem 'devise' # Devise 4.0 works with Rails 4.1 onwards.
14 | # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
15 | gem 'image_processing', '~> 1.2'
16 | gem 'jbuilder' # Build JSON APIs with ease [https://github.com/rails/jbuilder]
17 | gem 'jsbundling-rails' # Bundle and transpile JavaScript [https://github.com/rails/jsbundling-rails]
18 | gem 'mini_magick', '~> 4.12'
19 | # Motor Admin allows you to deploy a no-code admin panel for your application in less than a minute
20 | gem 'motor-admin', '~> 0.4.7'
21 | gem 'pg', '~> 1.1' # Use postgresql as the database for Active Record
22 | gem 'premailer-rails', '~> 1.12' # This gem is a drop in solution for styling HTML emails with CSS
23 | gem 'puma', '~> 5.0' # Use the Puma web server [https://github.com/puma/puma]
24 | gem 'rails', '~> 7.2.2.1' # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
25 | gem 'redis', '~> 4.0' # Use Redis adapter to run Action Cable in production
26 | # An ActionMailer adapter to send email using SendGrid's HTTPS Web API (instead of SMTP).
27 | gem 'sendgrid-actionmailer', '~> 3.2'
28 | gem 'simple_form', '~> 5.1' # Gem to pimp up forms
29 | gem 'sitemap_generator' # A dynamic sitemap generator gem for the Ruby on Rails framework
30 | gem 'sprockets-rails' # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
31 | gem 'stimulus-rails' # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
32 | gem 'turbo-rails' # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
33 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
34 | gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
35 |
36 | # gem "kredis" # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
37 | # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
38 | # gem "bcrypt", "~> 3.1.7"
39 | # gem "sassc-rails" # Use Sass to process CSS
40 |
41 | group :development, :test do
42 | # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
43 | gem 'debug', platforms: %i[mri mingw x64_mingw]
44 | gem 'rubocop', '~> 1.51.0', require: false
45 | gem 'rubocop-performance', '~> 1.18', require: false
46 | gem 'rubocop-rails', '~> 2.19.1', require: false
47 | end
48 |
49 | group :development do
50 | # Use console on exceptions pages [https://github.com/rails/web-console]
51 |
52 | # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
53 | # gem "rack-mini-profiler"
54 |
55 | # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
56 | # gem "spring"
57 |
58 | gem 'annotate', '~> 3.2', '>= 3.2.0'
59 |
60 | # Capistrano - deployment gems
61 | gem 'capistrano', '~> 3.11'
62 | gem 'capistrano-asdf'
63 | gem 'capistrano-passenger', '~> 0.2.0'
64 | gem 'capistrano-rails', '~> 1.4'
65 | gem 'capistrano-sidekiq'
66 | gem 'capistrano-webpacker-precompile', require: false
67 | gem 'dockerfile-rails', '>= 1.2'
68 | gem 'letter_opener'
69 | end
70 |
71 | group :test do
72 | # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
73 | gem 'capybara'
74 | gem 'faker', '~> 3.1'
75 | gem 'selenium-webdriver'
76 | gem 'simplecov', require: false # Code coverage analysis tool for ruby
77 | gem 'webdrivers'
78 | end
79 |
--------------------------------------------------------------------------------
/Procfile.dev:
--------------------------------------------------------------------------------
1 | web: bin/rails server -p 3000
2 | js: yarn build --watch
3 | css: yarn build:css --watch
4 |
--------------------------------------------------------------------------------
/ProdDockerfile:
--------------------------------------------------------------------------------
1 | # syntax = docker/dockerfile:1
2 |
3 | # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
4 | ARG RUBY_VERSION=3.0.2
5 | FROM ruby:$RUBY_VERSION-slim as base
6 |
7 | LABEL fly_launch_runtime="rails"
8 |
9 | # Rails app lives here
10 | WORKDIR /rails
11 |
12 | # Set production environment
13 | ENV RAILS_ENV="production" \
14 | BUNDLE_WITHOUT="development:test" \
15 | BUNDLE_DEPLOYMENT="1"
16 |
17 | # Update gems and bundler
18 | RUN gem update --system --no-document && \
19 | gem install -N bundler
20 |
21 |
22 | # Throw-away build stage to reduce size of final image
23 | FROM base as build
24 |
25 | # Install packages needed to build gems and node modules
26 | RUN apt-get update -qq && \
27 | apt-get install --no-install-recommends -y build-essential curl libpq-dev libvips node-gyp pkg-config python-is-python3
28 |
29 | # Install JavaScript dependencies
30 | ARG NODE_VERSION=18.14.0
31 | ARG YARN_VERSION=1.22.19
32 | ENV PATH=/usr/local/node/bin:$PATH
33 | RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
34 | /tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
35 | npm install -g yarn@$YARN_VERSION && \
36 | rm -rf /tmp/node-build-master
37 |
38 | # Install application gems
39 | COPY --link Gemfile Gemfile.lock ./
40 | RUN bundle install && \
41 | bundle exec bootsnap precompile --gemfile && \
42 | rm -rf ~/.bundle/ $BUNDLE_PATH/ruby/*/cache $BUNDLE_PATH/ruby/*/bundler/gems/*/.git
43 |
44 | # Install node modules
45 | COPY --link package.json yarn.lock ./
46 | RUN yarn install --frozen-lockfile
47 |
48 | # Copy application code
49 | COPY --link . .
50 |
51 | # Precompile bootsnap code for faster boot times
52 | RUN bundle exec bootsnap precompile app/ lib/
53 |
54 | # Precompiling assets for production without requiring secret RAILS_MASTER_KEY
55 | RUN ./bin/rails assets:precompile
56 |
57 |
58 | # Final stage for app image
59 | FROM base
60 |
61 | # Install packages needed for deployment
62 | RUN apt-get update -qq && \
63 | apt-get install --no-install-recommends -y imagemagick libvips postgresql-client && \
64 | rm -rf /var/lib/apt/lists /var/cache/apt/archives
65 |
66 | # Run and own the application files as a non-root user for security
67 | RUN useradd rails --home /rails --shell /bin/bash
68 | USER rails:rails
69 |
70 | # Copy built artifacts: gems, application
71 | COPY --from=build /usr/local/bundle /usr/local/bundle
72 | COPY --from=build --chown=rails:rails /rails /rails
73 |
74 | # Deployment options
75 | ENV RAILS_LOG_TO_STDOUT="1" \
76 | RAILS_SERVE_STATIC_FILES="true"
77 |
78 | # Entrypoint prepares the database.
79 | ENTRYPOINT ["/rails/bin/docker-entrypoint"]
80 |
81 | # Start the server by default, this can be overwritten at runtime
82 | EXPOSE 3000
83 | CMD ["./bin/rails", "server"]
84 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Add your own tasks in files placed in lib/tasks ending in .rake,
4 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
5 |
6 | require_relative 'config/application'
7 |
8 | Rails.application.load_tasks
9 |
--------------------------------------------------------------------------------
/app/assets/builds/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/builds/.keep
--------------------------------------------------------------------------------
/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_tree ../builds
3 | //= link mailgun_mails.css
4 | //= link application.tailwind.css
5 | //= link_tree ../../javascript .js
6 |
--------------------------------------------------------------------------------
/app/assets/images/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/.keep
--------------------------------------------------------------------------------
/app/assets/images/activities_local_conferences.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/activities_local_conferences.png
--------------------------------------------------------------------------------
/app/assets/images/activities_local_hackathons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/activities_local_hackathons.png
--------------------------------------------------------------------------------
/app/assets/images/activities_local_meetups.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/activities_local_meetups.png
--------------------------------------------------------------------------------
/app/assets/images/activities_local_programming.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/activities_local_programming.png
--------------------------------------------------------------------------------
/app/assets/images/activities_local_workshops.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/activities_local_workshops.png
--------------------------------------------------------------------------------
/app/assets/images/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/add.png
--------------------------------------------------------------------------------
/app/assets/images/arc_dark_gray_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/arc_dark_gray_logo.png
--------------------------------------------------------------------------------
/app/assets/images/arc_logo_coloured.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/arc_logo_coloured.png
--------------------------------------------------------------------------------
/app/assets/images/brands_facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/brands_facebook.png
--------------------------------------------------------------------------------
/app/assets/images/brands_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/brands_github.png
--------------------------------------------------------------------------------
/app/assets/images/brands_instagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/brands_instagram.png
--------------------------------------------------------------------------------
/app/assets/images/brands_linkedin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/brands_linkedin.png
--------------------------------------------------------------------------------
/app/assets/images/brands_telegram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/brands_telegram.png
--------------------------------------------------------------------------------
/app/assets/images/brands_twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/brands_twitter.png
--------------------------------------------------------------------------------
/app/assets/images/chapter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/chapter.jpg
--------------------------------------------------------------------------------
/app/assets/images/conference.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/conference.jpg
--------------------------------------------------------------------------------
/app/assets/images/countries.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/countries.png
--------------------------------------------------------------------------------
/app/assets/images/country_kenya.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/country_kenya.png
--------------------------------------------------------------------------------
/app/assets/images/country_rwanda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/country_rwanda.png
--------------------------------------------------------------------------------
/app/assets/images/country_tanzania.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/country_tanzania.png
--------------------------------------------------------------------------------
/app/assets/images/country_uganda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/country_uganda.png
--------------------------------------------------------------------------------
/app/assets/images/developers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/developers.jpg
--------------------------------------------------------------------------------
/app/assets/images/email_arc_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/email_arc_logo.png
--------------------------------------------------------------------------------
/app/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/favicon.ico
--------------------------------------------------------------------------------
/app/assets/images/intro-landing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/intro-landing.jpg
--------------------------------------------------------------------------------
/app/assets/images/sign_up_karate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sign_up_karate.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/app_signal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/app_signal.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/finplus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/finplus.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/friendly_rb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/friendly_rb.jpg
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/kca.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/kca.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/kopo_kopo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/kopo_kopo.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/microverse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/microverse.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/nairobits.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/nairobits.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/planet_argon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/planet_argon.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/current/ruby_central.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/current/ruby_central.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/previous/andela.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/previous/andela.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/previous/ihub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/previous/ihub.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/previous/kopokopo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/previous/kopokopo.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/previous/kwara.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/previous/kwara.png
--------------------------------------------------------------------------------
/app/assets/images/sponsors/previous/shopify.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/previous/shopify.webp
--------------------------------------------------------------------------------
/app/assets/images/sponsors/previous/turing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/sponsors/previous/turing.png
--------------------------------------------------------------------------------
/app/assets/images/workshop.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/assets/images/workshop.jpg
--------------------------------------------------------------------------------
/app/assets/stylesheets/application.tailwind.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');
2 |
3 | @tailwind base;
4 | @tailwind components;
5 | @tailwind utilities;
6 |
7 |
8 | @layer base {
9 | :root {
10 | /* Override colors and other variables */
11 | }
12 | }
13 |
14 | @layer components {
15 |
16 | .turbo-progress-bar {
17 | background: linear-gradient(to right, hsl(var(--p)), hsl(var(--b1)));
18 | }
19 |
20 | @keyframes appear-then-fade {
21 | 0%, 100% {
22 | opacity: 0
23 | }
24 | 5%, 60% {
25 | opacity: 1
26 | }
27 | }
28 |
29 | .alert_custom_class {
30 | animation: appear-then-fade 6s both;
31 | margin-top: 50px;
32 | }
33 |
34 | .text-error {
35 | font-size: .875rem;
36 | color: hsl(var(--er)/var(--tw-border-opacity));
37 | }
38 |
39 | .resp-table {
40 | width: 100%;
41 | display: table;
42 | }
43 | .resp-table-body{
44 | display: table-row-group;
45 | }
46 | .resp-table-row{
47 | display: table-row;
48 | }
49 | .table-body-cell{
50 | display: table-cell;
51 | border: 1px solid #dddddd;
52 | padding: 8px;
53 | line-height: 1.42857143;
54 | vertical-align: top;
55 | }
56 |
57 | .chapter-grid {
58 | img {
59 | width: 330px;
60 | height: 167px;
61 | }
62 | }
63 |
64 | .rounded-box {
65 | position: relative;
66 | overflow: hidden;
67 | }
68 |
69 | .rounded-box .absolute {
70 | position: absolute;
71 | top: 0;
72 | left: 0;
73 | right: 0;
74 | bottom: 0;
75 | display: flex;
76 | align-items: center;
77 | justify-content: center;
78 | z-index: 10;
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/app/channels/application_cable/channel.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module ApplicationCable
4 | class Channel < ActionCable::Channel::Base
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/channels/application_cable/connection.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module ApplicationCable
4 | class Connection < ActionCable::Connection::Base
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class ApplicationController < ActionController::Base
4 | before_action :authenticate_user! # All users should be authenticated in all controllers by default
5 | before_action :configure_permitted_parameters, if: :devise_controller?
6 |
7 | ##
8 | # CanCanCan permission exception capture
9 | rescue_from CanCan::AccessDenied do |exception|
10 | respond_to do |format|
11 | if user_signed_in?
12 | format.html { redirect_to root_path, alert: exception.message }
13 | else
14 | format.html { redirect_to root_path, alert: t('unauthorized.sign_in') }
15 | end
16 | end
17 | end
18 |
19 | protected
20 |
21 | ##
22 | # Add extra permitted parameters to User's model when devise controller is used
23 | def configure_permitted_parameters
24 | keys = %i[name phone_number github_username]
25 | devise_parameter_sanitizer.permit(:sign_up, keys: keys)
26 | devise_parameter_sanitizer.permit(:account_update, keys: keys)
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/app/controllers/chapters_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class ChaptersController < ApplicationController
4 | include ActiveStorage::SetCurrent
5 |
6 | before_action :set_chapter, only: %i[show]
7 | skip_before_action :authenticate_user!, only: %i[index show]
8 |
9 | # GET /chapters or /chapters.json
10 | def index
11 | @chapters = Chapter.all
12 | end
13 |
14 | # GET /chapters/1 or /chapters/1.json
15 | def show; end
16 |
17 | private
18 |
19 | # Use callbacks to share common setup or constraints between actions.
20 | def set_chapter
21 | @chapter = Chapter.find(params[:id])
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/controllers/concerns/.keep
--------------------------------------------------------------------------------
/app/controllers/countries_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class CountriesController < ApplicationController
4 | before_action :set_country, only: %i[show]
5 |
6 | # GET /countries or /countries.json
7 | def index
8 | @countries = Country.all
9 | end
10 |
11 | # GET /countries/1 or /countries/1.json
12 | def show; end
13 |
14 | private
15 |
16 | # Use callbacks to share common setup or constraints between actions.
17 | def set_country
18 | @country = Country.find(params[:id])
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/app/controllers/landing_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class LandingController < ApplicationController
4 | # People should not require authentication for following actions
5 | skip_before_action :authenticate_user!, only: %i[index about learn]
6 | def index; end
7 |
8 | ##
9 | # About us page
10 | def about; end
11 |
12 | ##
13 | # Featured learning materials
14 | def learn; end
15 | end
16 |
--------------------------------------------------------------------------------
/app/controllers/projects_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class ProjectsController < ApplicationController
4 | before_action :set_project, only: %i[show]
5 |
6 | # GET /projects or /projects.json
7 | def index
8 | @projects = Project.all
9 | end
10 |
11 | # GET /projects/1 or /projects/1.json
12 | def show; end
13 |
14 | private
15 |
16 | # Use callbacks to share common setup or constraints between actions.
17 | def set_project
18 | @project = Project.find(params[:id])
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/app/controllers/turbo_devise_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class TurboDeviseController < ApplicationController
4 | class Responder < ActionController::Responder
5 | def to_turbo_stream
6 | controller.render(options.merge(formats: :html))
7 | rescue ActionView::MissingTemplate => e
8 | if get?
9 | raise e
10 | elsif has_errors? && default_action
11 | render rendering_options.merge(formats: :html, status: :unprocessable_entity)
12 | else
13 | redirect_to navigation_location
14 | end
15 | end
16 | end
17 |
18 | self.responder = Responder
19 | respond_to :html, :turbo_stream
20 | end
21 |
--------------------------------------------------------------------------------
/app/controllers/users/registrations_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ##
4 | # Devise override Registration controller
5 | module Users
6 | class RegistrationsController < Devise::RegistrationsController
7 | ##
8 | # Devise override Registration create action
9 | def create
10 | super do
11 | resource.users_chapters.create(chapter_id: params[:chapter_id], main_chapter: true) if resource.persisted?
12 | end
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module ApplicationHelper
4 | end
5 |
--------------------------------------------------------------------------------
/app/helpers/chapters_helper.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module ChaptersHelper
4 | ACTIVITIES = [
5 | { image: 'activities_local_meetups.png', title: 'Local meetups' },
6 | { image: 'activities_local_conferences.png', title: 'conferences' },
7 | { image: 'activities_local_programming.png', title: 'programming' },
8 | { image: 'activities_local_workshops.png', title: 'workshops' },
9 | { image: 'activities_local_hackathons.png', title: 'hackathons' }
10 | ].freeze
11 |
12 | CHAPTERS = [
13 | { country: 'Kenya', image: 'country_kenya.png', alt: 'Nairuby' },
14 | { country: 'Rwanda', image: 'country_rwanda.png', alt: 'ARC_Rwanda' },
15 | { country: 'Tanzania', image: 'country_tanzania.png', alt: 'ARC_Tanzania' },
16 | { country: 'Uganda', image: 'country_uganda.png', alt: 'ARC_Uganda' }
17 | ].freeze
18 |
19 | FEATURED_SPONSORS = [
20 | { image: 'sponsors/current/solutech_official.svg', link: 'https://solutech.co.ke', alt: 'Solutech' },
21 | { image: 'sponsors/current/microverse.png', link: 'https://www.microverse.org/', alt: 'Microverse' },
22 | { image: 'sponsors/current/app_signal.png', link: 'https://www.appsignal.com', alt: 'App Signal' },
23 | { image: 'sponsors/current/ruby_central.png', link: 'https://rubycentral.org/', alt: 'Ruby Central' },
24 |
25 | { image: 'sponsors/current/kopo_kopo.png', link: 'https://kopokopo.co.ke', alt: 'Kopo Kopo' },
26 | { image: 'sponsors/current/finplus.png', link: 'https://finplusgroup.com', alt: 'Finplus Group' },
27 | { image: 'sponsors/current/planet_argon.png', link: 'https://www.planetargon.com', alt: 'Planet Argon' },
28 | { image: 'sponsors/current/friendly_rb.jpg', link: 'https://friendlyrb.com/', alt: 'FriendlyRB' },
29 | { image: 'sponsors/current/kca.png', link: 'https://www.kcau.ac.ke', alt: 'KCA University' },
30 | { image: 'sponsors/current/nairobits.png', link: 'https://www.nairobits.com/', alt: 'Nairobits' }
31 | ].freeze
32 |
33 | PREVIOUS_SPONSORS = [
34 | { image: 'sponsors/previous/shopify.webp', link: 'https://www.shopify.com/', alt: 'Shopify' },
35 | { image: 'sponsors/previous/turing.png', link: 'https://www.turing.com/', alt: 'Turing' },
36 | { image: 'sponsors/previous/kopokopo.png', link: 'https://kopokopo.co.ke', alt: 'Kopokopo' },
37 | { image: 'sponsors/previous/kwara.png', link: 'https://kwara.com/', alt: 'Kwara' },
38 | { image: 'sponsors/previous/ihub.png', link: 'https://ihub.co.ke/', alt: 'iHub, Nairobi' },
39 | { image: 'sponsors/previous/andela.png', link: 'https://andela.com/', alt: 'Andela' }
40 | ].freeze
41 |
42 | SOCIALS = [
43 | { alt: 'ARC Twitter', link: 'https://twitter.com/ruby_african', image: 'brands_twitter.png', show: true },
44 | { alt: 'ARC telegram', link: '#', image: 'brands_telegram.png',
45 | show: FeatureFlag.find_by(name: 'telegram')&.enabled },
46 | { alt: 'ARC facebook', link: 'https://www.facebook.com/rubycommunity.africa', image: 'brands_facebook.png',
47 | show: true },
48 | { alt: 'ARC Instagram', link: '#', image: 'brands_instagram.png', show: true },
49 | { alt: 'ARC LinkedIn', link: 'https://www.linkedin.com/company/african-ruby-community/',
50 | image: 'brands_linkedin.png', show: true },
51 | { alt: 'ARC Github', link: 'https://github.com/nairuby', image: 'brands_github.png', show: true }
52 | ].freeze
53 |
54 | def activities
55 | ACTIVITIES
56 | end
57 |
58 | def chapters
59 | CHAPTERS
60 | end
61 |
62 | def featured_sponsors
63 | FEATURED_SPONSORS
64 | end
65 |
66 | def previous_sponsors
67 | PREVIOUS_SPONSORS
68 | end
69 |
70 | def socials
71 | SOCIALS
72 | end
73 | end
74 |
--------------------------------------------------------------------------------
/app/helpers/countries_helper.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module CountriesHelper
4 | end
5 |
--------------------------------------------------------------------------------
/app/helpers/projects_helper.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module ProjectsHelper
4 | end
5 |
--------------------------------------------------------------------------------
/app/javascript/application.js:
--------------------------------------------------------------------------------
1 | // Entry point for the build script in your package.json
2 | import "@hotwired/turbo-rails"
3 | import "./controllers"
4 |
--------------------------------------------------------------------------------
/app/javascript/controllers/application.js:
--------------------------------------------------------------------------------
1 | import { Application } from "@hotwired/stimulus"
2 |
3 | const application = Application.start()
4 |
5 | // Configure Stimulus development experience
6 | application.debug = false
7 | window.Stimulus = application
8 |
9 | export { application }
10 |
--------------------------------------------------------------------------------
/app/javascript/controllers/hello_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus"
2 |
3 | export default class extends Controller {
4 | connect() {
5 | this.element.textContent = "Hello World!"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/app/javascript/controllers/index.js:
--------------------------------------------------------------------------------
1 | // This file is auto-generated by ./bin/rails stimulus:manifest:update
2 | // Run that command whenever you add a new controller or create them with
3 | // ./bin/rails generate stimulus controllerName
4 |
5 | import { application } from "./application"
6 |
7 | import HelloController from "./hello_controller.js"
8 | application.register("hello", HelloController)
9 |
10 | import RemovalsController from "./removals_controller.js"
11 | application.register("removals", RemovalsController)
12 |
13 | import TurboFramesController from "./turbo_frames_controller.js"
14 | application.register("turbo_frames", TurboFramesController)
15 |
--------------------------------------------------------------------------------
/app/javascript/controllers/removals_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus"
2 |
3 | // Connects to data-controller="removals"
4 | export default class extends Controller {
5 | remove() {
6 | this.element.remove()
7 | }
8 |
9 | remove_on_click() {
10 | // TODO: add animation to slowly remove element.
11 | this.element.remove()
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/javascript/controllers/turbo_frames_controller.js:
--------------------------------------------------------------------------------
1 | import {Controller} from "@hotwired/stimulus"
2 |
3 | export default class extends Controller {
4 | connect() {
5 | if (this.element.id.includes("chapter-modal")) {
6 | window.location.href = "#" + this.element.id
7 | }
8 | }
9 |
10 | disconnect() {
11 | if (this.element.id.includes("chapter-modal")) {
12 | window.location.href = "#"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class ApplicationJob < ActiveJob::Base
4 | # Automatically retry jobs that encountered a deadlock
5 | # retry_on ActiveRecord::Deadlocked
6 |
7 | # Most jobs are safe to ignore if the underlying records are no longer available
8 | # discard_on ActiveJob::DeserializationError
9 | end
10 |
--------------------------------------------------------------------------------
/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class ApplicationMailer < ActionMailer::Base
4 | default from: 'no-reply@rubycommunity.africa'
5 | layout 'mailer'
6 | end
7 |
--------------------------------------------------------------------------------
/app/mailers/devise_mailer.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class DeviseMailer < Devise::Mailer
4 | default from: 'no-reply@rubycommunity.africa'
5 | layout 'mailer'
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/ability.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Ability
4 | include CanCan::Ability
5 |
6 | def initialize(user)
7 | # Define abilities for the user here. For example:
8 | #
9 | # return unless user.present?
10 | # can :read, :all
11 | # return unless user.admin?
12 | # can :manage, :all
13 | #
14 | # The first argument to `can` is the action you are giving the user
15 | # permission to do.
16 | # If you pass :manage it will apply to every action. Other common actions
17 | # here are :read, :create, :update and :destroy.
18 | #
19 | # The second argument is the resource the user can perform the action on.
20 | # If you pass :all it will apply to every resource. Otherwise pass a Ruby
21 | # class of the resource.
22 | #
23 | # The third argument is an optional hash of conditions to further filter the
24 | # objects.
25 | # For example, here the user can only update published articles.
26 | #
27 | # can :update, Article, published: true
28 | #
29 | # See the wiki for details:
30 | # https://github.com/CanCanCommunity/cancancan/blob/develop/docs/define_check_abilities.md
31 |
32 | user ||= User.new # guest user (not logged in)
33 |
34 | return unless user.organization_admin?
35 |
36 | can :manage, :all # Organization admin can manage everything
37 | end
38 | end
39 |
--------------------------------------------------------------------------------
/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class ApplicationRecord < ActiveRecord::Base
4 | primary_abstract_class
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/chapter.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # == Schema Information
4 | #
5 | # Table name: chapters
6 | #
7 | # id :bigint not null, primary key
8 | # description :text
9 | # location :string
10 | # name :string
11 | # created_at :datetime not null
12 | # updated_at :datetime not null
13 | # country_id :bigint
14 | #
15 | # Indexes
16 | #
17 | # index_chapters_on_country_id (country_id)
18 | # index_chapters_on_name (name) UNIQUE
19 | #
20 | class Chapter < ApplicationRecord
21 | # Attachments
22 | has_one_attached :image
23 |
24 | # Associations
25 | belongs_to :country
26 | has_many :projects, dependent: :nullify
27 | has_many :users_chapters, dependent: :destroy
28 | has_many :users, through: :users_chapters
29 |
30 | # Validations
31 | validates :name, :location, :description, presence: true
32 | validates :name, uniqueness: true
33 |
34 | ##
35 | # Image validation not working because of 'no implicit conversion of StringIO into String' error
36 | # validates :image, attached: true, content_type: %i[jpg png jpeg],
37 | # dimension: {
38 | # width: 400, height: 225,
39 | # message: 'is not given between dimension. It should be 400x225',
40 | # }
41 | end
42 |
--------------------------------------------------------------------------------
/app/models/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/African-Ruby-Community/arc_platform/c77a4f421418b59f00b462a04269f720dc73f1dd/app/models/concerns/.keep
--------------------------------------------------------------------------------
/app/models/country.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # == Schema Information
4 | #
5 | # Table name: countries
6 | #
7 | # id :bigint not null, primary key
8 | # name :string
9 | # created_at :datetime not null
10 | # updated_at :datetime not null
11 | #
12 | class Country < ApplicationRecord
13 | # Associations
14 | has_many :chapters, dependent: :nullify
15 |
16 | # Callbacks
17 | after_create_commit lambda {
18 | broadcast_prepend_to 'countries', partial: 'countries/created_country',
19 | locals: { country: self }, target: 'countries'
20 | }
21 |
22 | after_update_commit lambda {
23 | broadcast_update_to 'countries', partial: 'countries/updated_country',
24 | locals: { country: self }, target: self
25 | }
26 |
27 | after_destroy_commit -> { broadcast_remove_to 'countries', target: self }
28 |
29 | # Validations
30 | validates :name, presence: true
31 | end
32 |
--------------------------------------------------------------------------------
/app/models/feature_flag.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # == Schema Information
4 | #
5 | # Table name: feature_flags
6 | #
7 | # id :bigint not null, primary key
8 | # description :text
9 | # enabled :boolean
10 | # name :string
11 | # created_at :datetime not null
12 | # updated_at :datetime not null
13 | #
14 | class FeatureFlag < ApplicationRecord
15 | end
16 |
--------------------------------------------------------------------------------
/app/models/motor/ability.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ##
4 | # CanCan permissions for motor_admin
5 | module Motor
6 | class Ability
7 | include CanCan::Ability
8 |
9 | def initialize(user, _request)
10 | case user.role
11 | when 'organization_admin'
12 | can :manage, :all
13 | end
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/app/models/project.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # == Schema Information
4 | #
5 | # Table name: projects
6 | #
7 | # id :bigint not null, primary key
8 | # description :text
9 | # end_date :datetime
10 | # name :string
11 | # start_date :datetime
12 | # created_at :datetime not null
13 | # updated_at :datetime not null
14 | # chapter_id :bigint not null
15 | #
16 | # Indexes
17 | #
18 | # index_projects_on_chapter_id (chapter_id)
19 | #
20 | # Foreign Keys
21 | #
22 | # fk_rails_... (chapter_id => chapters.id)
23 | #
24 | class Project < ApplicationRecord
25 | belongs_to :chapter
26 | end
27 |
--------------------------------------------------------------------------------
/app/models/user.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # == Schema Information
4 | #
5 | # Table name: users
6 | #
7 | # id :bigint not null, primary key
8 | # confirmation_sent_at :datetime
9 | # confirmation_token :string
10 | # confirmed_at :datetime
11 | # current_sign_in_at :datetime
12 | # current_sign_in_ip :string
13 | # email :string default(""), not null
14 | # encrypted_password :string default(""), not null
15 | # failed_attempts :integer default(0), not null
16 | # github_username :string
17 | # last_sign_in_at :datetime
18 | # last_sign_in_ip :string
19 | # locked_at :datetime
20 | # name :string
21 | # phone_number :string
22 | # remember_created_at :datetime
23 | # reset_password_sent_at :datetime
24 | # reset_password_token :string
25 | # role :integer
26 | # sign_in_count :integer default(0), not null
27 | # unconfirmed_email :string
28 | # unlock_token :string
29 | # created_at :datetime not null
30 | # updated_at :datetime not null
31 | #
32 | # Indexes
33 | #
34 | # index_users_on_confirmation_token (confirmation_token) UNIQUE
35 | # index_users_on_email (email) UNIQUE
36 | # index_users_on_github_username (github_username) UNIQUE
37 | # index_users_on_reset_password_token (reset_password_token) UNIQUE
38 | # index_users_on_unlock_token (unlock_token) UNIQUE
39 | #
40 | class User < ApplicationRecord
41 | # Include default devise modules. Others available are:
42 | # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
43 | devise :database_authenticatable, :registerable,
44 | :recoverable, :rememberable, :validatable,
45 | :confirmable, :lockable, :timeoutable
46 |
47 | # Associations
48 | has_many :users_chapters, dependent: :nullify
49 | has_many :chapters, through: :users_chapters
50 |
51 | # Callbacks
52 | before_create :set_defaults # Set model defaults before create
53 |
54 | # Enums
55 | enum role: { member: 0, chapter_admin: 1, organization_admin: 2 }
56 |
57 | # Validations
58 | validates :email, :name, :phone_number, :github_username, presence: true
59 | validates :github_username, :phone_number, uniqueness: true
60 |
61 | # Validate the format the Github username when it's present
62 | validates :github_username, format:
63 | { with: /\A(?!.*--|.*-$|.*_)[a-zA-Z0-9][\w-]+[a-zA-Z0-9]{0,39}\z/ },
64 | unless: -> { github_username.blank? }
65 |
66 | private
67 |
68 | ##
69 | # A method to set model defaults if they are not set. e.g. if role is not set the default will be
70 | # :member.
71 | def set_defaults
72 | self.role ||= :member
73 | end
74 | end
75 |
--------------------------------------------------------------------------------
/app/models/users_chapter.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # == Schema Information
4 | #
5 | # Table name: users_chapters
6 | #
7 | # id :bigint not null, primary key
8 | # main_chapter :boolean default(FALSE)
9 | # created_at :datetime not null
10 | # updated_at :datetime not null
11 | # chapter_id :bigint not null
12 | # user_id :bigint not null
13 | #
14 | # Indexes
15 | #
16 | # index_users_chapters_on_chapter_id (chapter_id)
17 | # index_users_chapters_on_user_id (user_id)
18 | #
19 | # Foreign Keys
20 | #
21 | # fk_rails_... (chapter_id => chapters.id)
22 | # fk_rails_... (user_id => users.id)
23 | #
24 | class UsersChapter < ApplicationRecord
25 | # Associations
26 | belongs_to :chapter
27 | belongs_to :user
28 | end
29 |
--------------------------------------------------------------------------------
/app/views/chapters/_chapter.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= chapter.name %>
3 |
4 |
5 | <%= chapter.country.try(:name) %>
6 |
7 |
8 | <%= chapter.location %>
9 |
10 |
--------------------------------------------------------------------------------
/app/views/chapters/index.html.erb:
--------------------------------------------------------------------------------
1 | <% content_for(:title,"Chapters") %>
2 | <% content_for(:description," A showcase of the different ruby communities spread across the East African region.") %>
3 |
13 | African Ruby Community, ARC, is an organization that was started in 2010.
14 | The community currently has a reach of over 5,000 members spread across East Africa,
15 | made up of developers (engineers), entrepreneurs, designers, and freelancers.
16 | In terms of development and demonstrations, the community focuses on Ruby technologies and frameworks,
17 | which are all open source and widely used by startups to prototype and carry out proof of concept with a go-to-market strategy.
18 |
19 |
20 |
21 | The community hosts weekly and monthly meetups in different cities in East Africa.
22 | The community brings you Ruby Conference every year with different themes to fill the gap
23 | that exists between school and industry and in return helps spur innovation and growth in
24 | contribution to the global economy.
25 |
26 |
27 |
28 | ARC brings entrepreneurs, developers, designers, and open source contributors.
29 | Why? We believe in a holistic approach; through entrepreneurship, a “solution approach,”
30 | and open source, we can solve so many problems. This in return empowers everyone who
31 | attends with technology “tools” and entrepreneurship “methodology” to reach their fullest
32 | potential and inspire the rest of the world and their communities.
33 |
ARC members also create open source applications that are of use to the
5 | wider Ruby
6 | community and showcase software development skills available.
17 | African Ruby Community, ARC is an organization that was started in 2010. The community currently has over reach of over 5,000 members spread across East Africa, made of developers (Engineers), entrepreneurs, designers and freelancers. In terms of development and demonstrations the community focuses on ruby technologies and frameworks, which are all open source and widely used by startups to prototype and carry out proof of concept with a go to market strategy.
18 |
19 |
20 | The community hosts weekly and monthly meetups in different cities in East Africa. The community brings you Ruby Conference every year with different themes to fill the gap that exist between school and industry and in return helps spur innovation and growth in contribution to global economy.
21 |
22 |
23 |
24 |
25 | <%= link_to landing_about_path do %>
26 |
34 | <% end %>
35 |
9 | Take a look at our list of resources that can help you get up to speed with the Ruby programming
10 | language from the basic building blocks upto to the various frameworks and tools in the Ruby
11 | ecosystem. If you want to add your own resources, fork this repo and send in a pull request.
12 |