Code Monkey home page Code Monkey logo

blogapp's Introduction

Blog App

๐Ÿ“— Table of Contents

๐Ÿ“– Blog App

Blog App is the classic example of a blog website. This is a fully functional website that shows the list of posts and empower readers to interact with them by adding comments and liking posts.

๐Ÿ›  Built With

Tech Stack

Ruby
Rails
Database
RSpec
Linters

Key Features

  • Migration files that create a database based on a diagram

  • Models for each of the tables in the database

  • Methods that updates counters

  • Methods that alows to select recent comments and posts

  • RSpec unit test for the validations, associations, methods, requests

  • Routes and controllers

  • Views

  • Forms to add a comment and post

  • Add and delete a like

  • Integration specs for the views using Capybara

  • Pagination with kaminari gem

  • Devise gem

  • Letter_opener

(back to top)

๐Ÿ’ป Getting Started

This repository includes files with Ruby lenguage.

Prerequisites

In order to run this project you need to have install:

  • Ruby check this to install it.
  • Rails check this to install it.
  • Postgresql check this to install it.

Setup

Clone this repository to your desired folder:

  cd my-folder
  git clone https://github.com/AndreaM2429/BlogApp

Usage

You need to open the terminal and and navigate to the clone repository, run the commands to create the database and start the app:

  rails db:create
  rails db:migrate
  rails s

Navigate to http://localhost:3000 and see the functional app.

You can test the app from the terminal with:

  rails c

Try to run this commands and check the changes into your database.

  # Create users
  first_user = User.create(name: 'Tom', photo: 'https://unsplash.com/photos/F_-0BxGuVvo', bio: 'Teacher from Mexico.')
  second_user = User.create(name: 'Lilly', photo: 'https://unsplash.com/photos/F_-0BxGuVvo', bio: 'Teacher from Poland.')

  # Create a post from one user
  first_post = Post.create(author: first_user, title: 'Hello', text: 'This is my first post')

  # Create a comment for the post
  Comment.create(post: first_post, author: second_user, text: 'Hi Tom!' )

  # Create a like for the post
  Like.create(user: first_user, post: first_post)

To check the linters you can use the command:

  rubocop

To fix the linter use:

  rubocop --A

Tests

To run the test use the command:

  bundle exec rspec

Or just rspec, additional you can specify the path of one specific file if you don't want to run all the tests.

(back to top)

๐Ÿ‘ฅ Author

๐Ÿ‘ค Andrea Manuel

๐Ÿ‘ค Javier Grau

(back to top)

๐Ÿ”ญ Future Features

  • API documentation.

(back to top)

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

โญ๏ธ Show your support

If you like this project you could clone the repo and work with it or do the changes in a new branch. Also you could let a message with your thoughts.

(back to top)

๐Ÿ™ Acknowledgments

I would like to thank Microverse for providing the necessary resources for this project.

(back to top)

๐Ÿ“ License

This project is MIT licensed.

(back to top)

blogapp's People

Contributors

andream2429 avatar graujavier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.