- Php ^8.0.2
- MySQL ^5.7
- Composer
- Clone the repository
- Run
composer install
- Copy env.example.env to .env
- Run
php artisan key:generate
- Run
php artisan migrate
- Run
php artisan db:seed
- Configure your mail client in .env file
- Run
php artisan serve
to fire up your application. - Open your API client and go to http://localhost:8000/ to test your API.
api/v1/user/create
:POST
- Create a new User (Requiresname
,email
)api/v1/website/create
:POST
- Create a new Website (Requiresname
,url
)api/v1/user/{user}/website/subscribe
:POST
- User subscribes to a website (Requireswebsite_id
)api/v1/website/{website}/post/create
:POST
- Create a new post for a website (Requirestitle
,description
)
Note: Whenever a new post is published on a particular website, all the users who subscribed to that website will receive an email notification after running
php artisan posts:notify
which will push email jobs onto the queue , thenphp artisan queue:work
command to start the Queue worker.