Simplechat
An example chat app to illustrate the usage of kitar/laravel-dynamodb.
Install / Use
/learn @kitar/SimplechatREADME
Simplechat
An example chat app to illustrate the usage of kitar/laravel-dynamodb.
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)
- Index name:
- GSI2
- Index name:
GSI2 - Partition key:
GSI2PK(string) - Sort key:
GSI2SK(string)
- Index name:
- GSI1
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_TABLEDynamoDB table name you've created.AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_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:listuser:delete {uuid} {--with-data}room:list {--user=}room:delete {roomId}message:list {--room=} {--user=}
Built with awesome tools
- Laravel
- DynamoDB
- Soketi
- Tailwind CSS
- Tailwind UI
- Alpine.js
- Trix
- and more...
Related Skills
canvas
352.2kCanvas Skill Display HTML content on connected OpenClaw nodes (Mac app, iOS, Android). Overview The canvas tool lets you present web content on any connected node's canvas view. Great for: -
tmux
352.2kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
claude-opus-4-5-migration
111.1kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
diffs
352.2kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
