2025-10-08 08:14:36 -07:00
2025-10-08 08:14:36 -07:00
2025-10-07 22:21:01 -07:00
2025-10-08 00:43:03 -07:00
2025-10-08 08:14:36 -07:00
2025-10-08 08:14:36 -07:00
2025-10-08 01:44:23 -07:00
2025-10-07 22:21:01 -07:00
2025-10-08 01:44:23 -07:00
2025-10-08 01:44:23 -07:00
2025-10-08 08:05:09 -07:00

National Parks Demo App

Prerequisites

Under the hood

  • Ruby 3.4.7
  • Rails 8.0.3
  • SQLite

Getting started

  1. bundle install
  • You know this one; install dependencies
  1. Set NPS_API_KEY using your tool of choice
  2. bin/rails db:prepare
  • This will create and load your database
  • hint: tail -f log/development.log to see what's going on
  1. bin/rails server
  • Congrats you're ready to receive requests
 curl 'localhost:3000/api/v1/parks?per_page=1' | jq '.'
[
  {
    "id": 1,
    "code": "abli",
    "name": "Abraham Lincoln Birthplace",
    "states": "KY",
    "properties": {},
    "created_at": "2025-10-08T09:26:00.202Z",
    "updated_at": "2025-10-08T09:26:00.202Z"
  }
]

Testing

bin/rspec

TODO

  • What additional cols to add to parks model?
  • Order results on index actions
  • Enum on category for alerts
  • index states for efficient search?
    • full text search in sqlite?
    • normalize state on a separate table?
    • With postgres I would use a states:array col and gin index
Description
No description provided
Readme 90 KiB
Languages
Ruby 100%