/postcard-creator

Send your own personalized greeting card to friends and loved ones — with the easy, no-fuss greeting card generator.

Primary LanguagePHP

Greetings, World!

Synopsis

Greetings, World! is a simple-to-use postcard creator. It takes any image or screenshot and converts that to a digital 4 x 6 postcard.

Steps

  1. The user uploads a photo via drag & drop, file upload, or web camera.
  2. The greeting card generator determines the shape up the uploaded image and orients itself landscape or portrait, cropping the image to a 4 x 6 postcard.
  3. The user can then choose from a selection of designs with custom font type, color, and positioning. They're encouraged to add a custom header and message to their postcard.
  4. When decided, they'll be asked to write an optional backside message, as well as some information about themselves, and the recipient.
  5. Finally, the postcard is emailed, and the greeting card generator resets.

All information except recipient data is saved for easy repetition.

Notes

All choices are kept on reset besides the form. This means the user can quickly reuse or edit the previous message on the theme of their choice before entering a new recipient.

All error messages are displayed at the top of the dropzone area for the user.

Events

The current list of PubSub Events Greetings, World! listens for are:

  • drag // a user drags a file into the window
  • dragend // a user stops dragging a file
  • fileUpload // a user chooses a file to upload
  • gcardSet // the image successfully uploads
  • gcardSave // the user finishes designing their postcard
  • reset // the app exits its current step
  • resetOver // the app returns to step one

Tests

A small directory tests/ can be found with a few images to upload. It includes one good image and three bad images (wrong file type, fake image, etc.).

Libraries

Webcamjs

CanvasTextWrapper.js

jQuery

  • 3.1.1
  • A feature-rich JavaScript library allowing for simple DOM manipulation chaining
  • The MIT License (MIT)
  • https://jquery.com

jQuery Flip

PHPMailer

Developer Notes

Greetings, World! is written in ES6 syntax and compiled & polyfilled with Babel. It uses Webpack as its module bundler of choice.

Installation

Greetings, World! can be run locally (up until emailing) or previewed at https://greetingsworld.us. Note: Chrome 47+ requires an SSL to access the webcam. View securely at https://greetingsworld.us, locally, or with Firefox.

License

The MIT License (MIT)

Copyright (c) 2020 Sam Kauffman hello@samvk.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributors

Greetings, World! is built by Sam Kauffman. You can contact me anytime at hello@samvk.com. You can also view my full portfolio for other projects at https://samvk.com. Thanks for reading!