• Stars
    star
    169
  • Rank 219,128 (Top 5 %)
  • Language
    JavaScript
  • License
    GNU Affero Genera...
  • Created over 7 years ago
  • Updated 8 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cozy Drive Web App for Cozy Cloud

Travis build status shield Github Release version shield NPM Licence shield

Cozy Drive

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 Drive?

Cozy Drive makes your file management easy. Main features are:

  • File tree
  • Files and folders upload.
  • Files and folders sharing (via URLs)
  • Files and folders search

Getting Started

๐Ÿ“Œ Note: Yarn is the official Node package manager of Cozy. Don't hesitate to install Yarn and use it in any Cozy projects.

Install

Starting the Drive 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-drive.git
$ cd cozy-drive
$ yarn install

๐Ÿ“Œ Don't forget to set the local node version indicated in the .nvmrc before doing a yarn install.

โš ๏ธ During its early ages, cozy-drive uses beta versions of cozy-ui and cozy-client-js, take a look at the "living on the edge" note below to know how to install and configure the latest available versions.

Cozy's apps use a standard set of npm scripts to run common tasks, like watch, lint, test, buildโ€ฆ

Run in dev mode

Using a watcher - with Hot Module Replacement:

$ cd cozy-drive
$ yarn watch:drive:browser
$ cozy-stack serve --appdir drive:/<project_absolute_path>/cozy-drive/build/drive --disable-csp

Or directly build the app (static file generated):

$ cd cozy-drive
$ yarn build:drive
$ cozy-stack serve --appdir drive:/<project_absolute_path>/cozy-drive/build/drive

Your app is available at http://drive.cozy.localhost:8080/#/folder

Note: it's mandatory to explicit to cozy-stack the folder of the build that should be served, to be able to run the app.

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-drive
$ yarn watch:drive:browser
# in another terminal, run the docker container
$ docker run --rm -it -p 8080:8080 -v "$(pwd)/build/drive":/data/cozy-app/drive cozy/cozy-app-dev

Your app is available at http://drive.cozy.tools:8080.

Advanced case

Share and send mails in development

Cozy apps let users share documents from cozy to cozy.

Meet Alice and Bob. Alice wants to share a folder with Bob. Alice clicks on the share button and fills in the email input with Bob's email address. Bob receives an email with a ยซ Accept the sharing ยป button. Bob clicks on that button and is redirected to Alice's cozy to enter his own cozy url to link both cozys. Bob sees Alice's shared folder in his own cozy.

๐Ÿค” But how could we do this scenario on binary cozy-stack development environment?

If you develop with the cozy-stack CLI, you have to run MailHog on your computer and tell cozy-stack serve where to find the mail server with some options:

./cozy-stack serve --appdir drive:../cozy-drive/build,settings:../cozy-settings/build --mail-disable-tls --mail-port 1025

This commands assumes you git clone cozy-drive and cozy-settings in the same folder than you git clone cozy-stack.

Then simply run mailhog and open http://cozy.tools:8025/.

Retrieve sent emails

With MailHog, every email sent by cozy-stack is caught. That means the email address does not have to be a real one, ie. bob@cozy, [email protected] are perfectly fine. It could be a real one, but the email will not reach the real recipient's inbox, say [email protected].

Run on you mobile phone or your tablet โ˜Ž๏ธ

See specific documentation.

Living on the edge

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-drive
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.

Troubleshooting

Consider using rlink instead of yarn link

Cozy-client-js is our API library that provides an unified API on top of the cozy-stack. If you need to develop / hack cozy-client-js in parallel of your application, you can use the same trick that we used with cozy-ui: yarn linking.

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-drive
$ yarn test

๐Ÿ“Œ Don't forget to update / create new tests when you contribute to code to keep the app the consistent.

Open a Pull-Request

If you want to work on Drive 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.

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

As a developer, you must configure the Transifex CLI, and claim access as maintainer to the app repository. Then please only update the source locale file (usually en.json in client and/or server parts), and push it to Transifex repository using the tx push -s command.

If you were using a transifex-client, you must move to Transifex CLI to be compatible with the v3 API.

The transifex configuration file is still in an old version. Please use the previous client for the moment https://github.com/transifex/transifex-client/.

Drive specificity

CozyDrive and CozyPhotos share this mono-repository but the translations are split into two projects Transifex. That is why the translation files are not present in this repository.

To update the translation in other language, make the changes directly on tx-translate. Select one language and click on global

Maintainer

The lead maintainer for Cozy Drive is @Crash--, send him/her a ๐Ÿป to say hello!

Get in touch

You can reach the Cozy Community by:

License

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

More Repositories

1

cozy-stack

Simple, Versatile, Yours
Go
1,098
star
2

cozy-setup

Cozy installation files and information
Python
818
star
3

cozy

Simple, Versatile, Yours
455
star
4

request-json

Http Client to deal easily with JSON API
CoffeeScript
122
star
5

cozy-home-v2

This repository was part of CozyV2 which has been deprecated
JavaScript
95
star
6

cozy.github.io

Official documentation for Cozy.
Python
88
star
7

americano

Deprecated - Make Express.js more opinioniated about configuration
CoffeeScript
71
star
8

cozy-calendar

An application to manage your events
JavaScript
67
star
9

cozy-emails

Email Client for Cozy
CoffeeScript
66
star
10

cozy-banks

A Banks Aggregator on Cozy
JavaScript
59
star
11

cozy-home

A cozy client application to configure and run cozy konnectors
JavaScript
49
star
12

cozy-ui

React components and CSS styles for Cozy apps
JavaScript
48
star
13

prosemirror-go

A port in Go of ProseMirror for writing a collaborative editing server
Go
45
star
14

cozy-files

This repository was part of CozyV2 which has been deprecated
JavaScript
41
star
15

cozy-ical

ICal Parser and Calendar models for Cozy Cloud
CoffeeScript
29
star
16

cozy-vcard

Cozy-vcard provides vcard Parser and Objects
CoffeeScript
29
star
17

cozy-mobile

Cordova based mobile client for cozy-files
CoffeeScript
28
star
18

cozy-photos-v2

Deprecated - New : https://github.com/cozy/cozy-drive/tree/master/src/photos - Personal Photo Gallery Manager
JavaScript
27
star
19

cozy-proxy

This repository was part of CozyV2 which has been deprecated - Cozy authentication and routing layer
CoffeeScript
26
star
20

gozy-docker

Sample configuration file to run Gozy inside a Docker container
Dockerfile
24
star
21

cozy-data-system

Deprecated - Data Layer for Cozy V2 Platform
CoffeeScript
24
star
22

notes

Note manager
JavaScript
23
star
23

cozy-contacts-v2

Contact books manager for Cozy
CoffeeScript
20
star
24

todos

Simple task management application
JavaScript
20
star
25

cozy-docs

Deprecated - Go to https://github.com/cozy/cozy-docs-v3
HTML
19
star
26

cozy-tutorial

Source to illustrate The "Make your own app" Tutorial
JavaScript
18
star
27

cozy-dev

Archived - Please use https://github.com/CPatchane/create-cozy-app
CoffeeScript
17
star
28

create-cozy-app

A CLI to bootstrap a "zero-configuration" application for the Cozy V3 platform
JavaScript
16
star
29

cozy-monitor

A tool to manage your Cozy Platform from the command line.
CoffeeScript
15
star
30

simple-cozy

Cozy without the market place
CoffeeScript
14
star
31

cozy-data-indexer

[DEPRECATED] REST API for data indexation
Python
14
star
32

cozy-template

Deprecated use https://github.com/cpatchane/cozy-create-app. Template project to create an application for the Cozy Platform
JavaScript
14
star
33

cozy-client

Document store and React components for the Cozy platform
JavaScript
13
star
34

cozy-debian

Cozy Debian package
Shell
13
star
35

cozy-self-hosting

An application to manage self hosted application on an Debian
JavaScript
12
star
36

cozy-guidelines

Cozy Code Guidelines
11
star
37

cozy-site

Official repository for the Cozy website.
HTML
11
star
38

cozy-notes

TypeScript
11
star
39

cozy-client-js

Javascript library to write Cozy applications
JavaScript
11
star
40

cozy-contacts

Contact manager for Cozy Cloud
JavaScript
11
star
41

cozy-template-coffee

Template project for Cozy Applications written with Coffeescript
CoffeeScript
10
star
42

cozy-editor

A cozy text editor
JavaScript
9
star
43

jugglingdb-cozy-adapter

[DEPRECATED] Jugglingdb adapter for connection with the Cozy Data System
CoffeeScript
9
star
44

cozy-flagship-app

TypeScript
8
star
45

cozy-coclyco

Tools to manage gozy instances
Python
7
star
46

cozy-browser-sdk

Cozy Data System client for the browser
CoffeeScript
7
star
47

cozy-libs

Libraries used to build Cozy products and tools.
JavaScript
7
star
48

cozy-stack-compose

Docker-compose for cozy-stack
Shell
7
star
49

cozy-bar

cozy-bar.js library, a small lib provided by cozy-stack to inject the Cozy-bar component into each app
JavaScript
7
star
50

cozy-db

Cozy Data System Driver
CoffeeScript
6
star
51

cozy-store

Marketplace app for the Cozy platform
JavaScript
6
star
52

cozy-ghost-theme

Cozy theme for Ghost
Handlebars
6
star
53

debian-cozy

Cozy Debian packaging
Shell
6
star
54

coachCO2

CoachCO2 aims to raise user awareness about their carbon footprint, notably based on their transport data.
JavaScript
6
star
55

printit

Dirty logging with class
JavaScript
6
star
56

cozy-registry

Deprecated, please use https://github.com/cozy/cozy-apps-registry
JavaScript
5
star
57

cozy-controller-carapace

The application host used by the Cozy Controller
JavaScript
5
star
58

cozy-controller

Cozy Module and Apps deployer
CoffeeScript
5
star
59

ACH

Import/Export data from your Cozy
JavaScript
4
star
60

cozy-settings

Settings app for Cozy Cloud
JavaScript
4
star
61

cozy-pass-mobile

Mobile app to access your Cozy Vault - based on https://github.com/bitwarden/mobile
C#
4
star
62

cozy-clients

Helper Clients to access easily to Cozy APIs
CoffeeScript
3
star
63

cozy-sandbox

Developer tool to test and experiment with Cozy Intents
JavaScript
3
star
64

couchdb-debian

JavaScript
3
star
65

cozy-apps-registry

A home for Cozy applications and connectors
Go
3
star
66

mespapiers

JavaScript
3
star
67

cozy-slug

Slugify your strings
CoffeeScript
3
star
68

cozy-device-sdk

CoffeeScript
2
star
69

cozy-clearance

Clearance manager for cozy apps
JavaScript
2
star
70

cozy-bootstrap

Cozy Bootstrap is a theme for Bootstrap with Cozy look and colors.
SCSS
2
star
71

cozy-move

Wizard for moving a Cozy from one place to another
Elixir
2
star
72

cozy-doctypes

The doctypes used in cozy-stack
2
star
73

cozy-passwords

โš ๏ธ This project is now in 'cozy-pass-web' repository
JavaScript
2
star
74

sidekiq-workflow

Sidekiq workflow manager
Ruby
2
star
75

cordova-plugin-calendarsync

Cordova adnroid calendar syncadapter plugin
Java
2
star
76

americano-cozy

[DEPRECATED] Helpers for Cozy Applications based on Americano
CoffeeScript
2
star
77

cozy-fixtures

Deprecated - Manage easily the data fixtures for your Cozy developments!
CoffeeScript
1
star
78

cozy-photos-v3

Cozy Photos app for Cozy Cloud
JavaScript
1
star
79

cozy-indexer

Full text indexing library for cozy
CoffeeScript
1
star
80

cozy-docdev-v3

Developer documentation of Cozy V3
1
star
81

CozyShareExtension

Android Share Extension files - must be integrated AFTER Cordova project generation
Java
1
star
82

cordova-jsbackgroundservice

Java
1
star
83

cozy-url-sdk

CoffeeScript
1
star
84

pouchdb-playground

Make queries with PouchDB and measure performances
JavaScript
1
star
85

cozy-i18n-helper

Helper library for i18n in Cozy Application
CoffeeScript
1
star
86

template-es6

Template project for Cozy Applications written with ES6
JavaScript
1
star
87

editor-core

This is forked from the sourcefiles (ts) of @atlaskit/editor-core.
TypeScript
1
star
88

debian-cozy-coclyco

Coclyco Debian packaging
Makefile
1
star
89

python_cozy_management

Python module to manage self hosted cozy
Python
1
star
90

CozyActionExtension

iOS extension for Cozy Drive
Objective-C
1
star
91

dissec_cozy

Python
1
star
92

debian-cozy-desktop

Cozy Desktop Debian packaging
Makefile
1
star
93

cozy-home-backup

[DEPRECATED] Main Dashboard for the Cozy Plaform
JavaScript
1
star