GithubHelp home page GithubHelp logo

simple-subscription's Introduction

Simple Subscription Platform

This repository is a small platform, to which the USER can subscribe to a special website. When the new post was published on the website, the subscriber will receive an email to notify with the post title and post content.

Include

  • Use PHP 7.* (i.e. use Laravel 8 as Laravel 9 requires PHP 8.0)
  • Write migrations for the required tables.
  • Endpoint to create a "post" for a "particular website".
  • Endpoint to make a user subscribe to a "particular website" with all the tiny validations included in it.
  • Use of the command to send email to the subscribers.
  • Use of queues to schedule sending in the background.
  • No duplicate stories should get sent to subscribers.

Database schema: https://pasteboard.co/9128d1zO4QLs.png

Installation

composer install

Setup environment

cp .env.example .env

Remember change information of database,base url, smtp...

Database Migration & Seed

php artisan migrate
php artisan db:seed

Running

Postman: https://www.postman.com/tuanhaviet22/workspace/inisev

Execute manually via CLI:

php artisan inisev:send

Note: This app using Google Gmail App is SMTP, so you need to account and password to using send mail function. I put demo account in .env.example

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=oidqtacpcoqvfsvt
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="${APP_NAME}"

simple-subscription's People

Contributors

tuanhaviet22 avatar

Stargazers

 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.