Real time forum app
What this course is all about and what technologies we are going to use in this course.
Install laravel to get started.
If you want to have course source code, check this video for where I put project repository on github.
Create models for various tables we . will use in this project
Create migrations for questions table
Create migration for reply table
Create likes table and category table migration
Now create a mysql database and run migration to have all table on our database
Set up eloquent relationship for questions
Setup relationship between reply and user
setup question factory for creating dummy questions
Create factories for other models
create database seeding to start working with test data
Routes for questions for CRUD operation on it
Get all question we ahve on our database
Connect your route with model key name to fetch model data on the fly
Delete part of CRUD operation on Questions
Create part of CRUD operation on Question
Create a resource for question to transform the data giving to api
Update part of CRUD operation on Question
Store part of CRUD operation on Category
Read and Delete part of CRUD operation on Category
Update part of CRUD operation on Category
Showing all the replies for a given question
Store and Delete of Reply - CRUD operation
Transform data to be given for Category and Reply
Update part of CRUD operation on Reply Model
Create a system to like or Unlike anything on the project
Using JsonWebToken for authentication or login system.
Seting up JWT on Laravel and create its AuthController
Checking that JWT is valid or not for a given user
Using JWT to identify user and register them on our database
Create a middleware to check for jwt and authentication of user
Lets handle some exception if thrown by laravel
Using Vuetify - a material frontend for vuejs components.
Create your first component to start with
Footer and toolbar using vuetify component.
Lets use Vue Router to make our app, a single page application
Create a login component so make user login on our project
Continue on creating login component
Getting JWT token on successfull login and store it safely
Another helper class to manage localstorage of browser
Checking if token is valid, if token is generated from api or not.
Storing token and username on LocalStorage, so that everytime we can fetch user details from localstorage
Create Login and Logout helper class to manage both
Now lets work on signup component
Lets handle any validation error from laravel while user trying to register on our app
We need to login the user who has just registered.
Redirect user when he has successfully logged in to our app
Login information for authenticated user
Logout Authenticated User
Let's create forum component for forum
Getting all the questions from Laravel
Fetch that question only which user is clicked
Display that question with proper styling
Lets now store a new question.
Add a markdown editor to create question
JWT token has to be passed for every request.
We need to create a url friendly slug for question
We need a markdown parser to parse question which is stored in markdown syntax to our database
Check whether the question is created by logged In user or not
Very important that the question owner can only delete that question
User has the ability to update his question.
Update the question at laravel end
Fetch the category lists
Lets now store new category to our database
Let's show all categories to the user
Remove category from the database
Lets now update category to our database
Categories can only be accessed by admin user
Every question has many replies, so let's fetch all
Properly show all the replies under the question
Reply can be edited or deleted by reply owner
creating a reply for a specific question
Remove reply from the database
Give the ability to update reply
Continue on updating reply
Start working on like and unlike system
Let's create a system to like a reply
Store like information to our database using laravel
Let's work on the notification system for the user
Let's send the notification to the connected user
Show notification with an icon to the user
Mark notification as read
Start to work on a real-time system using the pusher. Later we will use laravel WebSocket which provide free real-time system
Whenever someone like any reply, this must reflect every user who is online in real-time
Increment like numbers in real time
Broadcasting notification for the real time system
Send JWT token to pusher for authentication on real time system
Create facebook type notification which notifies in real time.
Checking if the token is expired or not and then log out the user if the token is expired.
What if the user has created a random string in local storage.
Now handle invalid token passed
If the user is not logged in the there is no sense of showing new reply button to them
Let's show reply count on own forum for each question.
Make Home page look good by adding an image with the parallex system
Validate data for questions and category store part by using laravel form request
If data passed is not correct then we need to show validation error on the user end
Play sound whenever a new notification is triggered
Pusher is a paid service but laravel websocket package is free to use. So now let's convert our application into laravel websocket package from the pusher
Setting up laravel webocket package
Finalizing laravel WebSocket package