Conversation
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 <[email protected]>
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 <[email protected]>
8925b2d to
018d3f2
Compare
- 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 <[email protected]>
Change test commands from `bin/rails test` to `bin/rspec` since the project uses RSpec for testing. Co-Authored-By: Claude Opus 4.5 <[email protected]>
| run: bin/rubocop -f github | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
I think we're using Alpine in the Dockerfiles but we can always adjust this later.
There was a problem hiding this comment.
But this is for host machine on CI, right?
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
We could run the app in a container as well; the only thing the machines will need is Docker; thoughts?
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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.
Change test commands from `bin/rails test` to `bin/rspec` since the project uses RSpec for testing. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Trying to replicate existing app functionality within new Rails app here.
We can use this as a starting point for future development.