Code Monkey home page Code Monkey logo

Comments (4)

morkro avatar morkro commented on June 21, 2024 1

Interesting, thanks for sharing @phiwut! I was looking for something like this when I started this project but didn't find anything useful back then. This could potentially enable some really cool features, like you suggested automated plant information. :)

I will fiddle around with that API and see what possibilities this brings for HappyPlants!

from happy-plants.

phiwut avatar phiwut commented on June 21, 2024

Hi Moriz,
I tried to implement treffle but I sadly couldn't figure out where you locate the API logic (in the API folder?) and the business logic for loading the data in the Overview component. However, I'm interested to see how you'll implement this feature :)

from happy-plants.

morkro avatar morkro commented on June 21, 2024

Hey @phiwut,

thanks for giving it a shot! I'm following the development around Trefle and up until today they didn't have any client-side API tokens. With that addition it should be possible to work on some experimental features, e.g. autocompleting data or having an entirely separate plant module. Alternatively, Netlify's Lambda functions could be used to fetch the data. However, the project is still in very early stages and the API might break/change quickly. I am very interested in this API, just not sure about its maturity at this stage.

I don't want to discourage you contributing to this project though, just sharing my thoughts on it. :)

couldn't figure out where you locate the API logic (in the API folder?) and the business logic for loading the data in the Overview component.

Everything in the src/api directory is meant to be a light wrapper around any API used in the application. In this case Firebase, localForage, and sessionStorage. I realise the naming is a bit ambiguous.

The actual business logic of the application can always be found in the store directory of any feature. In your example it would be src/app/overview/store. The actions dispatch and fetch data, while mutations take the input and mutate the state. Since the overview screen doesn't do anything with data, except displaying it, there isn't anything business logic. Take a look into src/app/plant/store/actions to get a better understanding of it.

I should probably write a little bit of documentation on the overall application architecture so it's easier to contribute :)

from happy-plants.

phiwut avatar phiwut commented on June 21, 2024

Thanks!

from happy-plants.

Related Issues (20)

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.