Rails application that allows you to create and manage conferences. You can use it to create a conference, add speakers and sessions. Attendees can register for the conference, view the schedule, receive notifications and more.
- Requirements
- Ruby 3.3.x (https://www.ruby-lang.org/en/documentation/installation/)
- Bundler (
gem install bundler
)
- Clone the repository (
git clone xxx
) - Run
bin/setup
(needs to be run only once) - Run
bin/dev
- Visit
http://localhost:3000
in your browser
- Ruby on Rails 7.2.x
- Ruby 3.3.x
- SQLite3
- SolidQueue
- Hotwire
- Import maps
- Tailwind CSS
- Visit
http://localhost:3000/avo
- Log in as an admin (see
config/seeds.rb
for the default admin credentials) - In avo, you can create a new conference, add speakers, locations and sessions
- Visit
http://localhost:3000
to see the conference schedule
You can enable features by using ENV variables. The ENV var key should follow the convention "#{feature_name}_ENABLED". For example, to enable the litestream_backups
feature, add LITESTREAM_BACKUP_ENABLED=true
to your .env file. You can view all the available features in app/models/feature.rb
.
The application is configured to be deployed using Kamal. Each env has its own deploy.yml file, which should be updated with the correct values for your environment. Also, remember to create a .env file per environment (e.g. .env.production) with the correct values.
- AppSignal for monitoring
- AWS S3 for file storage & backups
- MailPace for sending emails
We use Standard Ruby for linting and formatting.
- Run
bundle exec rubocop
to check all ruby files - Run
bundle exec rubocop -a
to auto-correct offenses - How do I run RuboCop in my editor?
We use ERB Lint to lint our ERB files.
- Run
bundle exec erblint --lint-all
to check all ERB files - Run
bundle exec erblint --lint-all -a
to auto-correct offenses. WARNING: This command isn't safe and can break your code.
We use StandardJS to lint our JavaScript files.
- Install by running
npm install standard --global
- Run
standard
to check all JavaScript files - Run
standard --fix
to auto-correct offenses - How do I run StandardJS in my editor?
- How do I make the output more readable?
We use Typos as a spell checker.
- Install by running
brew install typos-cli
- Run
typos
to check all files - Run
typos -w
to auto-correct offenses - For false positives and other configuration, see the
_typos.yml
file
Leftook will execute the linters' auto-fix on staged files and abort the commit if there are offenses that can't be auto-fixed. Run the following commands to enable this flow:
gem install lefthook
lefthook install
Besides code reviews, we use rubycritic to generate a report of the code quality. Both as a reviewer and as a contributor, you should check the report and address the issues found if the files you are working on have a low score ("D" or "F").
- You can run it with
bundle exec rubycritic
We use DatabaseConsistency to check for inconsistencies between the database schema and the application models.
- You can run it with
bundle exec database_consistency
.
Run tests by using bundle exec rspec
.
- Headless is the default config. If you want to see the browser you can run the following command:
HEADLESS=false bundle exec rspec
- If you want to pause the execution you can use
pause
inside anit
statement. - If you want to see the logs you can use
:log
, e.g.it "xxx", :log do
- Use
data-test-id
to find elements instead of classes/ids, e.g.data-test-id="decline_modal"
- Use the methods in the
DataTestId
module to select HTML elements, e.g.,find_dti("decline_modal")