Giter Club home page Giter Club logo

wedding's Introduction

Rails App for Weddings and Similar Events

CI status

So you're getting married πŸŽ‰

This is a simple rails app for distributing wedding information and managing the guest list. You will probably decide to build your own (like me…) but if you like you can start with this one. It's been through at least one wedding successfully!

Is it any good?

THIS WEBSITE IS AWESOME! Best wedding invite ever. β€” One of our guests

Features

  • Guests can RSVP, including dietary requirements and plus ones
  • Guests can manage their own RSVPs using a secret link in an email (no user name / password needed)
  • Responsive design on home page and RSVP pages
  • Customizable styling and wording
  • Active Admin interface to manage the attendee list
  • Optional invisible reCAPTCHA integration to avoid spam
  • Sets headers to avoid being indexed by search engines

Contents

Table of Contents generated with DocToc

What does it look like?

Screenshot of the home page

How does it work?

Here's a map of all the flows through the app, from the home page to the RSVP flow and also some of the separate admin interface. Click here to expand the image. And here is a higher resolution PDF version.

Flow chart showing the application states.

Development

Initial Setup

The simplest way to get started is to use Docker.

git clone https://github.com/jdleesmiller/wedding.git
cd wedding
cp development.env.template development.env
docker-compose build
docker-compose up -d db
docker-compose run --rm web bash -lc 'bin/rails db:create db:migrate'
docker-compose run --rm web bash -lc 'bin/rails db:seed'

Watch the output of db:seed for the default admin credentials:

Admin user email: [email protected]
Admin user password: (random string)

Running the App

docker-compose up -d
docker-compose logs -f

By default, the app will run on http://localhost:3000

The admin interface is on http://localhost:3000/admin. Once you are logged into the admin, you can go to Admin Users, find the default admin user, and change its email address, if you like (you will need to re-enter the password).

To access the database:

docker-compose exec db psql wedding_development postgres

To get a shell:

docker-compose exec web bash

Once you have a shell in the container, you can run rails commands as normal.

bin/rails console
bin/rails test

Customization

You can of course customize everything by changing the code, but here are some useful places to start:

Content

Styling

  • app/assets/images β€” the images

    • jumbo.jpg is the title image at the top of the home page
    • rsvp.jpg is the title image at the top of the RSVP pages
  • app/assets/stylesheets/application.scss β€” theme colors and bootstrap customization

    $font-family-sans-serif: Montserrat, Helvetica, Arial, sans-serif;
    $font-family-serif: Arvo, Georgia, "Times New Roman", Times, serif;
    
    $font-family-base: $font-family-serif;
    $headings-font-family: $font-family-sans-serif;
    
    $body-color: rgba(28, 13, 10, 0.7);
    $headings-color: rgba(28, 13, 10, 0.7);
    
    $theme-colors: (
      "primary": #ff745c
    );
    
    $enable-rounded: false;

Environment Variables

  • CANONICAL_URL β€” your website's domain, e.g. www.mywedding.com
  • CONTACT_EMAIL β€” the email address that users can use to contact you, e.g. [email protected]
  • FROM_EMAIL β€” the email address that confirmations emails will come from

Sending Email

There are environment variables that correspond to each smtp_settings key in the ActionMailer config.

  • SMTP_ADDRESS β€” name of the SMTP server
  • SMTP_PORT β€” port the SMTP server listens on (default 587)
  • SMTP_DOMAIN β€” HELO domain, if required
  • SMTP_USER_NAME β€” user name for SMTP server
  • SMTP_PASSWORD β€” password for SMTP server
  • SMTP_AUTHENTICATION β€” authentication type (default plain)
  • SMTP_ENABLE_STARTTLS_AUTO β€” automatically detect if STARTTLS is enabled and use it if so (default true)

ReCAPTCHA

If set, the website will use an invisible reCAPTCHA to prevent spam. You can get these from Google reCAPTCHA's admin page. Be sure to choose "Invisible" for the type.

  • RECAPTCHA_SITE_KEY β€” the data-sitekey for the Client side integration
  • RECAPTCHA_SECRET_KEY β€” the secret for the Server side integration

Deployment

Heroku makes it easy to deploy rails apps like this one. The free postgres database is enough, unless you have > 10k guests! You can set up a Heroku app and connect it to your GitHub repo.

You must set the canonical host and email addresses in order to be able to send email:

heroku config:set \
  CANONICAL_HOST=www.mywedding.com \
  CONTACT_EMAIL='Example Name <[email protected]>' \
  FROM_EMAIL='Example Name <[email protected]>'

You will also need to set up SMTP by setting the config variables above. One way to do this is to use your Google Mail account's SMTP server.

Then you can get up and running with:

heroku run rails db:migrate db:seed

Watch the output of db:seed for the default admin credentials, like in development. The admin console will be available on /admin.

If you like, you can also turn on reCAPTCHA, as above.

heroku config:set \
  RECAPTCHA_SITE_KEY=... \
  RECAPTCHA_SECRET_KEY=...

License

BSD License

Related Projects

I'm not the first rails developer to build a wedding website:

Credits

Thanks to @Hopet for help with design and copy.

Design

The default design is based on https://naomi-demo.squarespace.com/ .

Photos

The photos for the demo are from Pexels:

wedding's People

Contributors

dependabot[bot] avatar jdleesmiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wedding's Issues

permission denied

What version of this package are you using?
MASTER
What operating system, Node.js, and npm version?
Docker compose - ubuntu
What happened?
ran docker-compose run --rm web bash -lc 'bin/rails db:create db:migrate' as part of the instructions
receive the following error
Errno::EACCES: Permission denied @ rb_sysopen - /home/app/wedding/db/schema.rb

Creating wedding_web_run ... done
Rails Error: Unable to access log file. Please ensure that /home/app/wedding/log/development.log exists and is writable (ie, make it writable for user and group: chmod 0664 /home/app/wedding/log/development.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

dug a bit deeper, seems the dockerfile is running nodejs 10 and ruby is behind...not sure if related but either way. cant build.

What did you expect to happen?

Are you willing to submit a pull request to fix this bug?

Send email for RSVP not working

Hello, I use I have problems with sending emails when a guest has signed up. I started the app with the docker-compose up -d command. It runs on an Ubuntu server 21.04 LTS. I have opened the ports 3000, 5432 and 465 in the internal firewall ufw and my router for the server. I can access the site externally and operate everything. only the email dispatch for RSVP does not work. I use gmail as SMTP server.
my development.env looks like this:

CANONICAL_HOST=www.myname.com
CONTACT_EMAIL=[email protected]
FROM_EMAIL=[email protected]
SMTP_ADDRESS=smtp.gmail.com
SMTP_PORT=465
SMTP_DOMAIN=gmail.com
SMTP_USER_NAME=[email protected]
SMTP_PASSWORD=password
SMTP_AUTHENTICATION=login
SMTP_ENABLE_STARTTLS_AUTO=true
SEND_EMAIL_IN_DEVELOPMENT=true

the output from the log says:
GuestMailer#welcome_back_email: processed outbound mail in 532.8ms
web_1 | Sent mail to [email protected] (23.5ms)

database "wedding_development" does not exist

Hi, after restarting the container with the docker compose command this happens each time:

web_1 | ActiveRecord::NoDatabaseError (FATAL: database "wedding_development" does not exist

The database is corrupt and not call or accessable from browser or CLI .
The solution is to build the container again, but after restart the same error comes again.

I followed the instructions from the wiki step by step.
Any ideas ?

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.