Comments (4)
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.
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.
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.
Thanks!
from happy-plants.
Related Issues (20)
- Be consistent with controls’ label
- Implement an accessible dialog HOT 1
- Make controls design consistent
- Add focus states to controls HOT 1
- Add proper form controls in modules
- Plant re-ordering HOT 1
- Overlapping buttons in notebook HOT 1
- Low button contrast HOT 1
- Move categories to tagging system HOT 1
- cssnano strips `calc()` in production build HOT 1
- Photos orientation HOT 1
- Self hosting Documentation HOT 1
- Household option HOT 3
- App is getting slow with many plants HOT 2
- Plant type HOT 1
- More plant actions HOT 1
- Cannot add plant when offline HOT 1
- Database HOT 1
- Docker image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from happy-plants.