Skip to content

Merge @hoodie/store & @hoodie/account into hoodie #98

@LowProfileDog

Description

@LowProfileDog

🤔 What you will need to know

You will need to know Node.js and npm and have an understanding how modular Node.js projects work. You should have written tests before, ideally acceptance tests. At Hoodie, we use tap as our test runner and will start using selsa to handle Selenium, Sauce Labs and Webdriver.

❓ The Background

While working on the new Hoodie Architecture, we created the @hoodie/store and @hoodie/account modules as a way to combine the client & server logic of the store & account core modules, mostly for testing before the whole architecture was ready.

The idea was to make an architecture like this:

hoodie
├─┬ @hoodie/account
│ ├── @hoodie/account-client
│ └── @hoodie/account-server
└─┬ @hoodie/store
  ├── @hoodie/store-client
  └── @hoodie/store-server

But instead it turned out to more like

hoodie
├─┬ @hoodie/client
│ ├── @hoodie/account-client
│ └── @hoodie/store-client
└─┬ @hoodie/server
  ├── @hoodie/account-server
  └── @hoodie/store-server

hoodie still has @hoodie/account and @hoodie/store in its dependencies. But the only thing we use it for now is to display the custom UI at /hoodie/store (source) and /hoodie/account (source), so just static assets.

We also use it for account server/client acceptance tests and store server/client acceptance tests. Note that these are implemented usin frontend-test-setup, but we want to use selsa now, as it is more robust, flexible and easier to debug.

🙌 The Motivation

This will simplify our architecture, reduce maintenance and it’s fairly simply todo without breaking changes.

For one, there is no use for the @hoodie/account or @hoodie/store modules outside Hoodie. And even if there were, it would be simple to create. @hoodie/client and @hoodie/server on the other side are used as direct dependencies in related projects.

Second, we want to have a custom hoodie UI that every hoodie app gets by default (related: #20, #21, #22). The UI is interdependent though, having the store page come from the store module and the account page from the account module makes little sense. So just having one integrated UI that simply lives at /hoodie is much simpler to create and to maintain. And we can use for integration tests of all the core features without needing an app.

📋 Step by Step

  • 🙋 Claim this issue: Comment below
    Please only claim if you want to start working on it during the event.
    Once claimed we add you as contributor to this repository.
  • 👌 Accept our invitation to this repository. Once accepted, assign yourself to this issue
  • 👓 Please review our Code of Conduct
    In a nutshell: be patient and actively kind
  • 🔄 replace add the in progress label.
  • Fork the hoodiehq/hoodie
  • Set it up locally by cloning your fork. Make sure that all tests pass
  • Move the contents of the public servers of hoodie-store and hoodie-account into hoodie’s /public/store and /public/account folders respectively. You can verify if it worked by running npm start and then open http://localhost:8080/store/ and http://localhost:8080/account/
  • 🔀 Start a Pull Request. Set the title to Merge @hoodie/store & @hoodie/account into hoodie and set description to closes hoodiehq/camp#{THIS ISSUE NUMBER}. If you never started a pull request on GitHub, here is a great tutorial on how to do that.
  • Next up: the tests. Create a new folder test/acceptance and a new file test/acceptance/index.js. Create the most simple test possible using tap (compare the other test files) and selsa. For example, open
  • 🏁 Done 👍 Replace the in progress label with ready. Ask in comments for a review :)

🤔❓ Questions

Best is to ask @polinadotio who is at the event herself. You can also ping us in the Hoodie Chat or on Twitter

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions