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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@

# Ignore all .pem files
*.pem

/node_modules
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ ruby file: '.ruby-version'

gem 'rails', '~> 7.2'

gem 'activeadmin', '~> 3.2', '>= 3.2.4'
gem 'arctic_admin', '~> 4.3', '>= 4.3.1'
gem 'aws-sdk-s3', '~> 1.122'
gem 'blueprinter', '~> 1.0', '>= 1.0.2'
gem 'bootsnap', '~> 1.18', '>= 1.18.3', require: false
Expand All @@ -18,7 +20,10 @@ gem 'puma', '~> 6.4', '>= 6.4.2'
gem 'rack-cors', '~> 2.0', '>= 2.0.2'
gem 'redis', '~> 5.2'
gem 'ruby-vips', '~> 2.2', '>= 2.2.1'
gem 'sassc-rails', '~> 2.1', '>= 2.1.2'
gem 'sidekiq', '~> 7.3'
gem 'sprockets', '~> 4.2', '>= 4.2.1'

gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
gem 'warped', '~> 1.0.0'

Expand Down
83 changes: 77 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ GEM
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activeadmin (3.2.4)
arbre (~> 1.2, >= 1.2.1)
csv
formtastic (>= 3.1)
formtastic_i18n (>= 0.4)
inherited_resources (~> 1.7)
jquery-rails (>= 4.2)
kaminari (>= 1.2.1)
railties (>= 6.1)
ransack (>= 4.0)
activejob (7.2.0)
activesupport (= 7.2.0)
globalid (>= 0.3.6)
Expand Down Expand Up @@ -76,6 +86,12 @@ GEM
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
arbre (1.7.0)
activesupport (>= 3.0.0)
ruby2_keywords (>= 0.0.2)
arctic_admin (4.3.1)
activeadmin (>= 1.1.0, < 4.0)
font-awesome-sass (~> 6.0)
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.963.0)
Expand Down Expand Up @@ -108,6 +124,7 @@ GEM
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
csv (3.3.0)
date (3.3.4)
debug (1.9.2)
irb (~> 1.10)
Expand Down Expand Up @@ -158,18 +175,47 @@ GEM
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.0-x86_64-linux-musl)
font-awesome-sass (6.5.2)
sassc (~> 2.0)
formtastic (5.0.0)
actionpack (>= 6.0.0)
formtastic_i18n (0.7.0)
globalid (1.2.1)
activesupport (>= 6.1)
has_scope (0.8.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
inherited_resources (1.14.0)
actionpack (>= 6.0)
has_scope (>= 0.6)
railties (>= 6.0)
responders (>= 2)
io-console (0.7.2)
irb (1.14.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jmespath (1.6.2)
jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.7.2)
jwt (2.8.2)
base64
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
kaminari-activerecord (= 1.2.2)
kaminari-core (= 1.2.2)
kaminari-actionview (1.2.2)
actionview
kaminari-core (= 1.2.2)
kaminari-activerecord (1.2.2)
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
language_server-protocol (3.17.0.3)
launchy (3.0.1)
addressable (~> 2.8)
Expand Down Expand Up @@ -223,16 +269,16 @@ GEM
puma (6.4.2)
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.7)
rack (2.2.9)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rackup (1.0.0)
rack (< 3)
webrick
rails (7.2.0)
actioncable (= 7.2.0)
actionmailbox (= 7.2.0)
Expand Down Expand Up @@ -264,6 +310,10 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
ransack (4.2.1)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
rdoc (6.7.0)
psych (>= 4.0.0)
redis (5.2.0)
Expand Down Expand Up @@ -317,6 +367,15 @@ GEM
ruby-vips (2.2.2)
ffi (~> 1.12)
logger
ruby2_keywords (0.0.5)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
securerandom (0.3.1)
shoulda-matchers (6.3.1)
activesupport (>= 5.2.0)
Expand All @@ -332,9 +391,17 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.5.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
stringio (3.1.1)
strscan (3.1.0)
thor (1.3.1)
tilt (2.4.0)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -374,7 +441,9 @@ PLATFORMS
x86_64-linux-musl

DEPENDENCIES
activeadmin (~> 3.2, >= 3.2.4)
annotate (~> 3.2)
arctic_admin (~> 4.3, >= 4.3.1)
aws-sdk-s3 (~> 1.122)
blueprinter (~> 1.0, >= 1.0.2)
bootsnap (~> 1.18, >= 1.18.3)
Expand All @@ -397,9 +466,11 @@ DEPENDENCIES
rubocop (~> 1.64, >= 1.64.1)
rubocop-rails (~> 2.25, >= 2.25.1)
ruby-vips (~> 2.2, >= 2.2.1)
sassc-rails (~> 2.1, >= 2.1.2)
shoulda-matchers (~> 6.2)
sidekiq (~> 7.3)
simplecov (~> 0.22.0)
sprockets (~> 4.2, >= 4.2.1)
tzinfo-data
warped (~> 1.0.0)

Expand Down
30 changes: 30 additions & 0 deletions app/admin/admin_users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# frozen_string_literal: true

ActiveAdmin.register AdminUser do
permit_params :email, :password, :password_confirmation

index do
selectable_column
id_column
column :email
column :created_at
actions
end

show do
attributes_table do
row :id
row :email
row :created_at
end
end

form do |f|
f.inputs do
f.input :email
f.input :password
f.input :password_confirmation
end
f.actions
end
end
34 changes: 34 additions & 0 deletions app/admin/dashboard.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true

ActiveAdmin.register_page 'Dashboard' do
menu priority: 1, label: proc { I18n.t('active_admin.dashboard') }

content title: proc { I18n.t('active_admin.dashboard') } do
div class: 'blank_slate_container', id: 'dashboard_default_message' do
span class: 'blank_slate' do
span I18n.t('active_admin.dashboard_welcome.welcome')
small I18n.t('active_admin.dashboard_welcome.call_to_action')
end
end

# Here is an example of a simple dashboard with columns and panels.
#
# columns do
# column do
# panel "Recent Posts" do
# ul do
# Post.recent(5).map do |post|
# li link_to(post.title, admin_post_path(post))
# end
# end
# end
# end

# column do
# panel "Info" do
# para "Welcome to ActiveAdmin."
# end
# end
# end
end
end
Empty file added app/assets/config/manifest.js
Empty file.
1 change: 1 addition & 0 deletions app/assets/javascripts/active_admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//= require arctic_admin/base
17 changes: 17 additions & 0 deletions app/assets/stylesheets/active_admin.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Sass variable overrides must be declared before loading up Active Admin's styles.
//
// To view the variables that Active Admin provides, take a look at
// `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
// Active Admin source.
//
// For example, to change the sidebar width:
// $sidebar-width: 242px;

// Active Admin's got SASS!
@import "active_admin/mixins";
@import "arctic_admin/base";

// Overriding any non-variable Sass must be done after the fact.
// For example, to change the default status-tag color:
//
// .status_tag { background: #6090DB; }
27 changes: 27 additions & 0 deletions app/models/admin_user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# frozen_string_literal: true

class AdminUser < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable,
:recoverable, :rememberable, :validatable
end

# == Schema Information
#
# Table name: admin_users
#
# id :bigint not null, primary key
# email :string default(""), not null
# encrypted_password :string default(""), not null
# remember_created_at :datetime
# reset_password_sent_at :datetime
# reset_password_token :string
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_admin_users_on_email (email) UNIQUE
# index_admin_users_on_reset_password_token (reset_password_token) UNIQUE
#
4 changes: 4 additions & 0 deletions app/models/application_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

class ApplicationRecord < ActiveRecord::Base
primary_abstract_class

def self.ransackable_attributes(auth_object = nil)
authorizable_ransackable_attributes
end
end
Loading