Coder Social home page Coder Social logo

teotimepacreau / express-newsletter Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 30.54 MB

Newsletter website built with NodeJS, Express and SQLite

Home Page: https://feuillu-newsletter.teotimepacreau.fr

JavaScript 37.61% CSS 22.69% Handlebars 38.07% Dockerfile 1.64%
express newsletter nodejs sqlite flyio newsletter-mail newsletter-signup subscription subscription-service emailgeeks unsubscription unsubscription-service

express-newsletter's Introduction

Express-Newsletter

A fully functional newsletter website, where you can subscribe and receive a welcoming email, and then receive periodically the newsletter. It also allows unsubscribing through a dedicated page.

newsletter-full.mp4

๐Ÿ› ๏ธ Built with :

  • CSS : all UI design is from me, container queries, variable font, grid, flexbox...
  • HTML : form best practice and validation, semantic...
  • Javascript : async/await, fetch API
  • NodeJS
  • Express
  • SQLite database and SQL queries

What I learned :

  • how to use Express
  • create and manage SQL database
  • handle HTTP requests and responses
  • work asynchronously and handle errors in Node.JS
  • setup backend routes and controllers
  • HTML emails (different support rules of the mail clients, specific CSS rules applying to it...)
  • create templating for content
  • organize a front-in-back architecture
  • deploy a front-in-back on an online server

In-depth details of the project :

  1. Subscription logic : Users can subscribe on homepage by filling and sending the form : lastName, firstName and email are added to SQLite Database. A notif confirms or infirms the subscription. An email confirms subscription and welcome new user.
  2. Unsubscription logic : Users can unsubscribe on the /unsubscribe page. It updates the database accordingly by removing. Checks if email is already in the DB, if not sends an error notif to user
  3. Newsletter Templates :
  • Each newsletter is created within a template using handlebars
  1. Composing Newsletters :
  • Each newsletter dynamically retrieve lastName and firstName to personalize the mail
  1. Sending newsletter :
  • Middleware retrieve subscribers' information from the SQL DB
  • Sendgrid npm package is used to send newsletters to the subscribers.
  1. Allowing the client to render the email in browser :
  • implemented a route that takes a query parameter to decide to render the "welcomeEmail" or the "newsletter" in a new tab.
  1. Scheduling Newsletter Sending:
  • Nodecron can send newsletters every Saturday. Not activating the function to not pollute email boxes of people trying the deployed version.
  1. Deploy on fly.io

express-newsletter's People

Contributors

teotimepacreau avatar

Watchers

 avatar

express-newsletter's Issues

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.