MCPcopy Index your code
hub / github.com/cozy/cozy-stack

github.com/cozy/cozy-stack @1.6.56

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.6.56 ↗ · + Follow
7,160 symbols 35,011 edges 726 files 3,149 documented · 44%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Twake Workplace

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 be 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:

License

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

Extension points exported contracts — how you extend this code

FilePather (Interface)
FilePather is an interface for computing the fullpath of a filedoc [7 implementers]
model/vfs/vfs.go
Object (Interface)
Object is an interface to serialize something to a JSON-API Object [44 implementers]
pkg/jsonapi/data.go
Shutdowner (Interface)
Shutdowner is an interface with a Shutdown method to gracefully shutdown a running process. [7 implementers]
pkg/utils/shutdowner.go
Handler (Interface)
Handler processes messages for a queue. Return nil to ack, or an error to requeue. [10 implementers]
pkg/rabbitmq/rabbitmq.go
Doc (Interface)
Doc is an interface for a object with DocType, ID [64 implementers]
pkg/realtime/realtime.go
Doc (Interface)
Doc is the interface that encapsulate a couchdb document, of any serializable type. This interface defines method to set [64 …
pkg/couchdb/couchdb.go
Trigger (Interface)
Trigger interface is used to represent a trigger. [5 implementers]
model/job/scheduler.go
Authorizer (Interface)
Authorizer is an interface to represent any element that can be used as a token bearer. [4 implementers]
client/request/request.go

Core symbols most depended-on inside this repo

Run
called by 1321
model/app/installer.go
JSON
called by 1051
pkg/couchdb/errors.go
String
called by 842
cmd/tools.go
Errorf
called by 750
pkg/logger/logger.go
CreateTestClient
called by 536
tests/testutils/test_utils.go
Logger
called by 467
worker/exec/common.go
Path
called by 425
model/vfs/permissions.go
GetInstance
called by 401
web/middlewares/instance.go

Shape

Function 3,191
Method 3,017
Struct 732
TypeAlias 84
Interface 73
Class 47
FuncType 16

Languages

Go95%
Ruby5%
TypeScript1%

Modules by API surface

model/vfs/vfs.go121 symbols
web/files/files.go97 symbols
web/sharings/drives_test.go88 symbols
model/sharing/sharing.go77 symbols
web/jobs/jobs.go70 symbols
pkg/config/config/config.go70 symbols
web/sharings/drives.go68 symbols
pkg/couchdb/couchdb.go66 symbols
model/instance/instance.go63 symbols
web/files/paginated.go61 symbols
model/app/webapp.go59 symbols
model/vfs/vfsafero/impl.go56 symbols

For agents

$ claude mcp add cozy-stack \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact