It's an experimental chat application api using ruby on rails. Used many other tools and technologies to make it more efficient and easy to use like: redis, sidekiq, docker, docker-compose, elasticsearch, etc.
- Users can create new application (new client account)
- User can update application client name
- User can list all applications
- Users can create new chat room
- Users can send messages to chat room
- Users can see messages in chat room
- Users can search messages in chat room
- Ruby 3.3.0
- Rails 7.0.0
- Redis
- Sidekiq
- MySQL
- Docker
- Docker Compose
- Clone the repository
git clone REPO_URL
- Install dependencies
bundle install
- Create database
Note: Make sure you have MySQL installed and running on your machine. and update the database.yml file with your database credentials.
rails db:create
rails db:migrate
- Start the server
Note: Make sure you have elasticsearch installed and running on your machine so that you can search messages.
rails s
- Start sidekiq
Note: Make sure you have Redis installed and running on your machine.
bundle exec sidekiq
You can also run the application using docker and docker-compose.
docker compose up --build
[POST] /applications
{
"name": "Application Name"
}
[PUT] /applications/:token
{
"name": "Application Name"
}
[GET] /applications
[POST] /chats
{
"token": "bdce0a6ebd1506248f77d77aa20c4581"
}
[GET] /chats
[POST] /chats/:chat_id/messages
{
"token": "bdce0a6ebd1506248f77d77aa20c4581",
"message": "Hello World",
"chat_number": 1
}
[GET] /applications/:token/:chat_number/messages
[GET] /applications/:token/:chat_number/messages/search?q=:query
This project is open-sourced software licensed under the MIT license.