Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
3b998df
Remove initial folder and file
raphaellyv Nov 1, 2025
0f85e3d
Initial rails setup
raphaellyv Nov 1, 2025
53d283d
Add rspec, capybara and bootstrap
raphaellyv Nov 2, 2025
333426e
Add navbar
raphaellyv Nov 2, 2025
521b75e
Use I18n on home
raphaellyv Nov 2, 2025
fd3a3f3
add users
raphaellyv Nov 2, 2025
39686be
Add test for default role to user model
raphaellyv Nov 2, 2025
67a74ff
Add Simplecov
raphaellyv Nov 2, 2025
99bac92
Add avatar_image
raphaellyv Nov 2, 2025
c301f96
Adjust avatar_image validation
raphaellyv Nov 2, 2025
848535f
Add devise
raphaellyv Nov 2, 2025
4887fd7
Alter welcome message
raphaellyv Nov 2, 2025
43d46c0
Add user first_name method
raphaellyv Nov 2, 2025
608d22c
Add home link to navbar
raphaellyv Nov 2, 2025
a6c69d1
Adjust devise translations
raphaellyv Nov 2, 2025
f9019b0
Adjust new session view
raphaellyv Nov 2, 2025
e90c952
Add failure scenario to user sign in
raphaellyv Nov 3, 2025
7e6d4b1
Add close button to flash messages
raphaellyv Nov 3, 2025
370f7db
Add profile page
raphaellyv Nov 3, 2025
1541d79
Redirect user to profile after sign in
raphaellyv Nov 3, 2025
efeba60
Add image to profile page
raphaellyv Nov 3, 2025
09ba0d7
Show current page on navbar
raphaellyv Nov 3, 2025
fe1abcb
Add Sign up fail test
raphaellyv Nov 3, 2025
06ab309
Adjust sign up layout
raphaellyv Nov 3, 2025
f11e7bc
Add missing registration fields
raphaellyv Nov 3, 2025
f629bad
Add required true to sign in and sign up fields
raphaellyv Nov 3, 2025
25bd674
Test user sign out
raphaellyv Nov 3, 2025
5456295
Add devise methods
raphaellyv Nov 3, 2025
9d69c9b
Add edit user fields
raphaellyv Nov 3, 2025
b055b55
Update user registration
raphaellyv Nov 3, 2025
19f91bf
Add tests to user registration update
raphaellyv Nov 3, 2025
4c73037
Add gem faker
raphaellyv Nov 3, 2025
d7d02f6
Adjust navbar layout
raphaellyv Nov 3, 2025
b82d774
Add sign out tests
raphaellyv Nov 3, 2025
7b97ec6
Redirect admin to dashboard after login
raphaellyv Nov 3, 2025
a9543ff
Adjust dashboard layout
raphaellyv Nov 4, 2025
e284527
Add number of users by role on the admin dashboard
raphaellyv Nov 4, 2025
4c8a8c7
Adjust dashboard layout
raphaellyv Nov 4, 2025
06c585e
Add user model translation file
raphaellyv Nov 4, 2025
6c64a78
Adjust users table layout
raphaellyv Nov 4, 2025
18b6ac6
Add edit button css to users table
raphaellyv Nov 4, 2025
8231b04
Add admins controller
raphaellyv Nov 4, 2025
c879a02
Add admin edit user form css
raphaellyv Nov 4, 2025
d75579c
WIP add user update by admin
raphaellyv Nov 4, 2025
f95c814
User update by admin
raphaellyv Nov 4, 2025
60b39ea
Refactor user update by admin
raphaellyv Nov 5, 2025
6cebeef
Add admin update route request tests
raphaellyv Nov 5, 2025
4b3641b
Admin creates users
raphaellyv Nov 5, 2025
19f7dee
Admin changes user role
raphaellyv Nov 5, 2025
62bcc67
Add role admin to users table
raphaellyv Nov 5, 2025
b1c5b2b
Admin destroys user
raphaellyv Nov 5, 2025
d685bf5
Stop last admin from being destroyed or having their role changed
raphaellyv Nov 5, 2025
46ddb3a
Add importmap and turbo gems
raphaellyv Nov 6, 2025
5a7e1d2
Add translations to turbo messages
raphaellyv Nov 6, 2025
d6ebfb7
Update the title of test files
raphaellyv Nov 6, 2025
35847cd
Adjust test types
raphaellyv Nov 6, 2025
e383441
Add users upload through a csv
raphaellyv Nov 6, 2025
44a3efb
Adjust csv upload css
raphaellyv Nov 6, 2025
ec910a0
Move new create new user link to navbar
raphaellyv Nov 6, 2025
f34525a
Add pagination to users list
raphaellyv Nov 6, 2025
ddcc80a
Resize images on users list and profile
raphaellyv Nov 6, 2025
64b0504
Test csv upload without avatar image
raphaellyv Nov 6, 2025
4c17795
Add gem activerecord-import
raphaellyv Nov 6, 2025
930af69
Show all roles on users table
raphaellyv Nov 6, 2025
dc443b6
Add dev containers
raphaellyv Nov 6, 2025
c644152
Update brakeman
raphaellyv Nov 6, 2025
91e1006
Merge pull request #1 from raphaellyv/users-management-app-dev-contai…
raphaellyv Nov 6, 2025
5f7d409
Remove avatar_temp_url from users
raphaellyv Nov 6, 2025
b4cac34
Fix image import from url
raphaellyv Nov 7, 2025
0d90cee
Add user and admin login to readme
raphaellyv Nov 7, 2025
beee9fa
Change favicon
raphaellyv Nov 7, 2025
a09f90e
Adjust users table css
raphaellyv Nov 7, 2025
f5f3782
Add different avatar urls
raphaellyv Nov 7, 2025
2c80c4f
Adjust avatar css
raphaellyv Nov 7, 2025
2ebcc8a
Add test for pagination
raphaellyv Nov 7, 2025
e83dc5e
Add default avatar image
raphaellyv Nov 7, 2025
a975451
Reduce number of users per page to 10
raphaellyv Nov 7, 2025
5d2a3a8
Change import button while importing users
raphaellyv Nov 7, 2025
285044b
Adjust profile css
raphaellyv Nov 7, 2025
2d2ad5c
Add sign up button to navbar
raphaellyv Nov 7, 2025
78f4af0
Change factory user avatar
raphaellyv Nov 7, 2025
1df2d54
Add accepted file types to avatar image field on admin new
raphaellyv Nov 8, 2025
a5db253
Add dropdown menu to users table
raphaellyv Nov 8, 2025
9c19ecd
Extract user and admin links from navbar
raphaellyv Nov 8, 2025
e4e7fc9
Update readme pictures
raphaellyv Nov 8, 2025
a591975
Update readme pictures
raphaellyv Nov 8, 2025
1a4e5b7
Extract image import to a method
raphaellyv Nov 8, 2025
5b55844
Adjust sign in and sign up css on navbar
raphaellyv Nov 10, 2025
770b32c
Fix error messages displayed when deleting the last admin
raphaellyv Nov 10, 2025
3da91e4
Update readme
raphaellyv Nov 10, 2025
9d5119b
Remove unused images
raphaellyv Nov 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.4.4
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
35 changes: 35 additions & 0 deletions .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "fullstack_developer"

services:
rails-app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile

volumes:
- ../..:/workspaces:cached

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Uncomment the next line to use a non-root user for all processes.
# user: vscode

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
depends_on:
- postgres

postgres:
image: postgres:16.1
restart: unless-stopped
networks:
- default
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres

volumes:
postgres-data:
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://containers.dev/implementors/json_reference/.
// For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/ruby
{
"name": "fullstack_developer",
"dockerComposeFile": "compose.yaml",
"service": "rails-app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/rails/devcontainer/features/activestorage": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {"moby":false},
"ghcr.io/rails/devcontainer/features/postgres-client": {}
},

"containerEnv": {
"KAMAL_REGISTRY_PASSWORD": "$KAMAL_REGISTRY_PASSWORD",
"DB_HOST": "postgres"
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000, 5432],

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://containers.dev/implementors/json_reference/#remoteUser.
// "remoteUser": "root",


// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bin/setup --skip-server"
}
51 changes: 51 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.

# Ignore git directory.
/.git/
/.gitignore

# Ignore bundler config.
/.bundle

# Ignore all environment files.
/.env*

# Ignore all default key files.
/config/master.key
/config/credentials/*.key

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

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

# Ignore storage (uploaded files in development and any SQLite databases).
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/.keep

# Ignore assets.
/node_modules/
/app/assets/builds/*
!/app/assets/builds/.keep
/public/assets

# Ignore CI service files.
/.github

# Ignore Kamal files.
/config/deploy*.yml
/.kamal

# Ignore development files
/.devcontainer

# Ignore Docker-related files
/.dockerignore
/Dockerfile*
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
config/credentials/*.yml.enc diff=rails_credentials
config/credentials.yml.enc diff=rails_credentials
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
pull_request:
push:
branches: [ main ]

jobs:
scan_ruby:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Scan for common Rails security vulnerabilities using static analysis
run: bin/brakeman --no-pager

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Lint code for consistent style
run: bin/rubocop -f github

51 changes: 0 additions & 51 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# Temporary files generated by your text editor or operating system
# belong in git's global ignore instead:
# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore`

# Ignore bundler config.
/.bundle

# Ignore all environment files.
/.env*

# 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 storage (uploaded files in development and any SQLite databases).
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

/public/assets

# Ignore master key for decrypting credentials and more.
/config/master.key
3 changes: 3 additions & 0 deletions .kamal/hooks/docker-setup.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "Docker set up on $KAMAL_HOSTS..."
3 changes: 3 additions & 0 deletions .kamal/hooks/post-app-boot.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "Booted app version $KAMAL_VERSION on $KAMAL_HOSTS..."
14 changes: 14 additions & 0 deletions .kamal/hooks/post-deploy.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# A sample post-deploy hook
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLES (if set)
# KAMAL_DESTINATION (if set)
# KAMAL_RUNTIME

echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds"
3 changes: 3 additions & 0 deletions .kamal/hooks/post-proxy-reboot.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "Rebooted kamal-proxy on $KAMAL_HOSTS"
3 changes: 3 additions & 0 deletions .kamal/hooks/pre-app-boot.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "Booting app version $KAMAL_VERSION on $KAMAL_HOSTS..."
51 changes: 51 additions & 0 deletions .kamal/hooks/pre-build.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/sh

# A sample pre-build hook
#
# Checks:
# 1. We have a clean checkout
# 2. A remote is configured
# 3. The branch has been pushed to the remote
# 4. The version we are deploying matches the remote
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLES (if set)
# KAMAL_DESTINATION (if set)

if [ -n "$(git status --porcelain)" ]; then
echo "Git checkout is not clean, aborting..." >&2
git status --porcelain >&2
exit 1
fi

first_remote=$(git remote)

if [ -z "$first_remote" ]; then
echo "No git remote set, aborting..." >&2
exit 1
fi

current_branch=$(git branch --show-current)

if [ -z "$current_branch" ]; then
echo "Not on a git branch, aborting..." >&2
exit 1
fi

remote_head=$(git ls-remote $first_remote --tags $current_branch | cut -f1)

if [ -z "$remote_head" ]; then
echo "Branch not pushed to remote, aborting..." >&2
exit 1
fi

if [ "$KAMAL_VERSION" != "$remote_head" ]; then
echo "Version ($KAMAL_VERSION) does not match remote HEAD ($remote_head), aborting..." >&2
exit 1
fi

exit 0
Loading