Skip to content

It is a Lifestyle application. where Authors can post on several categories like Business, Sport, Entertainment, Fashion and so on. A reader can read an article and Upvote that article. A user(reader) can view authors, see the number of articles and the number of Upvotes an article has received. The most popular article(by highest upvote) gets a…

Haroonabdulrazaq/postspot

Repository files navigation

PostSpot

It is a Lifestyle aplication, where Authors can post on several category like Bussiness, Sport, Entertainment, Fashion and so on. A user can read an article and Upvate that article. A user(reader) can view authors , see the number of article and the number of Upvote an Author has recieved. The most popular article(by highest upvote) gets an incentive of been on the front-page/banner of the application as the most popular article. Other category are showcased below as the most recent in each category.

Screenshot 📷

screenshot

Built With ❤️

  • Ruby v2.7.0
  • Ruby on Rails v5.2.4
  • Postgres 12.0

Live Demo 🚀

PostSpot

Work Done 💻

  • The user logs in to the app, only by typing the username and password, after sign up
  • Featured article with full-width image and title in the first row. which represents an article with the biggest number of votes.
  • List of all categories in order of priority. Each category is displayed as a square with its name on the top and its most recent article's title in the bottom.
  • When the user clicks the category name they can see all articles in that category.
  • Each page use the same top menu and footer
  • When the user opens Create a new article

Getting Started

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

  • Fork the repository on github
  • Change directory into the repository
  • Install all gems
  • Create Database
  • Run migration

Prerequisites

  • Ruby: 2.6.3
  • Rails: 5.2.3
  • Postgres: >=9.5
  • Bulma

Setting up Postgres

Read this to set up postgres for development or simply start project with rails new app_name --database=postgresql

Setup 🔧

Instal gems with:

bundle install

Setup database with:

To configure your databse.yml make this changes in config/database.yml

   default: &default
    adapter: postgresql 
    encoding: unicode 
    timeout: 5000 

    development: <<: *default 
    database: development 
    
    test: <<: *default 
    database: test

    production: <<: *default 
    database: production

Then run

   yarn install --chack-files
   rails db:create
   rails db:migrate
Start server with:
    rails server

Entity Relationship Diagram(ERD)

screenshot

Test

   rails spec

Set up Repo for testing

  • How to setup – RSpec, Capybara, Shoulda-Matchers, Database Cleaner
  • How to create a factory using Factory Girl Rails and Faker, you you can read more for details

Active Storage Setup - Optional

AWS S3 buckets was used for active storage in production and development. Follow this tutorial to learn how to set up AWS S3 for active storage.

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

    rpsec --format documentation

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.

Deployment

Heroku

✒️ Author

👤 Haroon Abdulrazaq

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the fork this repo and create pull request if you want to make changes.

Show your support 💪

Give a ⭐️ if you like this project!

👍 Acknowledgements

MIT Licence ®️

MIT License

Copyright (c) 2020 Haroon Abdulrazaq

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.

About

It is a Lifestyle application. where Authors can post on several categories like Business, Sport, Entertainment, Fashion and so on. A reader can read an article and Upvote that article. A user(reader) can view authors, see the number of articles and the number of Upvotes an article has received. The most popular article(by highest upvote) gets a…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published