/platform-0.2

Hardcore Engineering SaaS Platform

Primary LanguageTypeScriptEclipse Public License 2.0EPL-2.0

Anticrm Platform

Gitter GitHub last commit CI JavaScript Style Guide

Code structure

Anticrm code falls into three major parts: packages, plugins and server.

  • packages contains code shared among client and server, except packages/platform which defines plugin architecture and client-side only. These packages defines most of the core Anticrm concepts.
  • plugins contains client-side code packaged in form of Anticrm Plugins.
  • server contains server-side platform code.

Here's the breakdown of the repo:

  • Packages:

    • @anticrm/foundation –- Anticrm Platform Foundation Types.
    • @anticrm/platform -- Plugin architecture and implementation. Client-side only.
    • @anticrm/core -- Core concepts shared by Client plugins and Server components.
    • @anticrm/model -- Utils to define and manage domain models. Used by tooling, not a part of client/server runtimes.
  • Plugins:

More on Code Structure.

Install and Run

Note: Please use nodejs version 14.x or later!

Use following commands to install and run demo application:

Running MongoDB in docker:

docker run -d -p 127.0.0.1:27017:27017 mongo

Running MongoDB for MacOS using brew:

brew tap mongodb/brew # Only first time
brew install mongodb-community # Only first time
brew services start mongodb-community # Stop could be used to stop.
yarn
# start Mongo using Docker or locally
yarn workspace @anticrm/tool create-workspace workspace --organization "My Organization"
yarn workspace @anticrm/tool create-user john.appleseed@gmail.com -w workspace -p 123 -f "John Appleseed"
yarn workspace @anticrm/tool create-user brain.appleseed@gmail.com -w workspace -p 123 -f "Brain Appleseed"
yarn workspace @anticrm/server start

Open new console and run:

yarn workspace @anticrm/server-front start

Open one more console and run:

yarn workspace prod dev

You need to log in first, go to: http://localhost:8080
After login you will be redirected to default application (ex: 'workbench')

Add more users:

yarn workspace @anticrm/tool create-user john.someseed@gmail.com -w workspace -p 123 -f "John Someseed"

Upgrade DB models:

yarn workspace @anticrm/tool upgrade-workspace workspace

The Platform Documentation

Development

Git hooks

pre-commit

Create symlink to format and autofix changed files on commit:

ln -s ../../scripts/hooks/pre-commit .git/hooks/pre-commit

Generate documenation

yarn install && yarn build && yarn build:docs && cd docs && npm install && npm run build