KellyAH / friend-reminder-app

rails app thats reminds you to hang out with friends
0 stars 0 forks source link

Friend Reminder

This rails app helps you keep track of your friends and what events you attended together. In the future: It will send you email reminders for friends you have not spent time with in awhile.

Installation

The app runs on Ruby 2.5.3. and Rails 6.0.2.1.

Local Docker Environment

  1. Install Docker Desktop for Mac
  2. Go into the repo directory: cd [repo_name]
  3. run dev setup script: sh script/setup_dev_env.sh

This will start the rails server for the friend reminder app inside a Docker Container. And map the Rails server port inside the container to your local so you can see the app running in the container by going to:

It also mounts your local repo to the repo inside the container so changes made on your local are reflected in the running container.

To stop the server and the container it's running in: Ctrl+C

Troubleshooting

See if the container is running: docker container ls -a

To start the container and the rails server up again:

  1. Get the CONTAINER ID via: docker container ls -a
  2. start the rails server and the container it runs in: docker container start [CONTAINER ID]

To stop the rails server and the container it runs in: docker container stop [CONTAINER ID]

Start a shell running in the container to look at the files inside it: In a new terminal window run: docker container exec -it friend-reminder-app sh

Tail logs for the rails server inside the container via: docker container logs -f [CONTAINER ID]

About Docker

New to Docker? Learn the big picture here and about Dockerfiles here. Check out free video tutorials here [Docker reference] (https://towardsdatascience.com/15-docker-commands-you-should-know-970ea5203421)

Start Server

Local Docker Environment

Rails server automatically starts when running the container. See Local Docker Environment Setup.

Go to the Front End

In Local Docker Environment

on Production in Heroku

Run Tests

Unit Tests

Run all unit tests with: rspec

Local Testing sending emails

Use mailcatcher to test sending and catching emails on your local. Emails are sent via Mailgun.

Install mailcatcher and start the server

  1. gem install mailcatcher
  2. mailcatcher
  3. Go to the frontend at: http://127.0.0.1:1080/

Send an email using the rake task: rake mail:send_reminder or via rails console (NOT RECOMMENDED for local testing):

  1. rails c
  2. FriendReminderMailer.test_email.deliver_now

Codecov Report

After running unit tests, Open coverage/index.html in a web browser.

ToDo

See Friend-reminder-app Planning doc

What's done:

What still needs to be done:

Use Cases

As a user I can, go to an app FE and

As a user I can, edit email message settings

Other:

Minimum Viable Product

Envisioned Architecture