{"id":15483739,"url":"https://github.com/iank-code/inventory-management-rails","last_synced_at":"2025-05-14T02:15:04.850Z","repository":{"id":240230878,"uuid":"802047187","full_name":"Iank-code/Inventory-Management-Rails","owner":"Iank-code","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-19T13:38:38.000Z","size":137,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-19T14:37:56.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Iank-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-05-17T12:19:36.000Z","updated_at":"2024-05-20T20:28:11.075Z","dependencies_parsed_at":"2024-05-19T14:49:20.275Z","dependency_job_id":null,"html_url":"https://github.com/Iank-code/Inventory-Management-Rails","commit_stats":null,"previous_names":["iank-code/inventory-management-rails"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iank-code%2FInventory-Management-Rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iank-code%2FInventory-Management-Rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iank-code%2FInventory-Management-Rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iank-code%2FInventory-Management-Rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Iank-code","download_url":"https://codeload.github.com/Iank-code/Inventory-Management-Rails/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254053742,"owners_count":22006772,"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":[],"created_at":"2024-10-02T05:20:35.389Z","updated_at":"2025-05-14T02:15:04.812Z","avatar_url":"https://github.com/Iank-code.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Product Management Application\n\nThis is a Ruby on Rails application for managing products. It includes features such as creating, viewing, editing, and deleting products. The application uses Turbo Streams for real-time updates, allowing changes to be reflected on all connected clients without needing to refresh the page.\n\n## Features\n\n- Create, read, update, and delete products\n- Real-time updates using Turbo Streams\n- Basic validation for product attributes\n\n## Requirements\n\n- Ruby 3.0\n- Rails 7.1.3.3\n- SQLite3\n\n## Getting Started\n\nFollow these instructions to get a copy of the project up and running on your local machine.\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n- Ruby 3.0\n- Rails 7.1.3.3\n- SQLite3\n\n### Installation\n\n1. **Clone the repository:**\n\n    ```sh\n    git clone git@github.com:Iank-code/Inventory-Management-Rails.git\n    cd product_management\n    ```\n\n2. **Install dependencies:**\n\n    ```sh\n    bundle install\n    ```\n\n3. **Set up the database:**\n\n    ```sh\n    rails db:migrate\n    ```\n\n4. **Precompile asset pipline**\n    ```sh\n    bundle exec rake assets:precompile\n    ```\n\n4. **Run the Rails server:**\n\n    ```sh\n    rails server\n    ```\n\n5. **Visit the application:**\n\n    Open your web browser and navigate to `http://localhost:3000/products`.\n\n## Usage\n\n### Creating a Product\n\n1. Click on the \"New Product\" link.\n2. Fill in the product details (name and price).\n3. Click \"Create Product\" to save the new product.\n\n### Viewing Products\n\nNavigate to `http://localhost:3000/products` to see a list of all products.\n\n### Editing a Product\n\n1. Click on the \"Edit\" link next to the product you want to edit.\n2. Update the product details.\n3. Click \"Update Product\" to save the changes.\n\n### Deleting a Product\n\nClick on the \"Destroy\" link next to the product you want to delete. Confirm the action to remove the product.\n\n## Real-Time Updates with Turbo Streams\n\nThis application uses Turbo Streams for real-time updates. When a product is created, updated, or deleted, the changes are broadcasted to all connected clients, and the product list is updated without needing to refresh the page.\n\n### Model Setup\n\nThe `Product` model broadcasts changes using Turbo Streams:\n\n```ruby\nclass Product \u003c ApplicationRecord\n  after_create_commit { broadcast_append_to 'products' }\n  after_update_commit { broadcast_replace_to 'products' }\n  after_destroy_commit { broadcast_remove_to 'products' }\n\n  validates :name, presence: true\n  validates :price, presence: true, numericality: { greater_than: 0 }\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiank-code%2Finventory-management-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiank-code%2Finventory-management-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiank-code%2Finventory-management-rails/lists"}