An example chat app to illustrate the usage of kitar/laravel-dynamodb.

Last update: Jul 1, 2022

Simplechat

An example chat app to illustrate the usage of kitar/laravel-dynamodb.

Demo

https://demo.simplechat.app/

This demo app is deployed with Laravel Vapor and Soketi Serverless.

Create a DynamoDB table

Create a DynamoDB table (it's a single table) with the following conditions:

  • Partition key: PK (string)
  • Sort key: SK (string)
  • Global secondary indexes
    • GSI1
      • Index name: GSI1
      • Partition key: GSI1PK (string)
      • Sort key: GSI1SK (string)
    • GSI2
      • Index name: GSI2
      • Partition key: GSI2PK (string)
      • Sort key: GSI2SK (string)

Create IAM for interacting with DynamoDB. The policy will be like below:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "dynamodb:GetItem",
                "dynamodb:PutItem",
                "dynamodb:UpdateItem",
                "dynamodb:DeleteItem",
                "dynamodb:Scan",
                "dynamodb:Query"
            ],
            "Resource": [
                "arn:aws:dynamodb:ap-northeast-1:705561772438:table/your-table-name",
                "arn:aws:dynamodb:ap-northeast-1:705561772438:table/your-table-name/index/*"
            ]
        }
    ]
}

Installing the project

Clone the repo locally:

git clone https://github.com/kitar/simplechat.git simplechat
cd simplechat

Setup configuration:

cp .env.example .env

Open .env file and configure the DB_DEFAULT_TABLE and AWS_*.

  • DB_DEFAULT_TABLE DynamoDB table name you've created.
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION

Install PHP dependencies:

composer install

Install NPM dependencies:

npm install

Build assets:

npm run dev

Generate application key:

php artisan key:generate

Run the dev server (the output will give the address):

php artisan serve

Installing soketi

Install:

npm install -g @soketi/[email protected]

Open a new terminal window and let it run in the background:

soketi start

That's it!

Now you can visit http://127.0.0.1:8000 with your browser, create a chat room, and start chatting.

You can use the following artisan commands to manage the data.

  • user:list
  • user:delete {uuid} {--with-data}
  • room:list {--user=}
  • room:delete {roomId}
  • message:list {--room=} {--user=}

Built with awesome tools

GitHub

https://github.com/kitar/simplechat
You might also like...

A simple blog app where a user can signup , login, like a post , delete a post , edit a post. The app is built using laravel , tailwind css and postgres

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Mar 6, 2022

Laravel Video Chat using Socket.IO and WebRTC

Laravel Video Chat Laravel Video Chat using Socket.IO and WebRTC Installation composer require php-junior/laravel-video-chat Laravel 5.5 uses Package

Jun 17, 2022

A Multi User Chat Application With Laravel and Livewire

A Multi User Chat Application With Laravel and Livewire

A Multi User Chat Application With Laravel and Livewire. where you can chat with multiple frinds at the same time. i build this with php Laravel and Livewire.

Jun 7, 2022

Laravel Chat System

Laravel Chat System

Pre-build Laravel chat package. You can use this package to create a chat/messaging Laravel application or you can use the pre-build front-end part to kick-start your project.

Mar 7, 2022

A web app for detecting backend technologies used in a web app, Based on wappalyzer node module

About Techdetector This a web fingerprinting application, it detects back end technologies of a given domain by using the node module wappalyzer. And

Dec 21, 2021

Live Helper Chat - live support for your website. Featuring web and mobile apps, Voice & Video & ScreenShare. Supports Telegram, Twilio (whatsapp), Facebook messenger including building a bot.

Live helper chat It's an open-source powered application, which brings simplicity and usability in one place. With live helper chat you can bring live

Jun 29, 2022

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Apr 20, 2022

Laravel Breadcrumbs - An easy way to add breadcrumbs to your @Laravel app.

Introduction Breadcrumbs display a list of links indicating the position of the current page in the whole site hierarchy. For example, breadcrumbs lik

Jun 12, 2022

Laravel Podcast is Laravel 5.5 web app that enables you to manage RSS feeds for your favorite podcasts and listen to the episodes in a seamless UI and User Authentication.

Laravel Podcast is Laravel 5.5 web app that enables you to manage RSS feeds for your favorite podcasts and listen to the episodes in a seamless UI and User Authentication.

Laravel Podcast is Laravel 5.5 web app that enables you to manage RSS feeds for your favorite podcasts and listen to the episodes in a seamless UI and

Apr 6, 2022
A Laravel chat package. You can use this package to create a chat/messaging Laravel application.
A Laravel chat package. You can use this package to create a chat/messaging Laravel application.

Chat Create a Chat application for your multiple Models Table of Contents Click to expand Introduction Installation Usage Adding the ability to partic

Jul 2, 2022
An example of multi-domain/subdomain app in Laravel.
An example of multi-domain/subdomain app in Laravel.

?? UPDATE A better example with online demo: https://github.com/laravel-101/multi-domain-laravel-app Multi-Domain Laravel App An example of multi-doma

Jun 27, 2022
Laravel Real-time chat app demo with React, Laravel Echo, Breeze, Socket.io, Redis, Inertia.js, TailwindCSS stack.

Laravel Real-time Chat App You can build yours from scratch with the following Medium article https://medium.com/@sinan.bekar/build-a-real-time-chat-a

May 24, 2022
Log requests and group together for aggregated statistics of route usage
Log requests and group together for aggregated statistics of route usage

Log Laravel route usage statistics Log Laravel requests and responses for statistical purposes and optionally aggregate by hours/days/months for minim

Jun 18, 2022
Example of using abrouter/abrouter-laravel-bridge in Laravel
Example of using abrouter/abrouter-laravel-bridge in Laravel

ABRouter Laravel Example It's a example of using (ABRouter Laravel Client)[https://github.com/abrouter/abrouter-laravel-bridge] Set up locally First o

Oct 14, 2021
A Laravel 5.1 ORM example with Nerds as users.

laravel-nerds A Laravel 5.1 ORM example with Nerds as users. App Features Show all Nerds Add a Nerd Edit a Nerd Delete a Nerd Keeps Nerd's Name Keeps

Dec 14, 2019
Laravel 9 Livewire Multiple Image Upload Example
Laravel 9 Livewire Multiple Image Upload Example

Laravel livewire multiple image upload; Through this tutorial, i am going to show you how to upload multiple image using livewire in laravel apps.

Feb 23, 2022
Laravel 7 Ajax Pagination Example

Now, let's see post of Laravel ajax pagination with jQuery. We will look at example of Laravel pagination json. In this article, we will implement a jQuery ajax pagination in Laravel . You can understand a concept of Laravel ajax bootstrap pagination. Here, Creating a basic example of pagination jQuery ajax Laravel

Feb 23, 2022
A quick and incomplete example of how to validate a form using a FormValidator class on the simple-mvc
A quick and incomplete example of how to validate a form using a FormValidator class on the simple-mvc

Simple MVC Description This repository is a simple PHP MVC structure from scratch. It uses some cool vendors/libraries such as Twig and Grumphp. For t

Nov 24, 2021
Example of using TALL stack to select country phone code.
Example of using TALL stack to select country phone code.

Select country phone code using TALL stack About Example of using TALL stack to select country phone code. Each item represents a country. Each item h

Jan 28, 2022