1.41.2 • Published 2 years ago

@cotype/core v1.41.2

Weekly downloads
46
License
SEE LICENSE IN LI...
Repository
github
Last release
2 years ago

@cotype/core

CircleCI

Cotype manages structured content that can accessed via APIs. The system itself is not concerned with the actual rendering of the data - this is left completely to the consumer which could be a server that generates HTML, a client-rendered web app or a native app that reads the data via HTTP.


Cotype is not free software.
In order to run cotype on a public server you must purchase a valid license.
Please contact info@cellular.de for inquiries.


Content APIs

The data can be accessed either via REST or GraphQL whichever better fits the needs of the particular application. For either flavor the server provides an interactive API explorer that developers can use to browse the content model.

NOTE: Both content APIs are read-only. Modifying content is only possible via the management API that is used by the UI.

Content Model

The content model is defined in JSON. It describes what content types exist, which fields they have and how they are edited.

Currently the content model is part of the server and changes require a re-deployment/restart in order to take effect. But since the model is plain JSON it would be pretty easy to manage content types directly in the CMS and store is alongside the data.

Data Storage

The data is stored in a PostgreSQL database. Built-In entities (like users, roles, etc.) live in a traditional relational model, whereas all content is stored as JSON in a common table. Content is immutable and each change creates a new revision. If the publish/draft system is enabled for a given content type, API clients won't see the changes until they are published (or a preview is requested).

There are two materialized views (one for all published, one for the latest versions) that have indexes on the JSON data as well as a full-text index for searching.

Media Handling

when files are uploaded, only the meta data is stored in the database while the binary data is stored somewhere else. By default it is written to the local filesystem but there are plugins for other storage solutions like Amazon S3.

Session Handling

The server uses a cookie-session that holds nothing but the user's id. The cookie is signed to prevent any sort of tampering. Therefore a secret must be provided via the SESSION_SECRET env var. If omitted, a random string will be generated, which means that sessions will become invalid once the server is restarted.

Database

The database connection of the server can be configured by providing an adapter

import { knexAdapter, postgresqlAdapter, init } from "@cotype/core";

init({ persistenceAdapter: /* your adapter here... */ });

Architecture

This repo provides the @cotype/core package

internally we have two other packages: client and demo

  • demo: an example/dev configuration for the server
  • client: the frontend which is bundled within the server releases

Development

To bootstrap the project and start a development server do the following:

npm install #once
npm start

Login

When the server is started for the first time, the necessary tables are created and an inital admin user is created with the following credentials:

Email: admin@cotype.dev
Password: admin
1.41.2

2 years ago

1.41.1

3 years ago

1.41.0

3 years ago

1.40.0

4 years ago

1.39.3

4 years ago

1.39.2

4 years ago

1.39.1

4 years ago

1.39.0

4 years ago

1.38.1

4 years ago

1.38.0

4 years ago

1.37.0

4 years ago

1.36.5

4 years ago

1.36.4

4 years ago

1.36.3

4 years ago

1.36.2

4 years ago

1.36.1

4 years ago

1.36.0

4 years ago

1.35.5

4 years ago

1.35.4

4 years ago

1.35.3

4 years ago

1.35.2

4 years ago

1.35.1

4 years ago

1.35.0

4 years ago

1.34.2

4 years ago

1.34.1

4 years ago

1.34.0

4 years ago

1.33.1

4 years ago

1.33.0

4 years ago

1.32.2

4 years ago

1.32.1

4 years ago

1.32.0

4 years ago

1.31.2

5 years ago

1.31.1

5 years ago

1.31.0

5 years ago

1.30.3

5 years ago

1.30.2

5 years ago

1.30.1

5 years ago

1.30.0

5 years ago

1.29.0

5 years ago

1.28.3

5 years ago

1.28.2

5 years ago

1.28.1

5 years ago

1.28.0

5 years ago

1.27.1

5 years ago

1.27.0

5 years ago

1.26.0

5 years ago

1.25.3

5 years ago

1.25.2

5 years ago

1.25.1

5 years ago

1.25.0

5 years ago

1.24.7

5 years ago

1.24.6

5 years ago

1.24.5

5 years ago

1.24.4

5 years ago

1.24.3

5 years ago

1.24.2

5 years ago

1.24.1

5 years ago

1.24.0

5 years ago

1.23.4

5 years ago

1.23.3

5 years ago

1.23.2

5 years ago

1.23.1

5 years ago

1.23.0

5 years ago

1.22.0

5 years ago

1.21.1

5 years ago

1.21.0

5 years ago

1.20.11

5 years ago

1.20.10

5 years ago

1.20.9

5 years ago

1.20.8

5 years ago

1.20.7

5 years ago

1.20.6

5 years ago

1.20.5

5 years ago

1.20.4

5 years ago

1.20.3

5 years ago

1.20.2

5 years ago

1.20.1

5 years ago

1.20.0

5 years ago

1.19.2

5 years ago

1.19.1

5 years ago

1.19.0

5 years ago

1.18.1

5 years ago

1.18.0

5 years ago

1.17.0

5 years ago

1.16.6

5 years ago

1.16.5

5 years ago

1.16.4

5 years ago

1.16.3

5 years ago

1.16.2

5 years ago

1.16.1

5 years ago

1.16.0

5 years ago

1.15.0

5 years ago

1.14.7

5 years ago

1.14.6

5 years ago

1.14.5

5 years ago

1.14.4

5 years ago

1.14.3

5 years ago

1.14.2

5 years ago

1.14.1

5 years ago

1.14.0

5 years ago

1.13.4

5 years ago

1.13.3

5 years ago

1.13.2

5 years ago

1.13.0-debug-4

5 years ago

1.13.1

5 years ago

1.13.0-debug-3

5 years ago

1.13.0-debug-2

5 years ago

1.13.0

5 years ago

1.12.5

5 years ago

1.12.4

5 years ago

1.13.0-debug-1

5 years ago

1.13.0-debug-0

5 years ago

1.12.3

5 years ago

1.12.2

5 years ago

1.12.1

5 years ago

1.12.0

5 years ago

1.11.1

5 years ago

1.11.0

5 years ago

1.10.0

5 years ago

1.9.2

5 years ago

1.9.1

5 years ago

1.9.0-debug-5

5 years ago

1.9.0-debug-4

5 years ago

1.9.0-debug-3

5 years ago

1.9.0-debug-2

5 years ago

1.9.0-debug-1

5 years ago

1.9.0-debug-0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.4

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.4

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago