/ror-lifestyle-app

PetsLifestyle is a web application where users can write an article about their pets and they can also vote and comments on the article. Built with Ruby on Rails.

Primary LanguageRuby

RoR Capstone: !PeTsLifestyle App

screenshot Articles under a category page screenshot

This is the RoR Capstone project. The main goal for this project was to build a lifestyle article app by using Given Design and completing the requirements mentioned in the project requirement. !PeTsLifestyLE The website is about reading and writing an article about pets. Users can also vote and comment on an article but to do that users need to signup and login.

Features

  • User signup and log in using name only (Name must be unique)
  • Create Category
  • Create Article
  • Add an image to an article during article creations
  • proper validations on form fields.
  • Display a Home page with a list of categories with the most recent article.
  • User can vote for an article.
  • User can comment on an article [Extra Feature].
  • The article which has the biggest number of votes will be displayed on the Home page.
  • Category page displays all the articles under that category.

Built With

  • Ruby v2.7.2
  • Ruby on Rails v5.2.4
  • Bootstrap

Live Demo

Checkout the live demo at Live

Getting Started

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

  1. If you're running the Windows Operating System, open your command prompt. On Linux, Open your terminal.

  2. Copy and paste the following code into the Terminal:

    https://github.com/Div685/ror-lifestyle-app.git

  3. Press Enter.

  4. Once the repository has been cloned, navigate inside the repository

  5. After you will need to update and install some of the depedency. Use following command to install the packages

  • bundle install
  • yarn install
  • rails db:create
  • rake db:migrate
  1. once you install the packages and migrate the database you can run the server
  • rails s or rails server
  1. Enjoy

Prerequisites

Ruby: 2.7.2 Rails: 5.2.3 Postgres: >=9.5

Setup

Instal gems with:

bundle install

Setup database with:

   rails db:create
   rails db:migrate

Github Actions

To make sure the linters' checks using Github Actions work properly, you should follow the next steps:

  1. On your recently forked repo, enable the GitHub Actions in the Actions tab.
  2. Create the feature/branch and push.
  3. Start working on your milestone as usual.
  4. Open a PR from the feature/branch when your work is done.

Usage

Start server with:

    rails server

Open http://localhost:3000/ in your browser.

Run tests

    rspec --order defined --format documentation
  • Please Add --order defined flag if you runnig all the tests at once.
  • you can also run test individually by specifying file name e.g rspec spec/models/like_spec.rb

Tests will be added by Microverse students. There are no tests for initial features in order to make sure that students write all tests from scratch.

Authors

👤 Divyesh Patel

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments