Coder Social home page Coder Social logo

cms's Introduction

YO

cms's People

Contributors

crikke avatar

Watchers

 avatar  avatar  avatar  avatar

cms's Issues

Create content from ContentDefinition

When saving content validation should not be run, this because content which fails validation is still allowed to be saved.
Saving content should only return HTTP 401 depending on if the user has sufficient rights to save content.

Validation is done when publishing content and returns HTTP 400 if validation fails or HTTP 401 if user is not allowed to publish content

UI

  1. Get ContentDefinition
  2. Get all PropertyDefinitions for given Contentdefinition
  3. Set Property Fields

Creating new content should only require ContentDefinitionID,

Up

Todo

  • Save ContentName localized
  • Match and validate content fields with PropertyDefinitions

PropertyDefinition Validation

Rules

  • Required
  • Regex
  • Range

Tests

  • Range
  • Rexeg
  • Required

Commands

  • Create rule
  • Update rule
  • Delete rule

Queries

  • Get rule
  • Get all rules

Contentdefinition Status

Status field on contentdefinition

When creating new contentdefinition it has status draft.
Content cannot be created from a contentdefinition with status Draft

  • Published

  • Draft

  • /contentdefinition/{id}/publish

CQRS ContentLoader

You only save one version & locale of content at a time. So domain.ContentData can be simplified.
Same thing when editing content

Writes will have validation that has to be run

Versioning,

  • Fetch single content version from database instead of all versions and selecting the correct version in backend

Siteconfiguration - Should be remade into Workspace

Each workspace owns its data and should be a bounded context, there should not be any cross references between workspaces. Therefore, each workspace should have its own database.

One database for data across all workspaces:

  • Should contain workspaces and their configuration

Each workspace has its own database:

  • ContentTypes

Content Tags

  • Add tags to model
  • Query content by tags
  • Query Tags
  • PUT tag

Content Versioning - Refactor

//! TODO: instead of storing the versionnumber in PublishedVersion, store the actual version there.
//! This will always be the most frequent requested data and by doing this unnecessary logic to query the published version wont be needed.
//! Older versions should be moved to another collection since read speeds isn´t as important.
//! Obviously ContentVersion will need a version field.
//! This will also solve problem with status, since status will only be needed on ContentVersion and not Content

Site Configuration

Multiple instances of ContentManagement has read access. So needs synchronization

  • ContentDeliveryApi: Read only
  • ContentManagementApi: Write & Read

SiteConfiguration

  • Configured Languages
  • Root Page

Todo

  • To synchronize siteconfig RabbitMQ is used.
  • How to get siteconfig on startup?

AuthZ

Enforce that policies exist for given action
Example:
GET /content/foo,
In code check that there exist at least one policy for given action. In this case Read

  • Persist policies in database

Site Configuration

Should contentmanagement be responsible for admin related tasks?

SiteConfiguration:

  • Endpoint update languages

ContentType

Content & ContentDefinition are decoupled, when saving content it is Validated against the contentdefinition.
There is no need to version ContentDefinition because content can only be of the latest version of ContentDefinition.

Todo

  • Queries
  1. Fetch ContentType.
  2. Edit Content
  3. When publishing or saving draft, run validation
  • If publishing and validation passes, set status published
  • If validation fails or draft, set status draft.
  1. Send Message that content has been saved with its status

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.