GithubHelp home page GithubHelp logo

z2e3r40o / rails-with-gpg Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 171 KB

Example rails 6 application, deployable to heroku, that sends email pgp encrypted with user provided public key. Emails sent using mailgun.

Ruby 78.64% JavaScript 5.62% CSS 1.06% SCSS 0.27% HTML 14.40%

rails-with-gpg's Introduction

rails with gpg

Inspired by a feature I use on kraken.com.

Allow users to specify a PGP Public Key that will be used to encrypt emails sent to that user.

This repository contains a rails application that will gpg encrypt emails sent to users if they have a public key specified.

Key technologies used:

Other notable technologies used:

  • mailgun
  • devise 4
  • pg

The following describes the steps needed to get this repository running on heroku.

Get Running

  1. git clone [email protected]:z2e3r40o/rails-with-gpg.git
  2. Create a free dyno at heroku.com. Enable hobby dev postgres add on. Enable starter mailgun add on
  3. Edit line 21 of config/application.rb so that host = 'insert url to your heroku instance here'.
  4. heroku login
  5. git push heroku main:master
  6. Register new user at https://your-app-name-here.herokuapp.com/users/sign_up using your actual email
  7. Set your public key at https://your-app-name-here.herokuapp.com/users/edit
  8. Add the email you registered with to the Authorized Users section of mailgun
  9. Navigate to https://your-app-name-here.herokuapp.com/example_email/index
  10. Check inbox for encrypted email

Interesting Pieces

  1. Gemfile
  2. app/mailers/user_mailer.rb
  3. add_public_key_to_users.rb
  4. app/views/devise/registrations/edit.html.erb
  5. application.rb
  6. example_email_controller

Troubleshooting

  1. Not receiving email? Check heroku logs.
  2. Something else? File an issue and I will try to answer.

rails-with-gpg's People

Contributors

z2e3r40o avatar

Watchers

 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.