Skip to content

SasLord/platform-1

 
 

Repository files navigation

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:

yarn
docker run -d -p 127.0.0.1:27017:27017 mongo
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

Run with Server and MongoDb (obsolete, version 1)

  1. You have to run mongodb instance locally. Easiest way to do this is to run official mongodb container: docker run -d -p 27017:27017 mongo.
  2. Initialize database with boot package: yarn && ./scripts/build-packages.sh && yarn workspace @anticrm/dev-boot dump. Note: the boot will use MONGODB_URI environment variable, failover to localhost and default mongodb port if variable not present.
  3. From the Cloud repo run WebSocket server: yarn && yarn workspace @anticrm/server build && yarn workspace @anticrm/server start.
  4. From the Platform (this) repo run prod launcher: yarn workspace prod serve.

Continuous Integration (obsolete, version 1)

Development

Enable project eslint

yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard

Packages

No packages published

Languages

  • TypeScript 56.2%
  • Svelte 37.5%
  • JavaScript 5.4%
  • Other 0.9%