weHike is based on my finals project, weRun, for the Lighthouse Labs web development bootcamp.
Background: I worked on weRun with Marianne and together we created an amazing app that helped me learn so much along the process. Here is the original repo.
However, I wanted to add more features to the app and put my own little twist on it! My husband and I often go hiking with our dog and I thought it would be fun to change over this app to track hiking events instead of running events. It uses the same backend architecture from werun.
This app uses React and Bootstrap on the front-end and Express, PostgreSQL and Node on the back-end. Multiple packages and APIS were used to make the user experience smoother, such as Recoil, Google Autocomplete and Google Maps. Twilio is currently being used to send users important information via text messaging.
Live link: weHike
- The location selection for hikes autumatically calculates the distance between point A and point B.
- A route is visible to the user prior to creating a new hike.
- Time for past hikes can now be recorded.
-
This screenshot shows a map that centers on the user's current location to allow them to find hiks near them more easily.
-
This screenshot shows the marker for a hike and details of the hike.
-
This screenshot shows what happens when a user hits the join button for a hike. The user will also receive a text message confirming their attendance to the event.
-
This screenshot shows the hike creation page where users can find the exact to and from location & distance for their hike.
-
This screenshot shows the new hike that was created under the user's profile under the planned tab.
-
This screenshot shows the new hike's additional details such as the exact route, time and date.
-
This screenshot shows the user's profile with their hiking statistics as well as a planned and attended tab for them to keep track of their events.
-
This screenshot shows the sign in page.
- This screenshot shows the sign up page.
- axios
- bootstrap
- dotenv
- google-map-react
- react
- react-bootstrap
- react-datepicker
- react-dom
- react-router-dom
- react-scripts
- recoil
- recoil-persist
Back-end: link
- bcryptjs
- body-parser
- cookie-session
- dotenv
- express
- nodemon
- pg
- twilio
These instructions are for setting up a local PostgreSQL database. You will need to tweak the server routes and database files to be able to use your local database.
The live version of this app is hosted on Netlify and uses an API for a database on the Supabase platform and the server is hosted on heroku. Long story about how I ended up going this way. Needless to say, I'm still learning the most efficient ways to do this!
git clone
this project.- Install all dependencies using
npm install
in the terminal. - Type the
npm start
command.
git clone
the project at this link.- Install all dependencies using
npm install
in the terminal.
- Create a .env file in the root of the directory like the .env.example file and add your own database credentials for DB_USER, DB_PASS & DB_NAME
- Next, we will need to create the database itself. Start PostgreSQL by using the
psql
command in your CLI. - Create the database using
CREATE DATABASE your-db-name;
command, but make sure to use the database name you used for the DB_NAME variable in the .env file. - Add tables to the database by typing
\i db/schema/01_schema.sql
in the terminal. - Add seed data to the database by typing
\i db/seeds/01_seeds.sql
in the terminal.
If the database credentials are setup properly, you should be able to connect to the db using \c your-db-name
The database must be initialized with new tables and some seed data next.
A few errors that can occur while setting up a PostgreSQL database:
Role mismatch: Check existing roles for your machine with \du
. If your-role you used in the .env file does not exist, it will not show up and you will have to create one with the following command CREATE ROLE your-role WITH SUPERUSER;. Note that your current role must be superuser to be able to create a new role.
Password mismatch: Check how you have set up psql on your machine to sort this one.
Missing .env file: You need a .env file with your own credentials to be able to connect to the database. Use the .env.example file to create the .env file.
Once the database is fully set up, type the npm start
command.
- A button on the planner tab to notify runners of any changes related to the running event, such as cancelation or time change.
- A way for runners to record and track their time, possibly using an API from Fitbit, Strava or Apple Health.
- Allowing users to change their profile picture.
- The profile picture is a static image from the server.
- This application hasn't been tested on other browsers besides Google Chrome yet.