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

Overview

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/soketi@latest

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

You might also like...
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

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

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

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.

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.

Video Chat application built using Metered Video SDK, with PHP Laravel Backend and JavaScript Front-End
Video Chat application built using Metered Video SDK, with PHP Laravel Backend and JavaScript Front-End

Group Video Chat App with PHP Laravel and JavaScript Powered by Metered Video SDK Overview This application is a highly scalable group video calling a

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

CV-Resumes-App is helped us to build resume .. you can help me to improve this app...

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

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

Comments
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

Tinashe Musonza 931 Dec 24, 2022
Laravel Rocket chat Debugher, push all logs to rocket chat channels

Laravel Rocket chat Debugher, push all logs to rocket chat channels

Novaday 4 Jun 13, 2022
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

DigitalWheat 204 Dec 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

Sinan Bekar 9 Oct 3, 2022
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

Bilfeldt 108 Dec 11, 2022
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

ABRouter 1 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

Jeremy Kenedy 6 Aug 20, 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

Wesley Sinde 3 Feb 23, 2022
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.

Wesley Sinde 3 Feb 23, 2022
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

Romain Clair 1 Nov 24, 2021