Giter Site home page Giter Site logo

teamninja's Introduction

OffTheGrid Campground Finder (MKS36 Team Ninja Greenfield Project)

OffTheGrid is a campground search app that facilitates locating campground info from anywhere in the US (currently limited to only Texas). Whether you want to find campgrounds near your or near a specific location, this app will find them all and show you any relevant info you might need to help you get as far off the grid as you want.

#Getting Started

###Basic code flow:

In the backend, a worker queries Active.com's Campground and Campsite search APIs and filter/format/store all the relevant data on our backend using a Postgres database(development and production) OR SQLite3 database(testing) adapter through the Node.js KNEX library.

The front-end accepts user input (search location), geocodes this data using Google Maps Geocode API, and then sends the resulting latitude/longitude as well as search radius to the backend.

The backend web server then queries the database for all saved campgrounds retrieved by the worker. It then filters the campground list so that only the ones within the given search radius are returned.

Using this response info, the frontend displays the desirable data in a user-friendly list view, and also generates a map plotting the locations of the campground set. Users can toggle between campground list view and campsite list view if they want more details on individual campsites within a clicked campground.

###Installing the codebase:

  • Fork and clone down the codebase
  • From within the code directory, perform NPM install (refer to package.json for all project dependencies)
npm install
  • Launch server on localhost:4000, located in /server/index.js by running
npm start
  • Connect to localhost:4000 in your browser

###To regenerate the campground database:

  • Currently, no process scheduler (crontab, etc) is set up to run cggrabber. You can run it manually or set up your desired process scheduler.
  • To re-build the campgrounds and campsite database, simply run
node worker/cggrabber.js

by default the worker populate development database. To populate testing database before running tests, run

export NODE_ENV='test'
node worker/cggrabber.js
  • This will query the Campground/Campsite Search API and build the database. The database is re-built each time the worker is run (inserts rather than upserts).
  • Note: Due to Active.com's query per second (QPS) limitation, the cggraber.js worker task is throttled to query no more than 2 times per second.

###Running the tests Simply run

npm test

Built With

Node JS SQLite3 Express React JS Bootstrap

Project management:

Stories in Ready

Project TODO:

Backend:

  • Note: The backend is already feature complete. The only improvement necessary would be to schedule worker/cggrabber.js to run periodically using a process scheduler. Another important change would be to swap out the sqlite3 adapter currently configured in our knexfile to instead use postgreSQL. Since Heroku (our desired deployment environment) doesn't have a sqlite3 plugin, the DB must be switched to use postgres instead. None of the actual db build/query code should need to be changed.

Frontend:

  • Add Map view to display a separate tab displaying a map of plotted campgrounds
  • Add campsite view. This feature would potentially toggle a new view when a campground is clicked and display info for all campsites in that campground. This information is retrievable by querying the /searchcs endpoint on the backend and providing the campground ID.
  • Display additional campground info in the list view, showing available amenities, waterfront (if availble), etc.
  • Additional frontend styling for user-friendliness.

Cleanup:

  • Break out app.js code into provided component files.
  • Delete any deprecated, unused code.

API Reference:

Backend APIs to collect campground and campsites

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

Mark Boraski (Product Owner) - https://github.com/orgs/MKS-teamninja/people/SpartanSOS

Maher Dakkak (SCRUM Master) - https://github.com/Madakkak

Jack Hall - https://github.com/orgs/MKS-teamninja/people/jackjhall22

Matthew DuBose - https://github.com/orgs/MKS-teamninja/people/mjdubose

Vidush Rana - https://github.com/orgs/MKS-teamninja/people/Vidushr

Acknowledgments

Gilbert Garza for the React catapult project starter code!

teamninja's People

Contributors

scko823 avatar ryannewton avatar jackjhall22 avatar fitzpatrick1 avatar adamsmith910 avatar madakkak avatar vidushr avatar mjdubose avatar mboraski avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.