Skip to content

This API was built with Ruby on Rails for use on Real-Time Chat App. It uses Postgresql as the database. This is our dream team's first project!

Notifications You must be signed in to change notification settings

yokoworks/chatapp-api-with-rails

Repository files navigation

Real Time Chat API built with Ruby on Rails

About the Project

This API was built with Ruby on Rails for using on Real Time Chat App. It uses Postgresql as the database.

  • The database has 3 tables and models: User, Chatroom, Message
    • Users table has 'username' and 'password' columns
    • Chatrooms has 'name' column
    • Messages table is a through table having user_id, chatroom_id, and content columns

A list of commonly used resources that I find helpful is listed in the acknowledgments.

Built With

Live Demo

Live Link

Getting Started

To get a local copy up and running follow these simple example steps.

  1. On the project GitHub page, navigate to the main page of the repository.
  2. Under the repository name, locate and click on a green button named Code.
  3. Copy the project URL as displayed.
  4. If you're running the Windows Operating System, open your command prompt. On Linux, Open your terminal.
  5. Change the current working directory to the location where you want the cloned directory to be made. Leave as it is if the current location is where you want the project to be.
  6. Type git clone, and then paste the URL you copied in Step 3.
    e.g. $ git clone https://github.com/yourUsername/yourProjectName
  7. Press Enter. Your local copy will be created.
  8. To install all dependencies and necessary gems, run bundle install
  9. Run rails db:setup
  10. Run rails server to run rails application in your local server
  11. Run rspec to run rspec tests

How to allow the frontend app to interact with this API

  1. Go to puma.rb in config/initializers, and rewrite the port from 3000 to 3001 like below: e.g. port ENV.fetch("PORT") { 3001 }

  2. Go to cors.rb in config/initializers, and rewrite the origins path for your frontend path in both local and production

Entity relationship diagam(ERD)

ERD

Author

👤 Henok Mossissa

👤 David Bassey

👤 Yoko Saka

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Show your support

Give a ⭐️ if you like this project!

License

This project is MIT licensed.

Acknowledgements

About

This API was built with Ruby on Rails for use on Real-Time Chat App. It uses Postgresql as the database. This is our dream team's first project!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published