Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.git
.gitignore
.bundle
log/*
tmp/*
storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/.keep
/node_modules
/public/packs
/public/packs-test
/coverage
.env
.env.local
.env.*.local
README.md
.github
spec
.rspec
.rubocop.yml
.rubocop_todo.yml

65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key
/config/credentials/*.key.yml

# Ignore node_modules
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

# Ignore environment variables
.env
.env.local
.env.*.local

# Ignore coverage reports
/coverage

# Ignore IDE files
/.vscode
/.idea
*.swp
*.swo
*~

# Ignore OS files
.DS_Store
Thumbs.db

# Ignore test files
/spec/examples.txt

# Ignore Spring files
/spring/*.pid

4 changes: 4 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--require spec_helper
--color
--format documentation

37 changes: 37 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
require:
- rubocop-rails
- rubocop-rspec

AllCops:
NewCops: enable
TargetRubyVersion: 3.3.0
Exclude:
- 'bin/**/*'
- 'db/**/*'
- 'config/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
- 'tmp/**/*'
- 'spec/spec_helper.rb'
- 'spec/rails_helper.rb'

Style/Documentation:
Enabled: false

Metrics/BlockLength:
Exclude:
- 'spec/**/*'
- 'config/**/*'

Layout/LineLength:
Max: 120

Rails:
Enabled: true

RSpec/ExampleLength:
Max: 15

RSpec/MultipleExpectations:
Max: 5

34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM ruby:3.3.0

# Install dependencies
RUN apt-get update -qq && apt-get install -y \
postgresql-client \
nodejs \
npm \
imagemagick \
libvips42 \
&& rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy Gemfile and install gems
COPY Gemfile Gemfile.lock ./
RUN bundle install

# Copy package.json and install node modules (if exists)
COPY package.json package-lock.json* ./
RUN npm install || true

# Copy application code
COPY . .

# Precompile assets
RUN SECRET_KEY_BASE=dummy rails assets:precompile

# Expose port
EXPOSE 3000

# Start server
CMD ["rails", "server", "-b", "0.0.0.0"]

67 changes: 67 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.3.6'

gem 'rails', '~> 8.0.3'
gem 'pg', '~> 1.5'
gem 'puma', '~> 6.4'
gem 'sass-rails', '~> 6.0'
gem 'importmap-rails'
gem 'turbo-rails'
gem 'stimulus-rails'
gem 'jbuilder', '~> 2.13'
gem 'bootsnap', '>= 1.4.4', require: false

# Authentication
gem 'devise'

# Authorization
gem 'pundit'

# Background Jobs
gem 'sidekiq', '~> 7.2'
gem 'redis', '~> 5.0'

# File Upload
gem 'image_processing', '~> 1.12'
gem 'mini_magick'

# Spreadsheet Import
gem 'roo', '~> 2.10'
gem 'roo-xls'

# Bootstrap
gem 'bootstrap', '~> 5.3'
gem 'jquery-rails'
gem 'popper_js', '~> 2.11'

group :development, :test do
gem 'byebug', platforms: %i[mri mingw x64_mingw]
gem 'pry-rails'
gem 'pry-byebug'
gem 'rspec-rails', '~> 6.1'
gem 'factory_bot_rails', '~> 6.4'
gem 'faker', '~> 3.2'
gem 'shoulda-matchers', '~> 6.3'
gem 'database_cleaner-active_record', '~> 2.2'
gem 'simplecov', require: false
gem 'capybara', '~> 3.40'
gem 'selenium-webdriver', '>= 4.11'
gem 'rails-controller-testing', '~> 1.0'
end

group :development do
gem 'web-console', '>= 4.2.0'
gem 'listen', '~> 3.3'
gem 'spring'
gem 'rubocop', '~> 1.64', require: false
gem 'rubocop-rails', '~> 2.24', require: false
gem 'rubocop-rspec', '~> 2.26', require: false
end

group :test do
gem 'webmock', '~> 3.23'
gem 'vcr', '~> 6.3'
end

Loading