Skip to content

Commit 9a77528

Browse files
committed
[create] create project
1 parent 565e54c commit 9a77528

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+7817
-0
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
back/lib
2+
back/log
3+
back/public
4+
back/storage
5+
back/test
6+
back/tmp
7+
back/vendor

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build:
2+
docker compose build
3+
docker compose run --rm api rails db:create
4+
docker compose run --rm api rails db:migrate
5+
docker compose run --rm api rails db:seed
6+
docker compose up -d

back/.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby-3.0.6

back/Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ruby:3.0
2+
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
3+
ENV APP_PATH /myapp
4+
RUN mkdir $APP_PATH
5+
WORKDIR $APP_PATH
6+
COPY Gemfile $APP_PATH/Gemfile
7+
COPY Gemfile.lock $APP_PATH/Gemfile.lock
8+
RUN bundle install
9+
COPY . $APP_PATH
10+
EXPOSE 3000
11+
CMD ["rails", "server", "-b", "0.0.0.0"]

back/Gemfile

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
source 'https://rubygems.org'
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby '3.0.6'
5+
6+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
7+
gem 'rails', '~> 6.1.7', '>= 6.1.7.6'
8+
# Use postgresql as the database for Active Record
9+
gem 'pg', '~> 1.1'
10+
# Use Puma as the app server
11+
gem 'puma', '~> 5.0'
12+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
13+
# gem 'jbuilder', '~> 2.7'
14+
# Use Redis adapter to run Action Cable in production
15+
# gem 'redis', '~> 4.0'
16+
# Use Active Model has_secure_password
17+
# gem 'bcrypt', '~> 3.1.7'
18+
19+
# Use Active Storage variant
20+
# gem 'image_processing', '~> 1.2'
21+
22+
# Reduces boot times through caching; required in config/boot.rb
23+
gem 'bootsnap', '>= 1.4.4', require: false
24+
25+
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
26+
# gem 'rack-cors'
27+
28+
group :development, :test do
29+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
30+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
31+
end
32+
33+
group :development do
34+
gem 'listen', '~> 3.3'
35+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
36+
gem 'spring'
37+
end
38+
39+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
40+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

back/Gemfile.lock

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actioncable (6.1.7.6)
5+
actionpack (= 6.1.7.6)
6+
activesupport (= 6.1.7.6)
7+
nio4r (~> 2.0)
8+
websocket-driver (>= 0.6.1)
9+
actionmailbox (6.1.7.6)
10+
actionpack (= 6.1.7.6)
11+
activejob (= 6.1.7.6)
12+
activerecord (= 6.1.7.6)
13+
activestorage (= 6.1.7.6)
14+
activesupport (= 6.1.7.6)
15+
mail (>= 2.7.1)
16+
actionmailer (6.1.7.6)
17+
actionpack (= 6.1.7.6)
18+
actionview (= 6.1.7.6)
19+
activejob (= 6.1.7.6)
20+
activesupport (= 6.1.7.6)
21+
mail (~> 2.5, >= 2.5.4)
22+
rails-dom-testing (~> 2.0)
23+
actionpack (6.1.7.6)
24+
actionview (= 6.1.7.6)
25+
activesupport (= 6.1.7.6)
26+
rack (~> 2.0, >= 2.0.9)
27+
rack-test (>= 0.6.3)
28+
rails-dom-testing (~> 2.0)
29+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
30+
actiontext (6.1.7.6)
31+
actionpack (= 6.1.7.6)
32+
activerecord (= 6.1.7.6)
33+
activestorage (= 6.1.7.6)
34+
activesupport (= 6.1.7.6)
35+
nokogiri (>= 1.8.5)
36+
actionview (6.1.7.6)
37+
activesupport (= 6.1.7.6)
38+
builder (~> 3.1)
39+
erubi (~> 1.4)
40+
rails-dom-testing (~> 2.0)
41+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
42+
activejob (6.1.7.6)
43+
activesupport (= 6.1.7.6)
44+
globalid (>= 0.3.6)
45+
activemodel (6.1.7.6)
46+
activesupport (= 6.1.7.6)
47+
activerecord (6.1.7.6)
48+
activemodel (= 6.1.7.6)
49+
activesupport (= 6.1.7.6)
50+
activestorage (6.1.7.6)
51+
actionpack (= 6.1.7.6)
52+
activejob (= 6.1.7.6)
53+
activerecord (= 6.1.7.6)
54+
activesupport (= 6.1.7.6)
55+
marcel (~> 1.0)
56+
mini_mime (>= 1.1.0)
57+
activesupport (6.1.7.6)
58+
concurrent-ruby (~> 1.0, >= 1.0.2)
59+
i18n (>= 1.6, < 2)
60+
minitest (>= 5.1)
61+
tzinfo (~> 2.0)
62+
zeitwerk (~> 2.3)
63+
bootsnap (1.17.0)
64+
msgpack (~> 1.2)
65+
builder (3.2.4)
66+
byebug (11.1.3)
67+
concurrent-ruby (1.2.2)
68+
crass (1.0.6)
69+
date (3.3.4)
70+
erubi (1.12.0)
71+
ffi (1.16.3)
72+
globalid (1.2.1)
73+
activesupport (>= 6.1)
74+
i18n (1.14.1)
75+
concurrent-ruby (~> 1.0)
76+
listen (3.8.0)
77+
rb-fsevent (~> 0.10, >= 0.10.3)
78+
rb-inotify (~> 0.9, >= 0.9.10)
79+
loofah (2.22.0)
80+
crass (~> 1.0.2)
81+
nokogiri (>= 1.12.0)
82+
mail (2.8.1)
83+
mini_mime (>= 0.1.1)
84+
net-imap
85+
net-pop
86+
net-smtp
87+
marcel (1.0.2)
88+
method_source (1.0.0)
89+
mini_mime (1.1.5)
90+
minitest (5.20.0)
91+
msgpack (1.7.2)
92+
net-imap (0.4.6)
93+
date
94+
net-protocol
95+
net-pop (0.1.2)
96+
net-protocol
97+
net-protocol (0.2.2)
98+
timeout
99+
net-smtp (0.4.0)
100+
net-protocol
101+
nio4r (2.6.1)
102+
nokogiri (1.15.5-aarch64-linux)
103+
racc (~> 1.4)
104+
pg (1.5.4)
105+
puma (5.6.7)
106+
nio4r (~> 2.0)
107+
racc (1.7.3)
108+
rack (2.2.8)
109+
rack-test (2.1.0)
110+
rack (>= 1.3)
111+
rails (6.1.7.6)
112+
actioncable (= 6.1.7.6)
113+
actionmailbox (= 6.1.7.6)
114+
actionmailer (= 6.1.7.6)
115+
actionpack (= 6.1.7.6)
116+
actiontext (= 6.1.7.6)
117+
actionview (= 6.1.7.6)
118+
activejob (= 6.1.7.6)
119+
activemodel (= 6.1.7.6)
120+
activerecord (= 6.1.7.6)
121+
activestorage (= 6.1.7.6)
122+
activesupport (= 6.1.7.6)
123+
bundler (>= 1.15.0)
124+
railties (= 6.1.7.6)
125+
sprockets-rails (>= 2.0.0)
126+
rails-dom-testing (2.2.0)
127+
activesupport (>= 5.0.0)
128+
minitest
129+
nokogiri (>= 1.6)
130+
rails-html-sanitizer (1.6.0)
131+
loofah (~> 2.21)
132+
nokogiri (~> 1.14)
133+
railties (6.1.7.6)
134+
actionpack (= 6.1.7.6)
135+
activesupport (= 6.1.7.6)
136+
method_source
137+
rake (>= 12.2)
138+
thor (~> 1.0)
139+
rake (13.1.0)
140+
rb-fsevent (0.11.2)
141+
rb-inotify (0.10.1)
142+
ffi (~> 1.0)
143+
spring (4.1.3)
144+
sprockets (4.2.1)
145+
concurrent-ruby (~> 1.0)
146+
rack (>= 2.2.4, < 4)
147+
sprockets-rails (3.4.2)
148+
actionpack (>= 5.2)
149+
activesupport (>= 5.2)
150+
sprockets (>= 3.0.0)
151+
thor (1.3.0)
152+
timeout (0.4.1)
153+
tzinfo (2.0.6)
154+
concurrent-ruby (~> 1.0)
155+
websocket-driver (0.7.6)
156+
websocket-extensions (>= 0.1.0)
157+
websocket-extensions (0.1.5)
158+
zeitwerk (2.6.12)
159+
160+
PLATFORMS
161+
aarch64-linux
162+
163+
DEPENDENCIES
164+
bootsnap (>= 1.4.4)
165+
byebug
166+
listen (~> 3.3)
167+
pg (~> 1.1)
168+
puma (~> 5.0)
169+
rails (~> 6.1.7, >= 6.1.7.6)
170+
spring
171+
tzinfo-data
172+
173+
RUBY VERSION
174+
ruby 3.0.6p216
175+
176+
BUNDLED WITH
177+
2.2.33

back/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# README
2+
3+
This README would normally document whatever steps are necessary to get the
4+
application up and running.
5+
6+
Things you may want to cover:
7+
8+
* Ruby version
9+
10+
* System dependencies
11+
12+
* Configuration
13+
14+
* Database creation
15+
16+
* Database initialization
17+
18+
* How to run the test suite
19+
20+
* Services (job queues, cache servers, search engines, etc.)
21+
22+
* Deployment instructions
23+
24+
* ...

back/Rakefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
require_relative "config/application"
5+
6+
Rails.application.load_tasks
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module ApplicationCable
2+
class Channel < ActionCable::Channel::Base
3+
end
4+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module ApplicationCable
2+
class Connection < ActionCable::Connection::Base
3+
end
4+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class ApplicationController < ActionController::API
2+
end

back/app/controllers/concerns/.keep

Whitespace-only changes.

back/app/jobs/application_job.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class ApplicationJob < ActiveJob::Base
2+
# Automatically retry jobs that encountered a deadlock
3+
# retry_on ActiveRecord::Deadlocked
4+
5+
# Most jobs are safe to ignore if the underlying records are no longer available
6+
# discard_on ActiveJob::DeserializationError
7+
end
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class ApplicationMailer < ActionMailer::Base
2+
default from: 'from@example.com'
3+
layout 'mailer'
4+
end

back/app/models/application_record.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ApplicationRecord < ActiveRecord::Base
2+
self.abstract_class = true
3+
end

back/app/models/concerns/.keep

Whitespace-only changes.
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<style>
6+
/* Email styles need to be inline */
7+
</style>
8+
</head>
9+
10+
<body>
11+
<%= yield %>
12+
</body>
13+
</html>
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%= yield %>

0 commit comments

Comments
 (0)