Skip to content

Commit 609d09b

Browse files
authored
Initial commit
0 parents  commit 609d09b

File tree

151 files changed

+6481
-0
lines changed

Some content is hidden

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

151 files changed

+6481
-0
lines changed

.dockerignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
2+
3+
# Ignore git directory.
4+
/.git/
5+
/.gitignore
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore all environment files (except templates).
11+
/.env*
12+
!/.env*.erb
13+
14+
# Ignore all default key files.
15+
/config/master.key
16+
/config/credentials/*.key
17+
18+
# Ignore all logfiles and tempfiles.
19+
/log/*
20+
/tmp/*
21+
!/log/.keep
22+
!/tmp/.keep
23+
24+
# Ignore pidfiles, but keep the directory.
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/.keep
33+
34+
# Ignore assets.
35+
/node_modules/*
36+
/app/assets/builds/*
37+
!/app/assets/builds/.keep
38+
/public/assets
39+
40+
# Ignore CI service files.
41+
/.github
42+
43+
# Ignore development files
44+
/.devcontainer
45+
46+
# Ignore Docker-related files
47+
/.dockerignore
48+
/Dockerfile*
49+
50+
/Brewfile
51+
/Brewfile.lock.json

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[Makefile]
14+
indent_style = tab

.env.sample

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# These environment variables are needed to run the app locally.
2+
# Copy these into a file named .env to have them loaded automatically.
3+
4+
POSTGRES_HOST=localhost # May need to be changed to `DB_HOST=db` if using devcontainer
5+
POSTGRES_PORT=5432
6+
POSTGRES_PASSWORD=password
7+
POSTGRES_USER=postgres
8+
RAILS_ENV=development
9+
SECRET_KEY_BASE=sample_secret_key_base
10+
DOCKER_BUILDKIT=1

.erb-lint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
EnableDefaultLinters: true
2+
linters:
3+
Rubocop:
4+
enabled: true
5+
only: [Style/StringLiterals]
6+
rubocop_config:
7+
Style/StringLiterals:
8+
Enabled: true
9+
EnforcedStyle: double_quotes

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+
config/credentials/*.yml.enc diff=rails_credentials
9+
config/credentials.yml.enc diff=rails_credentials

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Context
2+
*Gives the reviewer some context about the work and why this change is being made, the WHY you are doing this. This field goes more into the product perspective.*
3+
4+
## Description
5+
*Provide a detailed description of how exactly this task will be accomplished. This can be something technical. What specific steps will be taken to achieve the goal? This should include details on service integration, job logic, implementation, etc.*
6+
7+
## Changes in the codebase
8+
*This is where becomes technical. Here is where you can be more focused on the engineering side of your solution. Include information about the functionality they are adding or modifying, as well as any refactoring or improvement of existing code.*
9+
10+
## Changes outside the codebase
11+
*If you have made changes to external services, need to add additional values to the job settings, or need to add something new to the database, explain it here. This may include updates to third-party services, changes to infrastructure configuration, integration with external APIs, etc.*
12+
13+
## Aditional information
14+
*Provide any additional information that might be useful to the reviewer in evaluating this pull request. This could include performance considerations,design choices, etc.*

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
time: "06:00"
8+
timezone: America/Los_Angeles
9+
open-pull-requests-limit: 10

.github/workflows/ci.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
env:
8+
RAILS_ENV: test
9+
jobs:
10+
test:
11+
name: "Test"
12+
runs-on: ubuntu-latest
13+
env:
14+
DATABASE_URL: postgres://postgres:postgres@localhost:5432/ci
15+
services:
16+
postgres:
17+
image: postgres:16-alpine
18+
env:
19+
POSTGRES_DB: ci
20+
POSTGRES_USER: postgres
21+
POSTGRES_PASSWORD: postgres
22+
ports:
23+
- 5432:5432
24+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: ruby/setup-ruby@v1
28+
with:
29+
bundler-cache: true
30+
- uses: oven-sh/setup-bun@v2
31+
with:
32+
bun-version: 1.1.8
33+
- run: bun install
34+
- run: bundle exec rake db:migrate
35+
- run: bundle exec rake test:all
36+
rubocop:
37+
name: "Lint / rubocop"
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: ruby/setup-ruby@v1
42+
with:
43+
bundler-cache: true
44+
- run: bin/rubocop
45+
brakeman:
46+
name: "Security / brakeman"
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: ruby/setup-ruby@v1
51+
with:
52+
bundler-cache: true
53+
- run: bundle exec brakeman --exit-on-warn --no-progress --color --output /dev/stdout
54+
bundle-audit:
55+
name: "Security / bundle-audit"
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v4
59+
- uses: ruby/setup-ruby@v1
60+
with:
61+
bundler-cache: true
62+
- run: bundle exec bundle-audit check --update -v
63+
build-and-push-image:
64+
name: "Build and push Docker image"
65+
if: github.ref == 'refs/heads/main'
66+
runs-on: ubuntu-latest
67+
env:
68+
REGISTRY: ghcr.io
69+
IMAGE_NAME: ${{ github.repository }}
70+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
71+
permissions:
72+
contents: read
73+
packages: write
74+
75+
steps:
76+
- name: Checkout repository
77+
uses: actions/checkout@v4
78+
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
79+
- name: Log in to the Container registry
80+
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
81+
with:
82+
registry: ${{ env.REGISTRY }}
83+
username: ${{ github.actor }}
84+
password: ${{ secrets.GITHUB_TOKEN }}
85+
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
86+
- name: Extract metadata (tags, labels) for Docker
87+
id: meta
88+
uses: docker/metadata-action@a64d0487d7069df33b279515d35d60fa80e2ea62
89+
with:
90+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
91+
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
92+
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
93+
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
94+
- name: Build and push Docker image
95+
id: push
96+
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1
97+
with:
98+
context: .
99+
push: true
100+
tags: ${{ steps.meta.outputs.tags }}
101+
labels: ${{ steps.meta.outputs.labels }}
102+
103+
104+
105+
106+

.gitignore

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# General Information
2+
# -------------------
3+
# Documentation: https://help.github.com/articles/ignoring-files
4+
# For personal ignore preferences, use a global ignore:
5+
# git config --global core.excludesfile '~/.gitignore_global'
6+
7+
# System & IDEs Ignores
8+
# ---------------------
9+
*.DS_Store
10+
.AppleDouble
11+
.LSOverride
12+
.localized
13+
.directory
14+
.Spotlight-V100
15+
.Trashes
16+
.Thumbs.db
17+
.ehthumbs.db
18+
.Desktop.ini
19+
$RECYCLE.BIN/
20+
21+
# IDE Specific
22+
.idea/
23+
*.sublime*
24+
.sublime-gulp.cache
25+
.vscode/
26+
.vscode-test
27+
# JetBrains
28+
.idea/
29+
# VIM
30+
*~
31+
.*.swp
32+
.Session.vim
33+
.Sessionx.vim
34+
.netrwhist
35+
/tags
36+
# OSX
37+
.DS_Store
38+
39+
# Development Environment
40+
# -----------------------
41+
/.bundle
42+
/.env*
43+
!/.env*.erb
44+
!/.env.sample
45+
/config/master.key
46+
/config/credentials/*.key
47+
*.local
48+
49+
# Build & Dependency Folders
50+
# --------------------------
51+
node_modules/
52+
/public/assets
53+
/public/uploads
54+
/public/vite*
55+
/public/packs
56+
/public/packs-test
57+
/public/assets
58+
/storage/*
59+
!/storage/.keep
60+
/tmp/storage/*
61+
!/tmp/storage/
62+
!/tmp/storage/.keep
63+
# Ignore SQLite databases and backups
64+
/db/*.sqlite3*
65+
/db/backups
66+
67+
# Log, Temp Files & Uploads
68+
# --------------------------
69+
/log/*
70+
!/log/.keep
71+
/tmp/*
72+
!/tmp/.keep
73+
/tmp/pids/*
74+
!/tmp/pids/
75+
!/tmp/pids/.keep
76+
/*.log
77+
/coverage
78+
/uploads/*
79+
.byebug_history
80+
# Cypress specific
81+
cypress-tests/cypress/results
82+
cypress-tests/debug.log
83+
cypress-tests/.vscode
84+
cypress-tests/cypress/artifacts/screenshots/
85+
cypress-tests/cypress/artifacts/videos/
86+
cypress-tests/cypress/screenshots/
87+
cypress-tests/cypress/videos/
88+
89+
# Package Managers & Tools
90+
# ------------------------
91+
/.yarn-integrity
92+
/.yarnrc
93+
yarn-1.22.5.cjs
94+
yarn-1.22.5.js
95+
yarn-debug.log*
96+
yarn-error.log
97+
.eslintcache
98+
.dump.rdb
99+
# Cypress node_modules and package-lock.json
100+
cypress-tests/node_modules
101+
cypress-tests/package-lock.json
102+
103+
# Misc & OS Specific Ignores
104+
# ---------------------------
105+
*.swp
106+
*.byebug_history
107+
*.rbc

.overmind.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OVERMIND_PROCFILE=Procfile.dev

0 commit comments

Comments
 (0)