Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mattgomb/blog


https://github.com/mattgomb/blog

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# ๐Ÿ“— Table of Contents

- [๐Ÿ“– About the Project](#about-project)
- [๐Ÿ›  Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [๐Ÿš€ Live Demo](#live-demo)
- [๐Ÿ’ป Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [Deployment](#deployment)
- [๐Ÿ‘ฅ Authors](#authors)
- [๐Ÿ”ญ Future Features](#future-features)
- [๐Ÿค Contributing](#contributing)
- [โญ๏ธ Show your support](#support)
- [๐Ÿ™ Acknowledgements](#acknowledgements)
- [๐Ÿ“ License](#license)

# ๐Ÿ“– [Blog (rails app)]

**[Blog]** is going to be a fully functioning blog website. It will have all the classic functions and users will be able to interact with the website by adding posts, liking them, and commenting under them.

## ๐Ÿ›  Built With

### Tech Stack

Client

Server

Database

### Key Features

- [Data is processed in models]
- [Users can register]
- [Users can add posts]
- [Users can like posts and add comments]

(back to top)

## ๐Ÿš€ Live Demo

- [In progress...]

(back to top)

## ๐Ÿ’ป Getting Started

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

### Prerequisites

In order to run this project you need:
ruby version 2.7.0+
rails version 7+
PostgreSQL

### Setup

Clone this repository to your desired folder:

```
https://github.com/MattGomb/Blog.git
```

```
cd Blog
```

### Install

Install this project with:

```
bundle install
```

### Usage

This app uses postgreSQL databases for data preservation. Please provide valid credentials in a `.env` file and place it in the root folder.


To initialize database run:

```
rails db:create
```
```
rails db:migrate
```

To run the server, execute the following command:
```
rails s` or `rails server
```
this will start the server on http://localhost:3000/

To use the features of the app, you'll have to sign up using:

http://127.0.0.1:3000/users/sign_up

Once you sign up, you can log in from:

http://127.0.0.1:3000/users/sign_in

For API log in:

http://127.0.0.1:3000/api/v1/login

you ned to suply your email and pasword using JSON format in the body of the request as follows:

```
{
"email": "[email protected]",
"password": "yourpassword"
}
```

In the response of the request you will recieve a token that you will need to copy and will have 24 hours of validity. Please provide your token in the `Authorization` header of subsequent requests.

To list posts for a specific user in JSON format:

http://127.0.0.1:3000/api/v1/users/:user_id/posts

To list comments for a post in JSON format:

http://127.0.0.1:3000/api/v1/users/:user_id/posts/:post_id/comments

Use this last endpoint with POST method to create comments for a post. Provide the text of the comment in JSON format as follows:

```
{
"text": "your comment"
}
```

### Run tests

To run tests, run the following command:

```
rspec
```

### Deployment

You can deploy this project using:

**TBA**

(back to top)

## ๐Ÿ‘ฅ Author

๐Ÿ‘ค **Mรกtyรกs Gombos**

- GitHub: [@MattGomb](https://github.com/MattGomb)
- Twitter: [@MtysGombos1](https://twitter.com/MtysGombos1)
- LinkedIn: [LinkedIn](https://www.linkedin.com/in/gombos-matyas/)

๐Ÿ‘ค **Felipe Oyarzo**

- GitHub: [@jfoyarzo](https://github.com/jfoyarzo)
- LinkedIn: [LinkedIn](https://www.linkedin.com/in/jorge-felipe-oyarzo-contreras)

(back to top)

## ๐Ÿ”ญ Future Features

- [improved user interface]
- [reference posts]

(back to top)

## ๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](../../issues/).

(back to top)

## โญ๏ธ Show your support

If you like this project please consider giving it a star!

(back to top)

## ๐Ÿ™ Acknowledgments

We would like to thank [Microverse](https://www.microverse.org/) for the opportunity.

(back to top)

## ๐Ÿ“ License

This project is [MIT](./LICENSE) licensed.

(back to top)