Find your neighborhood before you find your apartment
If you're looking to explore or even relocate and community is an important factor, check out Delve.NYC! We provide a visual interpretation of important, quality of life information by neighborhood, including restaurant grades, population density and noise complaints.
D3 was used to draw the neighborhood boundaries from a geoJSON and to scale the appropriate colors for the choropleth map based on data from NYC’s official API. We have MongoDB in the back with Mongoose as an ODM for geospatial queries. By using D3, we have access to flexible processing for visual rendering of our data. By using MongoDB, our queries for points within a given geometric boundary are performant when required. We also used React hooks to manage state client-side and SASS to add styling.
- Fork this repo
- With PostgreSQL running,
npm install npm run start-dev
- Navigate to localhost:8080 on your browser
- Peter Crosta - GitHub - LinkedIn
- Ziv Karmi - GitHub - LinkedIn
- Adam Mak - GitHub - LinkedIn
- Eric Yang - GitHub - LinkedIn
Good things come in pairs
Looking to mix up a backend with
sequelize and a frontend with
Follow along with the boilerplate workshop to make your own! This canonical version can serve as a reference, or a starting point. For an in depth discussion into the code that makes up this repository, see the Boilermaker Guided Tour
To use this as boilerplate, you'll need to take the following steps:
- Don't fork or clone this repo! Instead, create a new, empty
directory on your machine and
git init(or create an empty repo on Github and clone it to your local machine)
- Run the following commands:
git remote add boilermaker https://github.com/FullstackAcademy/boilermaker.git git fetch boilermaker git merge boilermaker/master
Why did we do that? Because every once in a while,
be updated with additional features or bug fixes, and you can easily
get those changes from now on by entering:
git fetch boilermaker git merge boilermaker/master
Now that you've got the code, follow these steps to get acclimated:
- Update project name and description in
- Create two postgres databases (
MY_APP_NAMEshould match the
export MY_APP_NAME=boilermaker createdb $MY_APP_NAME createdb $MY_APP_NAME-test
- By default, running
npm testwill use
boilermaker-test, while regular development uses
- Create a file called
secrets.jsin the project root
- This file is listed in
.gitignore, and will only be required in your development environment
- Its purpose is to attach the secret environment variables that you will use while developing
- However, it's very important that you not push it to Github! Otherwise, prying eyes will find your secret API keys!
- It might look like this:
- This file is listed in
process.env.GOOGLE_CLIENT_ID = 'hush hush' process.env.GOOGLE_CLIENT_SECRET = 'pretty secret' process.env.GOOGLE_CALLBACK = '/auth/google/callback'
- To use OAuth with Google, complete the steps above with a real client
ID and client secret supplied from Google
- You can get them from the Google APIs dashboard.
Linters are fundamental to any project. They ensure that your code has a consistent style, which is critical to writing readable code.
Boilermaker comes with a working linter (ESLint, with
eslint-config-fullstack) "out of the box." However, everyone has
their own style, so we recommend that you and your team work out yours
and stick to it. Any linter rule that you object to can be "turned
.eslintrc.json. You may also choose an entirely different
config if you don't like ours:
npm run start-dev will make great things happen!
If you want to run the server and/or
webpack separately, you can also
npm run start-server and
npm run build-client.
From there, just follow your bliss.
Ready to go world wide? Here's a guide to deployment! There are two supported ways to deploy in Boilermaker:
- automatically, via continuous deployment with Travis.
- "manually", from your local machine via the
Either way, you'll need to set up your deployment server to start. The steps below are also covered in the CI/CD workshop.
- Set up the Heroku command line tools
- Add a git remote for heroku:
If you are creating a new app...
heroku create your-app-nameif you have a name in mind.
heroku addons:create heroku-postgresql:hobby-devto add ("provision") a postgres database to your heroku dyno
If you already have a Heroku app...
heroku git:remote your-app-nameYou'll need to be a collaborator on the app.
NOTE that this step assumes that Travis-CI is already testing your code.
Continuous Integration is not about testing per se – it's about continuously
integrating your changes into the live application, instead of periodically
releasing new versions. CI tools can not only test your code, but then
automatically deploy your app. This is known as Continuous Deployment.
Boilermaker comes with a
.travis.yml configuration almost ready for
continuous deployment; follow these steps to the job.
- Run the following commands to create a new branch:
git checkout master git pull git checkout -b f/travis-deploy
- Run the following script to finish configuring
npm run heroku-tokenThis will use your
herokuCLI (that you configured previously, if not then see above) to generate an authentication token. It will then use
opensslto encrypt this token using a public key that Travis has generated for you. It will then update your
.travis.ymlfile with the encrypted value to be sent with the
securekey under the
- Run the following commands to commit these changes
git add .travis.yml git commit -m 'travis: activate deployment' git push -u origin f/travis-deploy
- Make a Pull Request for the new branch, get it approved, and merge it into the master branch.
NOTE that this script depends on your local
origin Git remote matching
your GitHub URL, and your local
heroku remote matching the name of your
Heroku app. This is only an issue if you rename your GitHub organization,
repository name or Heroku app name. You can update these values using
git remote and its related commands.
There is a procedure to complete the above steps by installing the official Travis CLI tools. This requires a recent Ruby, but this step should not be, strictly speaking, necessary. Only explore this option when the above has failed.
That's it! From now on, whenever
master is updated on GitHub, Travis
will automatically push the app to Heroku for you.
Cody's own deploy script
Your local copy of the application can be pushed up to Heroku at will, using Boilermaker's handy deployment script:
- Make sure that all your work is fully committed and merged into your master branch on Github.
- If you currently have an existing branch called "deploy", delete
it now (
git branch -d deploy). We will use a dummy branch with the name
deploy(see below), so and the script below will error if a branch with that name already exists.
npm run deploy_ this will cause the following commands to happen in order: _
git checkout -b deploy: checks out a new branch called
deploy. Note that the name
deployhere is not magical, but it needs to match the name of the branch we specify when we push to our
webpack -p: webpack will run in "production mode" _
git add -f public/bundle.js public/bundle.js.map: "force" add these files which are listed in
git commit --allow-empty -m 'Deploying': create a commit, even if nothing changed _
git push --force heroku deploy:master: push your local
deploybranch to the
git checkout master: return to your master branch _
git branch -D deploy: remove the deploy branch
Now, you should be deployed!
Why do all of these steps? The big reason is because we don't want our
production server to be cluttered up with dev dependencies like
webpack, but at the same time we don't want our development
git-tracking to be cluttered with production build files like
bundle.js! By doing these steps, we make sure our development and
production environments both stay nice and clean!