Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0 Roadmap #40

Open
6 of 16 tasks
good-idea opened this issue Jan 22, 2020 · 7 comments
Open
6 of 16 tasks

1.0 Roadmap #40

good-idea opened this issue Jan 22, 2020 · 7 comments

Comments

@good-idea
Copy link
Owner

good-idea commented Jan 22, 2020

This issue is to outline some goals of and work to do for a 1.0 stable release. For specific issues, see those labeled with the 1.0 milestone. Everything described here is up for discussion - if there are features would like to see or have an interesting use case, please leave a comment below.

There are a few questions in the "moving forward" section below - please chime in if you have any thoughts!

Scope

  • The main goal of this package is to sync data to Sanity, not back to Shopify.
  • Additionally, the focus will only be on syncing products & collections, and limited to what the Storefront API can read. The primary reason for this is security: by default, Sanity datasets are public. To sync orders, customer data, and so on would make it easy for users of the package to expose sensitive business information. The dashboard would also need to store Shopify API keys in its dataset. While datasets can be set up with more fine-grained access control, this package won't directly support handling sensitive data at all. (But, there will be a way to roll your own solution, see the notes under @sane-shopify/server below)

1.0 Features

overall

  • General stability. There are a lot of potential issues between the two services, and a lot of edge cases to be found and handled.
  • Testing. So far, this package has no automated tests. As the work below is completed, test coverage needs to be improved. Most of this testing will need to mock out requests and responses from Shopify & Sanity, which is kind of a drag, and could also mean more maintenance down the line as the API of the services changes. But for e-commerce, stability is crucial, so this needs to happen to some degree.
  • Project management / roadmap. I'll either use Github Projects or a Notion document to track features, their progress, and a general roadmap.
  • Documentation. This all needs better docs! Please open an issue or PR with anything you'd like to see in this regard - the whole thing is in my head at this point, so it's hard for me to see the missing pieces.

@sane-shopify/sanity-plugin

@sane-shopify/server

  • "ready to go" serverless functions for accepting Shopify webhooks. Finish webhooks #31
    For 1.0, this will include:

    • Product: products/create, products/update, products/delete
    • Collection: collections/create, collections/update, collections/delete

    These functions will assume some kind of standard sync. Versions will be available for AWS Lambdas (which are also used on Netlify) and Zeit.

  • A more configurable webhook, or some boilerplate to use the sync-utils API directly to write your own webhook logic.

@sane-shopify/sync-utils
This package is the core of the project and is used within the webhooks and the Sanity plugin. Most of its use will be internal, but the API will be documented and available for more advanced usage.

Moving Forward

Beyond that, the project will grow more depending on the needs and interest of those using it. Please let me know what you'd like to see out of sane shopify!

@sane-shopify/sync-utils

  • Sync basic shop data in a sanity document Sync basic shop data #42

    Read-only versions of the shop policies/counties/payment settings might be useful to store (mainly to avoid duplication and API rate limits)

@sane-shopify/server

@sane-shopify/sanity-plugin

  • A better dashboard experience. Right now, it's pretty basic looking, and only gives simple syncing progress information.
    • You also can't leave the tab until the syncing is complete. This may need to wait until this issue is handled by the Sanity team.
    • What sort of information would you like to see in a dashboard?
    • A recent activity feed would be great to give peace of mind that everything is working correctly
@homerjam
Copy link
Contributor

The roadmap looks great, excited for 1.0! 🚀

What sort of information would you like to see in a dashboard?

• A recent activity feed would be great to give peace of mind that everything is working correctly
• Read-only versions of the shop policies/counties/payment settings might be useful to store (mainly to avoid duplication and API rate limits)

Please let me know what you'd like to see out of sane shopify!

Besides the features listed above we'd like to sync:
• Product recommendations
• Product types and tags (this one is more of a nice to have really)

If there are features would like to see or have an interesting use case, please leave a comment below.

Down the line we'll be storing additional customer data in Sanity - we'll likely make use of the webhook boilerplate to do this, so that will be very useful. Our Sanity dataset will be private but as a precaution we'll probably store references only.

@good-idea
Copy link
Owner Author

Great, thank you. i've updated the issue to to reflect these.

• A recent activity feed would be great to give peace of mind that everything is working correctly

Great idea. I've added it above. I had thought about creating a document type for storing a complete log of updates --- but this could quickly blow up a user's Sanity usage. But if it's just a single document with a bunch of entries, maybe not? The other option would be to add some kind of syncedAt timestamp to each product/collection - then, the dashboard could just do a GROQ query for the most recently updated.

Read-only versions of the shop policies/counties/payment settings might be useful to store (mainly to avoid duplication and API rate limits)

Opened a new issue, #42

Besides the features listed above we'd like to sync:
• Product recommendations

You mentioned using ElasticSearch for this, correct? Any thoughts on what it would take to achieve this?

• Product types and tags (this one is more of a nice to have really)

These are already available in the product's sourceData. They were hidden fields, though, so didn't show up in the dashboard. They will be visible after the next release.

Is that sufficient for what you need?

@tracy-codes
Copy link

tracy-codes commented Mar 2, 2020

Hey @good-idea. Are you open to contributions on this project? I'd like to help with

Testing. So far, this package has no automated tests. As the work below is completed, test coverage needs to be improved. Most of this testing will need to mock out requests and responses from Shopify & Sanity, which is kind of a drag, and could also mean more maintenance down the line as the API of the services changes. But for e-commerce, stability is crucial, so this needs to happen to some degree.

I've already started to play around with this on a Shopify + Sanity/GatsbyJS website. I'd love to contribute to improve the stability and quality of releases by helping you get a head start on tests!

@good-idea
Copy link
Owner Author

Hi @tracy-codes , yes, I'm very open! My priorities have been centered around getting it all ready for a couple client projects I have been working on, so I've been skipping some things like testing that I might otherwise prioritize. When it comes to testing, the biggest hurdle there that I see is mocking out both Sanity and Shopify's APIs.

That being said, the frontend sanity-plugin is going to get a refactor. The API for sync-utils is just about stable, but I need to break it up a little bit into some smaller utilities that I'll be using on webhooks.

Perhaps I can set up a bunch of test files with empty/skipped tests --- this will help me articulate what the API should do, which is all kind of in my head but still needs some ironing out. How does that sound?

@tracy-codes
Copy link

Hi @tracy-codes , yes, I'm very open! My priorities have been centered around getting it all ready for a couple client projects I have been working on, so I've been skipping some things like testing that I might otherwise prioritize. When it comes to testing, the biggest hurdle there that I see is mocking out both Sanity and Shopify's APIs.

That being said, the frontend sanity-plugin is going to get a refactor. The API for sync-utils is just about stable, but I need to break it up a little bit into some smaller utilities that I'll be using on webhooks.

Perhaps I can set up a bunch of test files with empty/skipped tests --- this will help me articulate what the API should do, which is all kind of in my head but still needs some ironing out. How does that sound?

@good-idea I think mapping out what tests you'd like to see from the API would be a good start! If you're going to be refactoring the frontend sanity plugin I may start with just creating some mock data and API responses from Shopify & Sanity just so the annoying boilerplate of all that mock data is setup and ready to go. I.E. mocking out API responses for shopify collections, products, etc to be used in place of the actual api responses.

@good-idea
Copy link
Owner Author

@tracy-codes sounds good! I'll hopefully be getting to this during the week or early next week.

@sndrgb
Copy link

sndrgb commented Jun 30, 2020

@good-idea I ran a small web agency based in Italy, and we're starting using sanity during these days. We think about to create a project like this, if you're open we can try to contribute! everything sounds really good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants