A minimalist Rails app for creating and sharing simple yes/no surveys — built with a component-based architecture, responsive mobile-first UI, dark mode themes, animated visuals, and exportable results.
- 🚀 Features
- ⚙️ Requirements
- 🔧 Setup Instructions
- 🎨 SCSS Architecture
- 📦 ViewComponents
- ⚙️ Stimulus Controllers
- 🖼️ Screenshots
- 🧪 Running Tests
- 📄 License
- ✨ Highlights
- 🧠 Dev Tips
- 🔄 Export & Sharing
- Create unlimited surveys (one yes/no question per survey)
- Anonymous voting (no accounts or logins)
- Stores response timestamps and IPs
- Results include:
- ✅ Yes/No percentages
- 📊 Animated radial charts (SVG)
- 🕒 Full response history
- Mobile-first UI built with Bootstrap 5
- 🌗 Dark mode detection with animated glassmorphism styling
- 🧩 Modular ViewComponents for clean UI building blocks
- ⚙️ Stimulus-powered UX: blur-in, auto-refresh, pagination, export, and more
- 🔄 Auto-refreshing tables with countdown timer and pagination
- 🌊 Scroll-based SVG wave backgrounds
- 💾 CSV export of survey results
- Docker + Docker Compose
- Ruby 3.2.8 (via container)
- Rails 7.1.2
- SQLite (inside Docker)
- No local Ruby or Node.js needed
Get started in just a few steps:
Make sure Docker and Docker Compose are installed and running:
docker info
1. Build containers
docker-compose build
2. Install dependencies
docker-compose run web bundle install
3. Setup database
docker-compose run web bin/rails db:setup
4. (Optional) Precompile assets
docker-compose run web bin/rails assets:precompile
5. Launch the app
docker-compose up
Visit http://localhost:3000 to start using the app.
Modular SCSS partials designed for flexibility and reusability:
app/assets/stylesheets/
├── application.scss
├── base/
│ ├── _variables.scss
│ ├── _themes.scss
│ ├── _utilities.scss
│ ├── _animations.scss
│ ├── _transitions.scss
├── components/
│ ├── _buttons.scss
│ ├── _forms.scss
│ ├── _cards.scss
│ ├── _badges.scss
│ ├── _alerts.scss
│ ├── _navbar.scss
│ ├── _tables.scss
│ ├── _theme_switch.scss
│ ├── _toast_alerts.scss
│ ├── _radial_progress.scss
├── layout/
│ ├── _layout.scss
│ ├── _typography.scss
Built with ViewComponent for clean, testable UIs:
SurveyCardComponent
NavbarComponent
FlashComponent
GradientWaveComponent
- Toasts, icons, alert UIs, etc.
Modular JS for dynamic UI behavior:
table_controller.js
— client-side paginationblur_in_controller.js
— animated fade-insautorefresh_controller.js
— page refresh + countdownmatch_height_controller.js
— equal-height layout columnsflash_controller.js
— animated toastsshare_controller.js
— CSV export and sharingwave_controller.js
— scroll-driven wave animation
This project includes full test coverage for:
- Models —
User
,Survey
, andResponse
have dedicated unit tests. - Controllers —
SurveysController
andResponsesController
are fully tested. - ViewComponents — All major components are tested in isolation under
test/components/
. - System Tests — Includes Capybara-powered tests (e.g.,
surveys_test.rb
) for end-to-end flows. - Fixtures & Helpers — Reusable test data and helpers streamline testing setup.
🧪 Run all tests via:
docker-compose exec app rails test
The test suite ensures confidence across the stack — from database logic to UI rendering and user interactions.
MIT © 2025 — frank@frankcamp.tech
- 📱 Fully responsive design with sticky headers and flex layouts
- 🎨 Scroll-reactive gradient waves and theme switcher
- 🧩 ViewComponent-based UI for reusability
- ⚡ Auto-dismissing toasts with animation
- 📊 Interactive Stimulus-driven tables with pagination and refresh
- 💡 Turbo Streams for real-time updates
- 💻 Rapid styling changes via SCSS tokens
- 🔍 SEO-friendly markup with dark mode support
- Customize colors and themes in
_variables.scss
and_themes.scss
- Use ViewComponents to scaffold new UI pieces with preview support
- Animate elements using built-in Stimulus controllers (
blur-in
,wave
, etc.) - SCSS architecture supports rapid theme switching and reuse
Survey results can be downloaded as CSVs. Sharing features include clipboard copy and Web Share API support.
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a new branch for your feature or bugfix:
git checkout -b feature/my-feature
- Make your changes, ensuring they align with the existing architecture and coding style.
- Write tests for new features or behavior changes.
- Run the test suite to ensure everything passes:
docker-compose exec app rails test
- Commit your changes and open a pull request with a clear title and description.
- Follow the SCSS and JS architecture for organization and naming.
- Use ViewComponent previews when creating new UI components.
- Prefer Stimulus for interactive behaviors.
- Write meaningful commit messages.
- Be kind, constructive, and collaborative in code reviews.
Thank you for helping make this project better!