See the live version: stranger-tides.com
Note: This project is not affiliated with NOAA, COOPS, NWLON, or any government institution. Data is for demonstration only.
- About
- Quick Start
- System Dependencies
- Database
- Usage
- Rake Tasks
- Testing
- Deployment
- Contributing
- License
This app displays NOAA real-time tide stations on a Google Map. Clicking a station shows the last 24 hours of tide data. Station data is loaded from a text file (see data/station_list.txt) and metadata is parsed and stored in the database.
# Clone the repo
git clone https://github.com/Joseworks/stranger-tides.git
cd stranger-tides
# Install dependencies
bundle install
# Set up the database
rails db:create db:migrate
# (Optional) Seed or process station data
rake stations_id_list:process_station_list
rake station_list:retrieve_all_stations_metadata
# Start the server
rails server- Ruby 3.3.7
- Rails 7.0.4.3
- PostgreSQL
- Node.js (for JS assets)
- Puma (web server)
- Foreman (Procfile manager)
- gon (JS data sharing)
- Rspec (testing)
- CircleCI (CI/CD)
- Uses PostgreSQL
- Station metadata is stored as a
jsonbcolumn for efficient querying
- Visit the app in your browser (default: http://localhost:3000)
- Click a station on the map to view tide data
rake stations_delete:delete_station_list— Delete all station inforake stations_id_list:process_station_list— Load station list from filerake station_list:retrieve_all_stations_metadata— Fetch and store station metadatarake highcharts:update— Update HighCharts assets
- Run all tests:
bundle exec rspec - Code style:
rubocop
- Security:
bundle audit bundle exec brakeman
- Use the provided Rake tasks to prepare data
- Deploy to your preferred platform (Heroku, Render, etc.)
- Ensure environment variables and DB are configured
- Fork the repo and create your branch from
main - Run tests and Rubocop before submitting PRs
- Open an issue for major changes
- All contributions welcome!
Copyright (c) 2015 Jose C Fernandez — MIT License