Coder Social home page Coder Social logo

cozy-store's Introduction

Travis build status shield Renovate enabled dependencies Status devDependencies Status Github Release version shield

Cozy Store

What's Cozy?

Cozy Logo

Cozy is a platform that brings all your web services in the same private space. With it, your webapps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one's tracking you.

What's Store? Cozy Logo

Cozy Store is the marketplace application that allow you to manage your apps in your Cozy.

Hack

馃搶 Note: we recommend to use Yarn instead of NPM for package management. Don't hesitate to install and use it for your Cozy projects, it's now our main node packages tool for Cozy official apps.

Install and run in dev mode

Hacking the Store app requires you to setup a dev environment.

You can then clone the app repository and install dependencies:

$ git clone https://github.com/cozy/cozy-store.git
$ cd cozy-store
$ yarn install

馃搶 If you use a node environment wrapper like nvm or ndenv, don't forget to set your local node version before doing a yarn install.

Cozy's apps use a standard set of npm scripts to run common tasks. You can so start you development workflow with:

$ cd cozy-store
$ yarn run watch:server

and point your browser to http://localhost:8090.

Run it inside the VM

You can easily view your current running app, you can use the cozy-stack docker image:

# in a terminal, run your app in watch mode
$ cd cozy-store
$ yarn watch:browser
# in another terminal, run the docker container
$ docker run --rm -it -p 8080:8080 -v "$(pwd)/build":/data/cozy-app/store cozy/cozy-app-dev
or
$ yarn stack:docker

your app is available at http://store.cozy.tools:8080.

Note about Cozy-ui

Cozy-ui is our frontend stack library that provides common styles and components accross the whole Cozy's apps. You can use it for you own application to follow the official Cozy's guidelines and styles. If you need to develop / hack cozy-ui, it's sometimes more useful to develop on it through another app. You can do it by cloning cozy-ui locally and link it to yarn local index:

git clone https://github.com/cozy/cozy-ui.git
cd cozy-ui
yarn install
yarn link

then go back to your app project and replace the distributed cozy-ui module with the linked one:

cd cozy-store
yarn link cozy-ui

You can now run the watch task and your project will hot-reload each times a cozy-ui source file is touched.

Tests

Tests are run by mocha under the hood, and written using chai and sinon. You can easily run the tests suite with:

$ cd cozy-store
$ yarn test

馃搶 Don't forget to update / create new tests when you contribute to code to keep the app the consistent.

Models

The Cozy datastore stores documents, which can be seen as JSON objects. A doctype is simply a declaration of the fields in a given JSON object, to store similar objects in an homogeneous fashion.

Cozy ships a built-in list of doctypes for representation of most of the common documents (Bills, Contacts, Files, ...).

Whenever your app needs to use a given doctype, you should:

  • Check if this is a standard doctype defined in Cozy itself. If this is the case, you should add a model declaration in your app containing at least the fields listed in the main fields list for this doctype. Note that you can extend the Cozy-provided doctype with your own customs fields. This is typically what is done in Konnectors for the Bill doctype.
  • If no standards doctypes fit your needs, you should define your own doctype in your app. In this case, you do not have to put any field you want in your model, but you should crosscheck other cozy apps to try to homogeneize the names of your fields, so that your doctype data could be reused by other apps. This is typically the case for the Konnector doctype in Konnectors.

Open a Pull-Request

If you want to work on Settings and submit code modifications, feel free to open pull-requests! See the contributing guide for more information about how to properly open pull-requests.

Community

Localization

Localization and translations are handled by Transifex, which is used by all Cozy's apps.

As a translator, you can login to Transifex (using your Github account) and claim an access to the app repository. Locales are pulled when app is build before publishing.

As a developer, you just have to modify json in /src/locales. New locales will be automatically added to Transifex. If you need to pull or push manually locales, you can use Transifex CLI. If you were using a transifex-client, you must move to Transifex CLI to be compatible with the v3 API.

Maintainer

The lead maintainer for Cozy Store is @CPatchane, send him/her a 馃嵒 to say hello!

Get in touch

You can reach the Cozy Community by:

License

Cozy Settings is developed by Cozy Cloud and distributed under the AGPL v3 license.

cozy-store's People

Contributors

acezard avatar cballevre avatar cpatchane avatar crash-- avatar doubleface avatar germain-gg avatar gooz avatar greenkeeper[bot] avatar gregorylegarec avatar jf-cozy avatar kosssi avatar ldoppea avatar lucst avatar m4dz avatar merkur39 avatar narkfr avatar nono avatar paultranvan avatar pierrevdk avatar polaritoon avatar poupotte avatar ptbrowne avatar renovate-bot avatar renovate[bot] avatar sblaisot avatar sebn avatar sizvix avatar transifex-integration[bot] avatar trollepierre avatar zatteo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

cozy-store's Issues

IntentHandler

Hi, I used your IntentHandler code in cozy/cozy-contacts#155 and it worked very well! The new intent handling structure is great!

I just made a few changes to the file but linters fucked up the diff..

I can contribute these changes back to cozy-store but I'm not sure they are too interesting, but if/when we integrate these components in a separate lib, we should keep these things in mind :)

Unexistant apps-registry.cozy.io domain

Hi,

The apps-registry.cozy.io domain which is used by the Cozy Store app seems to not exists.

{"errors":[{"status":"500","title":"Unqualified error","detail":"Get https://apps-registry.cozy.io/registry?cursor=0&filter%5Btype%5D=webapp&limit=50: dial tcp: lookup apps-registry.cozy.io on 10.100.3.254:53: no such host","source":{}}]}

Mettre en cache le fetchRegistryApps & fetchInstalledApps

Actuellement le fetchInstalledApps lance une requ锚te 脿 chaque navigation entre /myapps /discovery /application, alors que la r茅ponse reste la m锚me.

Proposition :
Mettre en cache ces requ锚tes, 脿 minima pour la session courante, et effac茅 le cache uniquement en cas d'installation / d茅sinstallation d'une app.

Dependency Dashboard

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

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Using npm packages for Renovate presets is now deprecated. Please migrate to repository-based presets instead.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update dependency enzyme-adapter-react-16 to v1.15.7
  • fix(deps): update dependency react-redux to v7.2.9
  • fix(deps): update dependency @babel/eslint-parser to v7.23.3
  • fix(deps): update dependency @testing-library/jest-dom to v5.17.0
  • fix(deps): update dependency cozy-ui to ^95.11.1
  • fix(deps): update dependency emoji-js to v3.8.0
  • fix(deps): update dependency eslint to v8.56.0
  • fix(deps): update dependency eslint-config-prettier to v8.10.0
  • fix(deps): update dependency eslint-plugin-import to v2.29.1
  • fix(deps): update dependency eslint-plugin-jest to v27.6.1
  • fix(deps): update dependency eslint-plugin-react to v7.33.2
  • fix(deps): update dependency fuse.js to v6.6.2
  • fix(deps): update dependency node-fetch to v2.7.0
  • fix(deps): update dependency prop-types to v15.8.1
  • fix(deps): update dependency react-router-dom to v6.21.1
  • fix(deps): update dependency redux to v4.2.1
  • fix(deps): update dependency redux-thunk to v2.4.2
  • fix(deps): update typescript-eslint monorepo to v5.62.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update cozy client packages to v45 (major) (cozy-client, cozy-stack-client)
  • fix(deps): update dependency @testing-library/jest-dom to v6
  • fix(deps): update dependency @testing-library/react to v14
  • fix(deps): update dependency cozy-bar to v10
  • fix(deps): update dependency cozy-device-helper to v3
  • fix(deps): update dependency cozy-flags to v3
  • fix(deps): update dependency cozy-realtime to v5
  • fix(deps): update dependency cozy-ui to v100
  • fix(deps): update dependency eslint-config-prettier to v9
  • fix(deps): update dependency eslint-plugin-prettier to v5
  • fix(deps): update dependency focus-trap-react to v10
  • fix(deps): update dependency fuse.js to v7
  • fix(deps): update dependency node to v20
  • fix(deps): update dependency node-fetch to v3
  • fix(deps): update dependency react-markdown to v9
  • fix(deps): update dependency react-redux to v9
  • fix(deps): update dependency redux to v5
  • fix(deps): update dependency redux-thunk to v3
  • fix(deps): update dependency sinon to v17
  • fix(deps): update dependency url-search-params-polyfill to v8
  • fix(deps): update react monorepo to v18 (major) (react, react-dom, react-test-renderer)
  • fix(deps): update typescript-eslint monorepo to v6 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • 馃攼 Create all rate-limited PRs at once 馃攼

Open

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

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

npm
package.json
  • @cozy/minilog ^1.0.0
  • cozy-app-publish ^0.27.2
  • cozy-bar ^7.19.1
  • cozy-client ^41.8.1
  • cozy-device-helper ^2.1.0
  • cozy-doctypes 1.85.0
  • cozy-flags 2.8.7
  • cozy-intent ^2.0.2
  • cozy-interapp 0.9.0
  • cozy-logger 1.9.0
  • cozy-minilog ^3.3.1
  • cozy-realtime 3.14.4
  • cozy-stack-client ^41.2.0
  • cozy-ui ^95.8.0
  • emoji-js 3.7.0
  • focus-trap-react 4.0.1
  • fuse.js 6.5.3
  • lodash 4.17.21
  • node-fetch 2.6.7
  • prop-types 15.7.2
  • react 16.14.0
  • react-dom 16.14.0
  • react-markdown 3.6.0
  • react-proptypes 1.0.0
  • react-redux 7.2.8
  • react-router-dom 6.3.0
  • react-test-renderer 16.14.0
  • redux 4.1.2
  • redux-logger 3.0.6
  • redux-mock-store 1.5.4
  • redux-raven-middleware 1.2.0
  • redux-thunk 2.3.0
  • sinon 7.5.0
  • url-search-params-polyfill 7.0.1
  • @babel/eslint-parser 7.19.1
  • @babel/polyfill ^7.12.1
  • @testing-library/jest-dom 5.16.5
  • @testing-library/react 11.2.7
  • @typescript-eslint/eslint-plugin 5.54.0
  • @typescript-eslint/parser 5.54.0
  • babel-preset-cozy-app ^2.1.0
  • cozy-scripts ^8.1.1
  • cozy-tsconfig ^1.2.0
  • enzyme 3.3.0
  • enzyme-adapter-react-16 1.15.6
  • enzyme-to-json ^3.6.2
  • eslint 8.35.0
  • eslint-config-cozy-app ^6.1.0
  • eslint-config-prettier 8.6.0
  • eslint-plugin-import 2.27.5
  • eslint-plugin-jest 27.2.1
  • eslint-plugin-prettier 4.2.1
  • eslint-plugin-promise 6.1.1
  • eslint-plugin-react 7.32.2
  • eslint-plugin-react-hooks 4.6.0
  • git-directory-deploy 1.5.1
  • identity-obj-proxy 3.0.0
  • npm-run-all 4.1.5
  • sinon-stub-promise 4.0.0
  • stylint 2.0.0
nvm
.nvmrc
  • node 16
travis
.travis.yml
  • node 16

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

Prettier warnings ?

I see this in the builds for the customisation.

       58:7   warning  Unexpected console statement                                  no-console
      134:33  error    Delete `鈴幝仿仿仿仿仿仿仿仿穈                                           prettier/prettier
      136:1   error    Delete `路路`                                                   prettier/prettier
      137:1   error    Delete `路路`                                                   prettier/prettier
      138:15  error    Delete `路路`                                                   prettier/prettier
      139:1   error    Delete `路路`                                                   prettier/prettier
      140:19  error    Delete `路路`                                                   prettier/prettier
      141:1   error    Replace `路路路路路路路路路路路路路路路路路路` with `路路路路路路路路路路路路路路路路`          prettier/prettier
      142:1   error    Delete `路路`                                                   prettier/prettier
      143:13  error    Delete `路路`                                                   prettier/prettier
      144:1   error    Replace `路路路路路路路路路路路路路路` with `路路路路路路路路路路路路`                  prettier/prettier
      145:1   error    Delete `路路`                                                   prettier/prettier
      146:17  error    Delete `路路`                                                   prettier/prettier
      147:1   error    Delete `路路`                                                   prettier/prettier
      148:19  error    Delete `路路`                                                   prettier/prettier
      149:1   error    Delete `路路`                                                   prettier/prettier
      150:19  error    Delete `路路`                                                   prettier/prettier
      151:1   error    Replace `路路路路路路路路路路路路路路路路路路` with `路路路路路路路路路路路路路路路路`          prettier/prettier

UI : Alert button to warn the cozy team when a connector is not working

I added a connector (Probikeshop) to test and it is not fetching my receipt from 2018.
So I was wondering how I could warn your team and I couldn't find any easy way except maybe contact your support by mail.
Maybe a button like "Report an issue" on the app detail panel on the home and the store could be a solution. Only if the user is properly logged in of course.

The latest cozy-scripts config doesn't work well with cozy-store

A fix was to disable a few rules in the custom eslint config but this is clearly not the correct solution.

Here what is suggested:

  • Find why the cozys-cript eslint config doesn't work as expected
  • Fix the issue
  • Fix files that do not respect the cozy eslint config
  • Ensure tests still work

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.