{"id":15476830,"url":"https://github.com/mahammad-mostafa/topics-blog","last_synced_at":"2026-01-06T09:53:51.291Z","repository":{"id":212106949,"uuid":"725141094","full_name":"mahammad-mostafa/topics-blog","owner":"mahammad-mostafa","description":"This is the second project in the fifth module of the Microverse program. It is a web blog built using Ruby on Rails framework with PostgreSQL database.","archived":false,"fork":false,"pushed_at":"2023-12-17T03:33:50.000Z","size":283,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-02-02T13:51:23.223Z","etag":null,"topics":["cancancan","devise","gitflow-workflow","html-css","microverse","microverse-projects","microverse-ruby","microverse-students","mvc-architecture","oop-principles","postgresql","rails","relational-database","responsive-layout","rspec-rails","rubocop","ruby","ruby-on-rails","stylelint","unit-tests"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mahammad-mostafa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-29T14:22:04.000Z","updated_at":"2023-12-16T20:24:48.000Z","dependencies_parsed_at":"2023-12-15T18:26:35.560Z","dependency_job_id":"75724a73-4ff8-495f-9d84-fe7378e639cf","html_url":"https://github.com/mahammad-mostafa/topics-blog","commit_stats":null,"previous_names":["mahammad-mostafa/topics-blog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahammad-mostafa%2Ftopics-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahammad-mostafa%2Ftopics-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahammad-mostafa%2Ftopics-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahammad-mostafa%2Ftopics-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahammad-mostafa","download_url":"https://codeload.github.com/mahammad-mostafa/topics-blog/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246036670,"owners_count":20713273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cancancan","devise","gitflow-workflow","html-css","microverse","microverse-projects","microverse-ruby","microverse-students","mvc-architecture","oop-principles","postgresql","rails","relational-database","responsive-layout","rspec-rails","rubocop","ruby","ruby-on-rails","stylelint","unit-tests"],"created_at":"2024-10-02T03:41:20.340Z","updated_at":"2026-01-06T09:53:51.246Z","avatar_url":"https://github.com/mahammad-mostafa.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"title\"\u003e\u003c/a\u003e\n\n\u003c!-- TITLE --\u003e\n\n# 🏷️ Topics Blog\n\nThis is the second project of the fifth module in the **Microverse** program.\n\u003cbr/\u003e\nCheck the below contents for further details about this project.\n\n\u003c!-- CONTENTS --\u003e\n\n# 📗 Contents\n\n- [Description](#description)\n- [Instructions](#instructions)\n- [Authors](#authors)\n- [Future](#future)\n- [Contributions](#contributions)\n- [Support](#support)\n- [Acknowledgements](#acknowledgements)\n- [License](#license)\n\n\u003c!-- DESCRIPTION --\u003e\n\n\u003ca name=\"description\"\u003e\u003c/a\u003e\n\n# 📖 Description\n\nThis repository is about a user blog with posts \u0026 likes.\nUser authentication is required first.\nEvery post contains comments \u0026 likes.\nEach user displays (`name` / `photo` / `bio`) \u0026 number of his `posts`.\nEach post displays (`title` / `text`) \u0026 number of its `comments` \u0026 `likes`.\nPagination through posts using `kaminari` gem.\nIt is built using `Rails` framework with `Ruby`.\nThe project is configured to use `PostgreSQL` database.\nUnit tests are carried on models \u0026 controller requests using `RSpec`.\n\n📌 **Tech Stack:**\n- Programming language is `Ruby`\n- Database used is `PostgreSQL`\n- Framework used is `Rails`\n- Tests done with `RSpec`\n\n📌 **Key Features:**\n- Responsive layout to all screen sizes\n- Four database tables (`users` / `posts` / `comments` / `likes`)\n- One to many relation between `users` \u0026 `posts` tables\n- Both `comments` \u0026 `likes` are bridge tables for many to many relation between `users` \u0026 `posts` tables\n- Four model files (`User` / `Post` / `Comment` / `Like`)\n- Method `recent_posts` allows fetching the last three post for any user\n- Method `recent_comments` allows fetching the last five comments for any post\n- Private method `counter` auto increments the number of (`posts` / `comments` / `likes`) for the relevant owner table\n- Several attribute validation rules for `User` \u0026 `Post` models\n- Attributes (`name` / `title` / `posts_counter` / `comments_counter` / `likes_counter`) are required\n- Attribute `title` length must be smaller than or equal 250 characters\n- Attributes (`posts_counter` / `comments_counter` / `likes_counter`) must be an integer and greate than or equal zero\n- Unit tests for attribute validation rules and model methods\n- Implemented request tests on (`index` / `show`) methods for controllers (`UsersController` / `PostsController`)\n- Used `Capybara` gem to carry system tests on (`index` / `show`) action methods for controllers (`UsersController` / `PostsController`)\n- Built authentication with `Devise` gem before accessing any controller\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#title\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n\u003c!-- INSTRUCTIONS --\u003e\n\n\u003ca name=\"instructions\"\u003e\u003c/a\u003e\n\n# 🛠️ Instructions\n\nYou can easily download or fork this repository and work on it immadiately!\n\n📌 **Prerequisites:**\n- You need `Ruby` language \u0026 `PostgreSQL` database installed\n\n📌 **Installation:**\n- To get all required gem dependencies run\n```\nbundle install\n```\n- Create all required databases \u0026 table schemas with\n```\nrails db:setup\n```\n\n📌 **Development:**\n- Run live server using\n```\nrails server\n```\n- Manipulate \u0026 process models data through\n```\nrails console\n```\n\n📌 **Tests:**\n- Run all unit test with\n```\nbundle exec rspec -f d\n```\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#title\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n\u003c!-- AUTHORS --\u003e\n\n\u003ca name=\"authors\"\u003e\u003c/a\u003e\n\n# 👥 Authors\n\n📌 **Mahammad:**\n- [GitHub](https://github.com/mahammad-mostafa)\n- [Twitter](https://twitter.com/mahammad_mostfa)\n- [LinkedIn](https://linkedin.com/in/mahammad-mostafa)\n\n📌 **Zabihullah:**\n- [GitHub](https://github.com/ZabihullahNooriWardak)\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#title\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n\u003c!-- FUTURE --\u003e\n\n\u003ca name=\"future\"\u003e\u003c/a\u003e\n\n# 🔭 Future\n\nSome additional features I may implement in the project:\n- [ ] Integrate `React` framework in frontend\n- [ ] Implement (dark / light) theme switch\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#title\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n\u003c!-- CONTRIBUTIONS --\u003e\n\n\u003ca name=\"contributions\"\u003e\u003c/a\u003e\n\n# 🤝🏻 Contributions\n\nWish to contribute to this project?\n\u003cbr/\u003e\nContributions, issues, and feature requests are more than welcome!\n\u003cbr/\u003e\nFeel free to check the [issues](../../issues) page too.\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#title\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n\u003c!-- SUPPORT --\u003e\n\n\u003ca name=\"support\"\u003e\u003c/a\u003e\n\n# ⭐️ Support\n\nLike this project? Show your support by starring!\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#title\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n\n\u003ca name=\"acknowledgements\"\u003e\u003c/a\u003e\n\n# 🙏🏻 Acknowledgements\n\nI thank everyone at **Microverse** for guiding me through this project.\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#title\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n\u003c!-- LICENSE --\u003e\n\n\u003ca name=\"license\"\u003e\u003c/a\u003e\n\n# 📝 License\n\nThis project is [MIT](LICENSE.md) licensed.\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#title\"\u003eback to top\u003c/a\u003e\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahammad-mostafa%2Ftopics-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahammad-mostafa%2Ftopics-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahammad-mostafa%2Ftopics-blog/lists"}