Giter Club home page Giter Club logo

shopmon's Introduction

Shop Monitoring

Shopmon is a hosted application from FriendsOfShopware to manage multiple Shopware instances.

  • Credentials are saved on a Cloudflare D1 SQLite database
  • API runs on Cloudflare workers (serverless)
  • Mails are sent using MailChannels

Features

Overview of all your Shopware instances to see:

  • Shopware Version and Security Updates
  • Show all installed extension and extension updates
  • Show info on scheduled tasks and queue
  • Run a daily check with pagespeed to see decreasing performance
  • Clear shop cache

Requirements (self hosted)

  • Cloudflare Worker aka Wrangler

Managed / SaaS

https://shopmon.fos.gg

Setup Local

Requirements:

  • Node 20 or higher
  • PNPM installed as Package manager or Node Corepack enabled

Install dependencies

make setup

Run migrations

make migrate

Run the app

Run the API and the frontend in local development mode

make dev

Page speed

If you want to trace the performance of your shop you need to activate the Google Pagespeed API.

and create a .dev.vars file in api folder with your API key like:

PAGESPEED_API_KEY=AIzaSyCWNar-IbOaQT1WX_zfAjUxG01x7xErbSc
APP_SECRET=MZRa9lEjACNhNhw40QXwRZANRx8f1WQa

Configuration

Disable registration

To disable user registrations set the following variables:

frontend/.env To disable the frontend registration route:

VITE_DISABLE_REGISTRATION=1

api/.dev.vars To disable the app functionality:

DISABLE_REGISTRATION=1

License

MIT

shopmon's People

Contributors

dependabot[bot] avatar falkohilbert avatar isengo1989 avatar joshuabehrens avatar m-arcus avatar niklaslimberg avatar pumpi avatar renovate[bot] avatar runelaenen avatar shyim avatar swisscommerce avatar tinect avatar xndrdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

shopmon's Issues

Scheduled Tasks

PHP Version

No response

Shopware Version

No response

Actual behaviour

See red status for tasks, because they were never checked again

Expected behaviour

the status should be checked more often

Steps to Reproduce?

add shop check scheduled tasks....

it is 18:37, last checked 15:46:35
image

TRPCClientError: NOT_FOUND

PHP Version

No response

Shopware Version

No response

Plugin Version

No response

Actual behaviour

When adding a member to the team we receive the following error. Adding new members is not possible anymore.
TRPCClientError: NOT_FOUND

Edit: deleting a member will result in the same error.

image

Expected behaviour

Successfully add new member to an existing team

Steps to Reproduce?

  1. Go to https://shopmon.fos.gg/account/organizations
  2. Select organisation
  3. Add new member
  4. TRPCClientError: NOT_FOUND error is thrown

OIDC Login

Please describe the feature you would like to see implemented.

A login via Microsoft, Google, etc. (OpenID Connect) would be nice.

is_owner to Owner with user ID

Please describe the feature you would like to see implemented.

Is_owner 1 is not so flexible. A better idea is that an owner variable includes the owner ID. Then we can check if a member cannot unassign or if he can edit the team

Add frontend to the API

Please describe the feature you would like to see implemented.

The frontend will be built using Tailwind UI

  • Login / Register
    • Login
    • Register
    • Register Confirmation
    • Forgot Password
  • Account Profile
    • Change user settings (username, email, password)
    • Allow deletion of the user
  • Team
    • List all Teams
    • Create a new Team
    • Delete a Team
    • Add member to Team
    • Remove member from Team
  • Shops
    • List all shops
    • Create a Shop
    • Edit a Shop
    • Delete a Shop
    • Detail page of a Shop with all information

Implement Log Viewer

Please describe the feature you would like to see implemented.

Requires FroshTools to be installed

WSS Notifications don't have an id or a read fiels

PHP Version

No response

Shopware Version

No response

Actual behaviour

If the notification comes from WSS the ID and read field is missing and the read on open fails and the row delete not works

Expected behaviour

Mar the notifications as read after open

Steps to Reproduce?

Go to Server that have a problem a click refresh. After refreshing the notification update but read and single delete won't work

Implement Edit Shop

Please describe the feature you would like to see implemented.

  • Add API Route
  • Add UI

TRPCError: SQLITE_CONSTRAINT: SQLite error: FOREIGN KEY constraint failed

Sentry Issue: SHOPMON-28

ResponseError: SQLite error: FOREIGN KEY constraint failed
LibsqlError: SQLITE_CONSTRAINT: SQLite error: FOREIGN KEY constraint failed
  at deleteShop (./src/repository/shops.ts:55:5)
  at shopRouter.delete (./src/trpc/organization/shop.ts:190:13)
...
(5 additional frame(s) were not displayed)

TRPCError: SQLITE_CONSTRAINT: SQLite error: FOREIGN KEY constraint failed
  at deleteShop (./src/repository/shops.ts:55:5)
  at shopRouter.delete (./src/trpc/organization/shop.ts:190:13)
...
(5 additional frame(s) were not displayed)

Page speed after change

Please describe the feature you would like to see implemented.

It would be nice if we detect a Change we start a page speed test and referent the result to this change. So we can see if a change have negative or positive effect for page speed.

Merging changelog entries

Please describe the feature you would like to see implemented.

Sometimes I got 2 entries in a changelog that results of a bad timing. It would be nice to merge a Changelog to only get one single entry.

image

Shop GMV

Please describe the feature you would like to see implemented.

Is it possible to get the shop GMV and display it on detail and list?

This information would be nice for the new Shopware pricing.

Selfhosted worker

Question

Currently it is possible to use selfhosted DB by planetscale but the api.toml is connected still with fos

Can it be switched to selfhosted cloudflare worker at ease or is there a migration process that has to take place?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • chore(deps): update all dependencies (@cloudflare/workers-types, @types/bcryptjs, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, actions/checkout, esbuild, eslint, itty-router)

Detected dependencies

github-actions
.github/workflows/codeql.yml
  • actions/checkout v3
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
.github/workflows/deploy_api.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/cache v3
  • getsentry/action-release v1
.github/workflows/deploy_frontend.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/cache v3
  • cloudflare/wrangler-action v3.1.1
npm
api/package.json
  • @friendsofshopware/app-server-sdk 0.0.45
  • @mmyoji/object-validator 0.0.5
  • @planetscale/database 1.11.0
  • bcryptjs 2.4.3
  • itty-router 4.0.22
  • toucan-js 3.2.3
  • version-compare 1.4.0
  • @cloudflare/workers-types 4.20230904.0
  • @types/bcryptjs 2.4.3
  • @typescript-eslint/eslint-plugin 6.6.0
  • @typescript-eslint/parser 6.6.0
  • esbuild 0.19.2
  • eslint 8.49.0
  • typescript 5.2.2
  • wrangler ^3.9.0
  • pnpm 8.7.6
frontend/package.json
  • @headlessui/vue 1.7.16
  • @tailwindcss/forms 0.5.6
  • compare-versions ^6.1.0
  • fast-sort 3.4.0
  • fuse.js ^6.6.2
  • pinia 2.1.6
  • unplugin-icons 0.17.0
  • unplugin-vue-components 0.25.2
  • vee-validate 4.11.6
  • vue 3.3.4
  • vue-router 4.2.5
  • yup 1.2.0
  • @iconify-json/fa6-regular 1.1.13
  • @iconify-json/fa6-solid 1.1.15
  • @iconify-json/ic 1.1.14
  • @iconify-json/line-md 1.1.29
  • @typescript-eslint/eslint-plugin 6.7.2
  • @typescript-eslint/parser 6.7.2
  • @vitejs/plugin-vue 4.3.4
  • autoprefixer 10.4.16
  • eslint 8.50.0
  • eslint-plugin-vue 9.17.0
  • postcss ^8.4.30
  • tailwindcss 3.3.3
  • typescript 5.2.2
  • vite 4.4.9
  • pnpm 8.7.6

  • Check this box to trigger a request for Renovate to run again on this repository

darkmode

Please describe the feature you would like to see implemented.

image

Shop Detail adjustments

Please describe the feature you would like to see implemented.

  • Show Admin URL
  • Show installation date of extensions
  • Add storelink to extension

Pagespeed not executed on refreshing

PHP Version

8.0.22

Shopware Version

6.4.14.0

Actual behaviour

When refreshing a shop the pagespeed call is not executed (the log stays at 1 entry)

Expected behaviour

When refreshing a shop the pagespeed call is made and an entry is created

Steps to Reproduce?

Team Page

Please describe the feature you would like to see implemented.

  • List all Teams
  • Create a new Team
  • Delete a Team
  • Add member to Team
  • Remove member from Team

Add username to user object

Please describe the feature you would like to see implemented.

We should have a username to welcome the user in the frontend

Registration adjustments

Please describe the feature you would like to see implemented.

  • Registration successful should be changed into Registration successful. Please check your mailbox and confirm your email address.
  • Your Mail Address has been confirmed ===> Your email address has been confirmed
  • always save and compare lowercased email, not just for check
  • User already exists ===> User with email already exists
  • Change Login by mail to login per username? This is confusing :-)

Add member results in 500 "User not found"

PHP Version

No response

Shopware Version

No response

Actual behaviour

Going to a /account/teams/<id> page and trying to add a member which doesn't have an account yet results in a 500 error.

Expected behaviour

There should be some kind of invitation flow.

Steps to Reproduce?

Remove client side sorting

Please describe the feature you would like to see implemented.

At the moment, we sort and filter on client side. Better practice is done this direct in the API

Add multiple storefront support

Please describe the feature you would like to see implemented.

It would be nice to access all storefronts from shopmon. Especially in a headless setup, a storefront on the admin url is not helpful. Support for the Pagespeed feature would be the cherry on the top.

I am not sure if it would be better to maintain each storefront url in shopmon or to get all saleschannel urls from shopware.

Implement reports from FroshTools

Please describe the feature you would like to see implemented.

FroshTools should adjust the shop status and we should grab the messages from them

Add info about refresh shop

Please describe the feature you would like to see implemented.

Near to "Last Checked At" and the refresh button, there should be an info, that the shop is updated once an hour automatically.

Changelog min - max Shopware Version

Please describe the feature you would like to see implemented.

It would be nice if the Changelog shows the version Shopware Version compatibility to see if you must update to get this feature

Shop detail error

PHP Version

Shopware Version

Actual behaviour

{"message":"target: shopmon.-.primary: vttablet: rpc error: code = NotFound desc = Unknown column 'shop.ignores' in 'field list' (errno 1054) (sqlstate 42S22) (CallerID: planetscale-writer): Sql: "select shop.id, shop.name, shop.url, shop.status, shop.created_at, shop.shopware_version, shop.last_scraped_at, shop.last_scraped_error, shop.shopware_version, shop.ignores, shop_scrape_info.extensions, shop_scrape_info.scheduled_task, shop_scrape_info.queue_info, shop_scrape_info.cache_info, shop_scrape_info.checks, shop.team_id, team.name as team_name from shop join team on team.id = shop.team_id left join shop_scrape_info on shop_scrape_info.shop_id = shop.id where shop.id = :vtg1", BindVars: {#maxLimit: "type:INT64 value:\"100001\""vtg1: "type:VARCHAR value:\"1\""}"}

Expected behaviour

Show detail page

Steps to Reproduce?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.