Skip to content

Conversation

@dmitrytrager
Copy link
Collaborator

@dmitrytrager dmitrytrager commented Feb 2, 2026

Trying to replicate existing app functionality within new Rails app here.
We can use this as a starting point for future development.

dmitrytrager and others added 4 commits February 2, 2026 12:19
Complete rewrite from PHP to Ruby on Rails implementing phases 1-9:

Phase 1: App skeleton with SQLite, Tailwind CSS, Hotwire
Phase 2: Data import services for legacy XML (users, admins, content)
Phase 3: Authentication - passwordless for users, bcrypt for admins
Phase 4: Content browsing with year/month navigation, Turbo Frames
Phase 5: Media players - PDF.js viewer, HTML5 audio player
Phase 6: Search with autocomplete and debouncing
Phase 7: Favorites system with Turbo Stream updates
Phase 8: Admin local files upload/management with ActiveStorage
Phase 9: Activity logging dashboard with usage statistics

Features:
- User authentication with auto-generated login IDs
- Admin authentication with secure password hashing
- Topic browsing by year, month, new uploads, top topics
- Search across topics, tags, and authors
- Favorites with instant toggle via Turbo Streams
- PDF viewer with PDF.js and audio player with custom controls
- Admin file management with drag-and-drop uploads
- Comprehensive admin dashboard with analytics
- Activity logging for user and admin actions
- 365-day session duration

Tech stack: Ruby 4.0.1, Rails 8.1.2, SQLite, Tailwind CSS, Hotwire

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 10: Set up deployment infrastructure for both containerized
and bare-metal deployments on resource-constrained devices.

Docker deployment:
- docker-compose.yml with persistent volumes for SQLite and uploads
- docker-compose.production.yml with memory limits for Pi
- docker-compose.development.yml for local development
- Dockerfile.simple without Thruster for minimal footprint

Systemd deployment:
- config/skillrx.service with security hardening
- bin/setup-production script for automated setup

Helper files:
- Makefile with common deployment commands
- .env.example template
- bin/rspec binstub for testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
dmitrytrager and others added 2 commits February 2, 2026 15:06
- SQL Injection: Replace string interpolation in group_by_day with
  pre-defined SQL expressions using a whitelist hash lookup
- HTTP Verb Confusion: Handle HEAD requests in store_location by
  checking request.get? || request.head?

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change test commands from `bin/rails test` to `bin/rspec` since
the project uses RSpec for testing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
run: bin/rubocop -f github

test:
runs-on: ubuntu-latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're using Alpine in the Dockerfiles but we can always adjust this later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is for host machine on CI, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't know if matters; as long as it works because sometimes it seems package names between distros vary.

@@ -0,0 +1,106 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could run the app in a container as well; the only thing the machines will need is Docker; thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that we may want to run it docker free. Not only because of resource, but because of how we are going to update this app on devices

@@ -0,0 +1,61 @@
# systemd service file for SkillRx Beacon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like something that could also be container-related; the Mini PC I have has a docker user group on it.

The commands in this file look like something that could go in a compose file.

Copy link
Collaborator

@devjona devjona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Let's merge and I'm sure we'll refine as we develop.
This is a great, giant first-step 🚀 . Thanks~

dmitrytrager and others added 3 commits February 4, 2026 15:28
Change test commands from `bin/rails test` to `bin/rspec` since
the project uses RSpec for testing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dmitrytrager dmitrytrager merged commit 1acdf73 into main Feb 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants