Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5103cce
Add error logs to track Twelvedata invalid responses
thuutin Sep 17, 2025
02fe6b0
Support exotic currency pairs
thuutin Sep 18, 2025
b62f682
Send app version to Sentry
thuutin Sep 18, 2025
a56cbbf
Enhance error logging for invalid exchange rate responses
thuutin Sep 18, 2025
43447a3
Revert "Send app version to Sentry"
thuutin Sep 18, 2025
1e17733
Add methods to fetch exchange rates and fallback to cross rates
thuutin Sep 18, 2025
c95607b
Fix quote parameter in fetch_exchange_cross_rates method
thuutin Sep 18, 2025
ddcfc30
Enable Sentry logging and add enabled patches for enhanced monitoring
thuutin Sep 18, 2025
d581248
Update sync warning threshold from 10 to 100 syncs
thuutin Sep 18, 2025
d7fe856
Add random delay in fetch_exchange_cross_rates to avoid rate limiting
thuutin Sep 18, 2025
c69ab76
Fetch cross rates only in symbol is invalid
thuutin Sep 19, 2025
27b39e3
Enhance error handling for invalid price data responses
thuutin Sep 19, 2025
b460a1a
Add retry logic for handling Faraday errors in TwelveData provider
thuutin Sep 19, 2025
3278d76
Add rails_db gem and configure initializer
thuutin Sep 21, 2025
2af2060
Maybe fix segfault
thuutin Sep 21, 2025
5a85b4e
Update Ruby version to 3.4.6 and Bundler to 2.7.2 in Gemfile.lock
thuutin Sep 21, 2025
258116e
Add seed_dump gem for database seeding management
thuutin Sep 21, 2025
839fee0
fix my mistake
thuutin Sep 21, 2025
9e6e4cf
Dev environment in Docker
thuutin Sep 21, 2025
b4e60e7
Add ports for PostgreSQL and Redis services to worker and web process…
thuutin Sep 21, 2025
aabbf96
These are not needed as I don't want to learn Docker watch
thuutin Sep 21, 2025
5c6f0de
This too
thuutin Sep 21, 2025
afed674
Add rails trio
thuutin Sep 22, 2025
665bcfa
Configure action cable and active jobs to use the Trio
thuutin Sep 22, 2025
8f150b6
Remove sidekiq
thuutin Sep 22, 2025
ab01d79
Remove Redis
thuutin Sep 22, 2025
1cb0d03
Fix tests
thuutin Sep 22, 2025
5b6cebd
Remove rate limit information from API usage response and documentation
thuutin Sep 22, 2025
203c110
Fix the misconfigured cache database
thuutin Sep 22, 2025
8664e66
:shrug:
thuutin Sep 22, 2025
062620d
Merge branch 'main' of github.com:we-promise/sure
thuutin Sep 22, 2025
1ee4ed7
Merge branch 'main' of https://github.com/we-promise/sure into merge-…
thuutin Nov 2, 2025
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: 1 addition & 1 deletion .cursor/rules/project-conventions.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This rule serves as high-level documentation for how you should write code in th
- Lucide Icons for icons
- OpenAI for AI chat
- Database: PostgreSQL
- Jobs: Sidekiq + Redis
- Jobs: SolidQueue
- External
- Payments: Stripe
- User bank data syncing: Plaid
Expand Down
26 changes: 2 additions & 24 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ x-rails-env: &rails_env
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
BUNDLE_PATH: /bundle
REDIS_URL: redis://redis:6379/1

services:
app:
Expand All @@ -27,37 +26,16 @@ services:
<<: *rails_env
depends_on:
- db
- redis

worker:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
- bundle_cache:/bundle
command: bundle exec sidekiq
restart: unless-stopped
environment:
<<: *rails_env
depends_on:
- redis

redis:
image: redis:latest
volumes:
- redis-data:/data
restart: unless-stopped

db:
image: postgres:latest
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
environment:
<<: *db_env

volumes:
postgres-data:
redis-data:
bundle_cache:
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
PLAID_CLIENT_ID: foo
PLAID_SECRET: bar
DATABASE_URL: postgres://postgres:postgres@localhost:5432
REDIS_URL: redis://localhost:6379
RAILS_ENV: test

services:
Expand All @@ -93,12 +92,6 @@ jobs:
- 5432:5432
options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3

redis:
image: redis
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Install packages
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libvips postgresql-client libpq-dev
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.4
3.4.6
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Common Development Commands

### Development Server
- `bin/dev` - Start development server (Rails, Sidekiq, Tailwind CSS watcher)
- `bin/dev` - Start development server (Rails, Solid queue, Tailwind CSS watcher)
- `bin/rails server` - Start Rails server only
- `bin/rails console` - Open Rails console

Expand Down Expand Up @@ -95,11 +95,11 @@ Two primary data ingestion methods:
- Custom field mapping with transformation rules

### Background Processing
Sidekiq handles asynchronous tasks:
SolidQueue handles asynchronous tasks:
- Account syncing (`SyncJob`)
- Import processing (`ImportJob`)
- AI chat responses (`AssistantResponseJob`)
- Scheduled maintenance via sidekiq-cron
- Scheduled maintenance via SolidQueue

### Frontend Architecture
- **Hotwire Stack**: Turbo + Stimulus for reactive UI without heavy JavaScript
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.4.4
ARG RUBY_VERSION=3.4.6
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base

# Rails app lives here
Expand Down
18 changes: 14 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ gem "rails", "~> 7.2.2"

# Drivers
gem "pg", "~> 1.5"
gem "redis", "~> 5.4"

# Deployment
gem "puma", ">= 5.0"
Expand All @@ -31,15 +30,12 @@ gem "lookbook", "2.3.11"
gem "hotwire_combobox"

# Background Jobs
gem "sidekiq"
gem "sidekiq-cron"

# Monitoring
gem "vernier"
gem "rack-mini-profiler"
gem "sentry-ruby"
gem "sentry-rails"
gem "sentry-sidekiq"
gem "logtail-rails"
gem "skylight", groups: [ :production ]

Expand Down Expand Up @@ -122,3 +118,17 @@ group :test do
gem "climate_control"
gem "simplecov", require: false
end

gem "rails_db", "~> 2.5"

gem "seed_dump", "~> 3.3"

gem "solid_cache", "~> 1.0"

gem "sqlite3", "~> 2.7"

gem "solid_queue", "~> 1.2"

gem "solid_cable", "~> 3.0"

gem "mission_control-jobs", "~> 1.1"
101 changes: 73 additions & 28 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ GEM
bigdecimal
rexml
crass (1.0.6)
cronex (0.15.0)
tzinfo
unicode (>= 0.4.4.5)
css_parser (1.21.1)
addressable
csv (3.3.5)
Expand Down Expand Up @@ -293,6 +290,18 @@ GEM
faraday-follow_redirects
jwt (2.10.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)
langfuse-ruby (0.1.4)
concurrent-ruby (~> 1.0)
faraday (>= 1.8, < 3.0)
Expand Down Expand Up @@ -351,6 +360,16 @@ GEM
logger
mini_mime (1.1.5)
minitest (5.25.5)
mission_control-jobs (1.1.0)
actioncable (>= 7.1)
actionpack (>= 7.1)
activejob (>= 7.1)
activerecord (>= 7.1)
importmap-rails (>= 1.2.1)
irb (~> 1.13)
railties (>= 7.1)
stimulus-rails
turbo-rails
mocha (2.7.1)
ruby2_keywords (>= 0.0.5)
msgpack (1.8.0)
Expand Down Expand Up @@ -492,6 +511,14 @@ GEM
rails-settings-cached (2.9.6)
activerecord (>= 5.0.0)
railties (>= 5.0.0)
rails_db (2.5.0)
activerecord
csv
kaminari
rails (>= 5.0.0)
ransack (>= 2.3.2)
simple_form (>= 5.0.1)
terminal-table
railties (7.2.2.2)
actionpack (= 7.2.2.2)
activesupport (= 7.2.2.2)
Expand All @@ -502,6 +529,10 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.3.0)
ransack (4.3.0)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
Expand All @@ -511,10 +542,6 @@ GEM
erb
psych (>= 4.0.0)
redcarpet (3.6.1)
redis (5.4.0)
redis-client (>= 0.22.0)
redis-client (0.25.0)
connection_pool
regexp_parser (2.10.0)
reline (0.6.1)
io-console (~> 0.5)
Expand Down Expand Up @@ -575,6 +602,9 @@ GEM
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.4.1)
seed_dump (3.3.1)
activerecord (>= 4)
activesupport (>= 4)
selenium-webdriver (4.34.0)
base64 (~> 0.2)
logger (~> 1.4)
Expand All @@ -587,20 +617,9 @@ GEM
sentry-ruby (5.26.0)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
sentry-sidekiq (5.26.0)
sentry-ruby (~> 5.26.0)
sidekiq (>= 3.0)
sidekiq (8.0.5)
connection_pool (>= 2.5.0)
json (>= 2.9.0)
logger (>= 1.6.2)
rack (>= 3.1.0)
redis-client (>= 0.23.2)
sidekiq-cron (2.3.0)
cronex (>= 0.13.0)
fugit (~> 1.8, >= 1.11.1)
globalid (>= 1.0.1)
sidekiq (>= 6.5.0)
simple_form (5.3.1)
actionpack (>= 5.2)
activemodel (>= 5.2)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -610,7 +629,31 @@ GEM
skylight (6.0.4)
activesupport (>= 5.2.0)
smart_properties (1.17.0)
solid_cable (3.0.12)
actioncable (>= 7.2)
activejob (>= 7.2)
activerecord (>= 7.2)
railties (>= 7.2)
solid_cache (1.0.7)
activejob (>= 7.2)
activerecord (>= 7.2)
railties (>= 7.2)
solid_queue (1.2.1)
activejob (>= 7.1)
activerecord (>= 7.1)
concurrent-ruby (>= 1.3.1)
fugit (~> 1.11.0)
railties (>= 7.1)
thor (>= 1.3.1)
sorbet-runtime (0.5.12163)
sqlite3 (2.7.4-aarch64-linux-gnu)
sqlite3 (2.7.4-aarch64-linux-musl)
sqlite3 (2.7.4-arm-linux-gnu)
sqlite3 (2.7.4-arm-linux-musl)
sqlite3 (2.7.4-arm64-darwin)
sqlite3 (2.7.4-x86_64-darwin)
sqlite3 (2.7.4-x86_64-linux-gnu)
sqlite3 (2.7.4-x86_64-linux-musl)
stackprof (0.2.27)
stimulus-rails (1.3.4)
railties (>= 6.0.0)
Expand Down Expand Up @@ -641,7 +684,6 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unaccent (0.4.0)
unicode (0.4.4.5)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
Expand Down Expand Up @@ -727,6 +769,7 @@ DEPENDENCIES
logtail-rails
lookbook (= 2.3.11)
lucide-rails!
mission_control-jobs (~> 1.1)
mocha
octokit
omniauth (~> 2.1)
Expand All @@ -742,22 +785,24 @@ DEPENDENCIES
rack-mini-profiler
rails (~> 7.2.2)
rails-settings-cached
rails_db (~> 2.5)
redcarpet
redis (~> 5.4)
rotp (~> 6.3)
rqrcode (~> 3.0)
rubocop-rails-omakase
ruby-lsp-rails
ruby-openai
rubyzip (~> 2.3)
seed_dump (~> 3.3)
selenium-webdriver
sentry-rails
sentry-ruby
sentry-sidekiq
sidekiq
sidekiq-cron
simplecov
skylight
solid_cable (~> 3.0)
solid_cache (~> 1.0)
solid_queue (~> 1.2)
sqlite3 (~> 2.7)
stackprof
stimulus-rails
stripe
Expand All @@ -771,7 +816,7 @@ DEPENDENCIES
webmock

RUBY VERSION
ruby 3.4.4p34
ruby 3.4.6p54

BUNDLED WITH
2.6.7
2.7.2
1 change: 0 additions & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
web: bundle exec ${DEBUG:+rdbg -O -n -c --} bin/rails server -b 0.0.0.0
css: bundle exec bin/rails tailwindcss:watch 2>/dev/null
worker: bundle exec sidekiq
1 change: 0 additions & 1 deletion app/controllers/api/v1/auth_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class AuthController < BaseController
include Invitable

skip_before_action :authenticate_request!
skip_before_action :check_api_key_rate_limit
skip_before_action :log_api_access

def signup
Expand Down
Loading