README

Cozy Cloud

go.dev reference Build Status Go Report Card

What is Cozy?

Cozy Logo

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

What is the Cozy-Stack

It is the core server of the Cozy platform. It consists of a single process, the Cozy stack.

Full Cozy-Stack documentation here.

The Cozy-Stack is in charge of serving the Web applications users have installed from the application store.

It provides its services through a REST API that allows to:

  • create, update, delete documents inside the database;
  • authenticate users and client applications;
  • send emails;
  • launch jobs on the server. Connectors that import data from remote websites are some sort of jobs. Jobs can be one time tasks (sending a message) or periodic tasks. Some jobs, like the connectors, that require executing third party code on the server side, are sandboxed (we use nsjail for now).

The Cozy-Stack also allows to access the database replication API, allowing to sync documents between the server and local databases, for example in mobile clients.

Two authentication methods are available:

  • Web applications running on the server get a session token when the user log in;
  • OAuth2 for other applications.

Feel free to open an issue for questions and suggestions.

Installing a cozy-stack

You can follow the Install guide and the configuration documentation.

How to contribute?

We are eager for contributions and very happy when we receive them! It can code, of course, but it can also take other forms. The workflow is explained in the contributing guide.

Community

You can reach the Cozy Community by:

  • Chatting with us on IRC #cozycloud on irc.freenode.net
  • Posting on our Forum
  • Posting issues on the Github repos
  • Mentioning us on Twitter

License

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

Expand ▾ Collapse ▴

Documentation

Overview

Cozy Cloud is a personal platform as a service with a focus on data. Cozy Cloud can be seen as 4 layers, from inside to outside:

1. A place to keep your personal data

2. A core API to handle the data

3. Your web apps, and also the mobile & desktop clients

4. A coherent User Experience

It's also a set of values: Simple, Versatile, Yours. These values mean a lot for Cozy Cloud in all aspects. From an architectural point, it declines to:

- Simple to deploy and understand, not built as a galaxy of optimized microservices managed by kubernetes that only experts can debug.

- Versatile, can be hosted on a Raspberry Pi for geeks to massive scale on multiple servers by specialized hosting. Users can install apps.

- Yours, you own your data and you control it. If you want to take back your data to go elsewhere, you can.

Source Files

Directories

Path Synopsis
client
client/auth
client/request
cmd
cmd/browser Package browser provides utilities for interacting with users' browsers.
model/account
model/app
model/bitwarden
model/bitwarden/settings
model/contact
model/feature
model/instance
model/instance/lifecycle
model/intent
model/job
model/move
model/note Package note is the glue between the prosemirror models, the VFS, redis, the hub for realtime, etc.
model/notification
model/notification/center
model/oauth
model/permission
model/remote
model/session
model/sharing
model/stack
model/vfs Package vfs is for storing files on the cozy, including binary ones like photos and movies.
model/vfs/vfsafero
model/vfs/vfsswift
pkg/appfs
pkg/assets
pkg/assets/dynamic
pkg/assets/model
pkg/assets/statik Package statik contains an HTTP file system that works with zip contents.
pkg/cache
pkg/config
pkg/config/config
pkg/consts
pkg/couchdb
pkg/couchdb/mango
pkg/crypto
pkg/filetype
pkg/hooks
pkg/i18n
pkg/initials
pkg/jsonapi Package jsonapi is for using the JSON-API format: parsing, serialization, checking the content-type, etc.
pkg/keymgmt
pkg/limits
pkg/lock
pkg/logger
pkg/mail
pkg/manager
pkg/metadata
pkg/metrics
pkg/prefixer
pkg/realtime
pkg/registry
pkg/shortcut Package shortcut can be used to manipulate files in the .url format (from windows).
pkg/statik Package contains a program that generates code to register a directory and its contents as zip data for statik file system.
pkg/tlsclient
pkg/utils
tests/integration
tests/oidc
tests/swift
tests/testutils
web Package web Cozy Stack API.
web/accounts
web/apps Package apps is the HTTP frontend of the application package.
web/auth Package auth provides register and login handlers
web/bitwarden Package bitwarden exposes an API compatible with the Bitwarden Open-Soure apps.
web/compat
web/contacts Package contacts exposes a route for the myself document.
web/data Package data provide simple CRUD operation on couchdb doc
web/errors
web/files Package files is the HTTP frontend of the vfs package.
web/instances
web/intents
web/jobs
web/middlewares
web/move
web/notes Package notes is about the documents of cozy-notes.
web/notifications
web/oidc
web/permissions
web/public Package public adds some public routes that can be used to give information to anonymous users, or to the not yet authentified cozy owner on its login page.
web/realtime
web/registry
web/remote
web/settings Package settings regroups some API methods to facilitate the usage of the io.cozy settings documents.
web/sharings
web/shortcuts Package shortcuts is about the .url shortcuts.
web/statik
web/status Package status is here just to say that the API is up and that it can access the CouchDB databases, for debugging and monitoring purposes.
web/swift
web/version Package version gives informations about the version of the cozy-stack
worker/archive
worker/exec
worker/log
worker/mails
worker/migrations
worker/moves
worker/notes
worker/push
worker/share
worker/sms
worker/thumbnail
worker/trash
worker/updates