Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/m-anwar-hussaini/hello-rails-back-end


https://github.com/m-anwar-hussaini/hello-rails-back-end

Last synced: 16 days ago
JSON representation

Awesome Lists containing this project

README

        

Hello Rails Back-End

# πŸ“— Table of Contents

- [πŸ“— Table of Contents](#-table-of-contents)
- [ About the Project](#about-project)
- [πŸ›  Project Requirements](#project-requirements)
- [πŸ“– Hello Rails Front-End](#integration-with-hello-rails-front-end)
- [πŸ’» API Endpoints](#api-endpoints)
- [πŸš€ Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Run the Project](#run-the-project)
- [πŸ‘₯ Author](#authors)
- [πŸ”­ Issues](#issues)
- [🀝 Contributing](#contributing)
- [⭐️ Show Your Support](#️support)
- [πŸ“ License](#license)

# πŸ“– Hello-Rails-Back-End

*Hello Rails Back-End* is a Rails API app that provides random greetings through an API endpoint. This project meets the following requirements:

## πŸ›  Project Requirements

- Create a Rails API app called 'hello-rails-back-end'.
- Initialize the project with Git.
- Set up a Postgres database and create a table for storing messages.
- Populate the table with 5 different greetings.
- Create an API endpoint that selects a random greeting from the table.

## πŸ”— Integration with Hello Rails Front-End

The front-end link [Hello Rails Front-End](https://github.com/M-Anwar-Hussaini/Hello-React-Front-End) project.

(back to top)

### Key Features


  • Ruby on Rails framework


  • Use Linters to check code quality

    • Rubocop



  • MVC architectural/design pattern

  • Data persistent in PostgreSQL

  • RESTful API

(back to top)

## πŸ’» API Endpoints

- **GET `/api/v1/greeting/random_greeting`**
- Returns a random greeting from the database.

(back to top)

## πŸš€ Getting Started

To get the project up and running on your local machine, follow these steps.

### Prerequisites

Before you begin, make sure you have the following prerequisites installed on your system:

- Ruby: You need Ruby to run the Rails application.
- Bundler: Bundler is used to manage gem dependencies in your Ruby project.
- Postgres: You need Postgres as the database for the Rails app.

### Setup

Clone this repository to your desired folder:

```sh
git clone https://github.com/M-Anwar-Hussaini/Hello-Rails-Back-End.git
cd Hello-Rails-Back-End
```

Install gem dependencies:

```sh
bundle install
```

Set up the database:

```sh
rails db:create
rails db:migrate
rails db:seed
```

### Run the Project

To run the project, execute the following command:

```sh
rails server
```

The API will be accessible at `http://127.0.0.1:3000/api/v1/greeting/random_greeting`.

(back to top)

## πŸ‘₯ Author

πŸ‘€ **Anwar Hussaini**
- GitHub: [Anwar Hussaini](https://github.com/M-Anwar-Hussaini/)

(back to top)

## πŸ”­ Future Features

Upcoming improvements:

- [ ] Add the endpoints to create greeting
- [ ] Deploy the application

(back to top)

## πŸ”­ Issues

Find a bug or have a feature request? [Open a new issue](https://github.com/M-Anwar-Hussaini/Hello-Rails-Back-End/issues) here on GitHub.

(back to top)

## 🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/M-Anwar-Hussaini/Hello-Rails-Back-End/issues).

(back to top)

## ⭐️ Show Your Support

If you find this project helpful, please consider starring the repository. Your support is greatly appreciated!

(back to top)

## πŸ“ License

This project is licensed under the MIT License - see the [LICENSE.md](./LICENSE) file for details.

(back to top)