{"id":14955657,"url":"https://github.com/binos30/shopline","last_synced_at":"2025-10-01T01:31:13.821Z","repository":{"id":244213946,"uuid":"739808881","full_name":"binos30/shopline","owner":"binos30","description":"E-commerce app using Rails 7, PostgreSQL, Hotwire (Turbo + Stimulus), Tailwind CSS, Cloudinary, and Stripe","archived":false,"fork":false,"pushed_at":"2024-10-28T20:20:04.000Z","size":5965,"stargazers_count":1,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-20T14:50:45.378Z","etag":null,"topics":["e-commerce","e-commerce-app","e-commerce-project","ecommerce","ecommerce-app","hotwire-stimulus","hotwire-turbo","mvc","mvc-framework","rails","rails-application","rails-crud","ruby","ruby-on-rails","stimulus-rails","turbo-rails","web-framework"],"latest_commit_sha":null,"homepage":"https://shopline-t6yk.onrender.com","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/binos30.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-01-06T15:59:52.000Z","updated_at":"2024-09-26T08:40:29.000Z","dependencies_parsed_at":"2024-09-26T16:02:58.530Z","dependency_job_id":null,"html_url":"https://github.com/binos30/shopline","commit_stats":{"total_commits":159,"total_committers":2,"mean_commits":79.5,"dds":"0.012578616352201255","last_synced_commit":"e847896cc693efc4463385bbf4681386afe2da06"},"previous_names":["binos30/shopline"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binos30%2Fshopline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binos30%2Fshopline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binos30%2Fshopline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binos30%2Fshopline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binos30","download_url":"https://codeload.github.com/binos30/shopline/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227959554,"owners_count":17847617,"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":["e-commerce","e-commerce-app","e-commerce-project","ecommerce","ecommerce-app","hotwire-stimulus","hotwire-turbo","mvc","mvc-framework","rails","rails-application","rails-crud","ruby","ruby-on-rails","stimulus-rails","turbo-rails","web-framework"],"created_at":"2024-09-24T13:11:30.455Z","updated_at":"2025-10-01T01:31:13.816Z","avatar_url":"https://github.com/binos30.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shopline\n\n[![Created Badge](https://badges.pufler.dev/created/binos30/shopline)](https://badges.pufler.dev)\n[![Updated Badge](https://badges.pufler.dev/updated/binos30/shopline)](https://badges.pufler.dev)\n[![CI/CD](https://github.com/binos30/shopline/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/binos30/shopline/actions/workflows/ci-cd.yml)\n[![Dependabot Status](https://badgen.net/github/dependabot/binos30/shopline?icon=dependabot)](https://dependabot.com)\n\nE-commerce app. Shop online with Shopline. You shop, we ship!\n\n![Homepage](./docs/images/homepage.png)\n![Dashboard](./docs/images/dashboard.png)\n![Dashboard-Dark](./docs/images/dashboard-dark.png)\n![Orders](./docs/images/orders.png)\n![Orders-Dark](./docs/images/orders-dark.png)\n\n## Setup\n\nPrerequisites\n\n- [Ruby 3.3.5](https://github.com/rbenv/rbenv)\n- [PostgreSQL](https://www.postgresql.org/download/)\n- [Node.js ^20.15.1](https://github.com/nvm-sh/nvm)\n\nCreate `.env` file at the root of the project directory. Copy the content of `.env.template.erb` to `.env` then update the `username` and `password` based on your database credentials. Get `STRIPE_SECRET_KEY` and `STRIPE_WEBHOOK_SECRET` from your [Stripe](https://dashboard.stripe.com) account.\n\nTo enable error monitoring with Honeybadger:\n\n1. Sign up for a [Honeybadger](https://www.honeybadger.io/) account\n2. Create a new project in Honeybadger\n3. Get your project's API key from the project settings\n4. Add the API key to your `.env` file as `HONEYBADGER_API_KEY`\n\nInstall dependencies and setup database\n\n```bash\nbin/setup\n```\n\nRe-enable git hooks _(Run this command only if you've already set up the application prior to the migration from husky to lefthook)_\n\n```bash\ngit config --unset core.hooksPath\n```\n\nRun `lefthook install` to sync the git hooks\n\nStart local web server\n\n```bash\nbin/dev\n```\n\nGo to [http://localhost:3000](http://localhost:3000)\n\nUse [Stripe CLI](https://docs.stripe.com/stripe-cli) to simulate Stripe events in your local environment or [learn more about Webhooks](https://docs.stripe.com/webhooks)\n\n```bash\nstripe listen --forward-to localhost:3000/stripe_webhooks\n```\n\n## Testing Payments\n\nTo test Stripe payments, use the following test card details:\n\n- Card Number: `4242 4242 4242 4242`\n- Expiration: Any future date\n- CVC: Any 3-digit number\n\n## Set up a production Stripe webhook\n\n1. Go to the [Stripe Dashboard](https://dashboard.stripe.com) and create a new webhook for your production environment.\n2. Set the endpoint URL to your production route (e.g., `https://yourdomain.com/stripe_webhooks`).\n3. Select the events you want to listen for (e.g., `checkout.session.completed`, `customer.created`, `customer.deleted`).\n\n## GitHub Actions, Linting and Security Auditing\n\nGitHub actions are setup to lint, test, and deploy the application.\n\nYou can also run these actions locally before pushing to see if your run is likely to fail. See the following gems / commands for more info.\n\n- [Brakeman](https://brakemanscanner.org/) - Security audit application code\n\n  ```bash\n  bin/brakeman --no-pager\n  ```\n\n- [Brakeman: Ignoring False Positives](https://brakemanscanner.org/docs/ignoring_false_positives) - Creating and Managing an Ignore File\n\n  ```bash\n  bin/brakeman -I --no-pager\n  ```\n\n- [Bundler Audit](https://github.com/rubysec/bundler-audit) - Security audit dependencies\n\n  ```bash\n  bin/bundler-audit --update\n  ```\n\n- [Rubocop Rails Omakase](https://github.com/rails/rubocop-rails-omakase) - Ruby Linter\n\n  ```bash\n  bin/rubocop\n  ```\n\n  **Note:** Some linters like `ESLint`, `Prettier`, etc. will automatically run on `pre-commit` git hook.\n\n## Testing\n\nSetup test database\n\n```bash\nbin/rails db:test:prepare\n```\n\nDefault: Run all spec files (i.e., those matching spec/\\*\\*/\\*\\_spec.rb)\n\n```bash\nbin/rspec\n```\n\nor with `--fail-fast` option to stop running the test suite on the first failed test. You may add a parameter to tell RSpec to stop running the test suite after N failed tests, for example: `--fail-fast=3`\n\n```bash\nbin/rspec --fail-fast\n```\n\nRun all spec files in a single directory (recursively)\n\n```bash\nbin/rspec spec/models\n```\n\nRun a single spec file\n\n```bash\nbin/rspec spec/models/product_spec.rb\n```\n\nRun a single example from a spec file (by line number)\n\n```bash\nbin/rspec spec/models/product_spec.rb:6\n```\n\nUse the plain-English descriptions to generate a report of where the application conforms to (or fails to meet) the spec\n\n```bash\nbin/rspec --format documentation\n```\n\n```bash\nbin/rspec --format documentation spec/models/product_spec.rb\n```\n\nSee all options for running specs\n\n```bash\nbin/rspec --help\n```\n\n## Code Coverage\n\n[Coverage]: https://docs.ruby-lang.org/en/3.3/Coverage.html \"API doc for Ruby's Coverage library\"\n[SimpleCov]: https://github.com/simplecov-ruby/simplecov \"A code coverage analysis tool for Ruby\"\n\n[SimpleCov][SimpleCov] is a code coverage analysis tool for Ruby. It uses [Ruby's built-in Coverage][Coverage] library to\ngather code coverage data, but makes processing its results much easier by providing a clean API to filter, group, merge, format,\nand display those results, giving you a complete code coverage suite that can be set up with just a couple lines of code.\nSimpleCov/Coverage track covered ruby code, gathering coverage for common templating solutions like erb, slim and haml is not supported.\n\nAfter running your tests, open `coverage/index.html` in the browser of your choice. For example, in a Mac Terminal,\nrun the following command from your application's root directory:\n\n```bash\nopen coverage/index.html\n```\n\nin a Debian/Ubuntu Terminal,\n\n```bash\nxdg-open coverage/index.html\n```\n\n**Note:** [This guide](https://dwheeler.com/essays/open-files-urls.html) can help if you're unsure which command your particular\noperating system requires.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinos30%2Fshopline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinos30%2Fshopline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinos30%2Fshopline/lists"}