I built this application to test out different ways to render a web-page and compare the performance. Feel free to use it to investigate any technology you find fascinating.
Trivia: SurveySpark is an application designed to streamline the process of creating and managing surveys. This guide will help you set up, run, and contribute to the project.
- docker-compose up --build
- (optional) to add 10 mil records to the database: run
rake import_data:faker_data
from thesurveyspark-web-1
container
-
Ensure you have the following installed on your system:
-
Install Ruby 3.4.1:
rbenv install 3.4.1 rbenv local 3.4.1 ruby -v
The last line should return the correct ruby version:
ruby 3.4.1
-
Setup SurveySpark:
./bin/setup
-
Start the server:
- Using the
dev
script:./bin/dev
- Or by running these commands in three separate terminals:
rails server yarn build --watch yarn watch:css
- Using the
-
http://localhost:3000/ should now be accessible in your browser.
- Install rbenv and Yarn
- Install Ruby 3.2.0
- Setup SurveySpark by running
./bin/setup_production
- Run
RAILS_ENV=production bin/rails s
- If you want to switch to development mode after working in production environment, run
rm -rf .bundle/
and follow the steps fromInstallation and Running
- If you want to switch to development mode after working in production environment, run
- Prerequisites: we're using
capybara
+selenium
+chrome
for feature (integration) testing. Make sure you havechromedriver
installed:brew install chromedriver xattr -d com.apple.quarantine /opt/homebrew/bin/chromedriver
- Run the whole test suite:
rspec spec/
- Run only unit tests:
rspec --exclude-pattern "spec/features/**/*_spec.rb"
- Run a particular test:
rspec spec/decorators/survey_decorator_spec.rb
- Fork the repository
- Create a new branch by a pattern
feature/<your-feature-name>
orfix/<important-bug-name>
- Add changes. Make sure you've attached tests that covered your changes
- Run linter with
pronto run -c main
orpronto run --unstaged
and fix any found issues - Create a pull request to the
main
branch of the repository
If you have any questions or need help, feel free to contact me at [email protected]