Skip to content

Commit

Permalink
docs: Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Mar 21, 2022
1 parent 83dceb0 commit 8795eba
Show file tree
Hide file tree
Showing 65 changed files with 189 additions and 350 deletions.
4 changes: 3 additions & 1 deletion .github/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
<meta content="https://adrien2p.github.io/medusa-extender/#/" property="og:url"/>
<meta content="https://github.com/adrien2p/medusa-extender/blob/assets/assets/logo.png?raw=true"
property="og:image"/>
<meta content="Do you want to extend existing entities to add custom fields? Do you want to implement your own feature or extend existing one in a module way? Did you ever wanted to build something more than a single store? Well, this project has been made to help you reach you goal. It is now possible to customise Medusa in a way you will be able to enjoy all the awesome features that Medusa provides you but with the possibility to take your e-commerce project to the next level 🚀"
<meta content="The extender provides an out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications.
In also increase medusa extensibility and customisation for special use cases. It comes with handy
decorators approach to increase the DX and full typings support for easier development. It is a complement to medusa but not a replacement 🚀"
name="og:description">
<meta content="summary_large_image" name="twitter:card">

Expand Down
51 changes: 3 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
* [Getting started :rocket:](#getting-started-rocket)
* [Existing medusa project](#existing-medusa-project)
* [From server starter](#from-server-starter)
* [Features :monocle_face:](#features-monocle_face)
* [Non exhaustive list](#non-exhaustive-list)
* [Directory Architecture](#directory-architecture)
* [Application Architecture](#application-architecture)
* [CLI `medex`](#cli-medex)
* [Commands references](https://adrien2p.github.io/medusa-extender/#/?id=commands-references)
* [Command `generate` reference](https://adrien2p.github.io/medusa-extender/#/?id=command-generate-reference)
Expand Down Expand Up @@ -155,52 +153,9 @@ to be able to run the migrations and show the list of applied and to be applied

To see more about the usage and references, [click here to see the documentation](https://adrien2p.github.io/medusa-extender/#/?id=cli-medex)

[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#features-monocle_face)
# Application Architecture

# Features :monocle_face:


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#non-exhaustive-list)

## Non exhaustive list

Here is a list of the features that you can find in that package

- [Create or extend an entity](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [Create or extend a repository](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [Create or extend a service](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [Create middleware before or after medusa authentication strategy](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [Create new migrations](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [Create new router handler](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [Extend validators from medusa to includes custom fields](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [Emit entity subscribers events](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [Group your component by module](https://adrien2p.github.io/medusa-extender/#/?id=module)
- [Register component dynamically with dynamic module](https://adrien2p.github.io/medusa-extender/#/?id=module-dynamic-module)
- [Listen to entity subscribers and handle them wherever you want](https://adrien2p.github.io/medusa-extender/#/?id=decorators)
- [CLI](https://adrien2p.github.io/medusa-extender/#/?id=cli-medex)
- [Generate new components](https://adrien2p.github.io/medusa-extender/#/?id=cli-medex)
- [Migrate your data](https://adrien2p.github.io/medusa-extender/#/?id=cli-medex)
- [Monitoring `(Optional module)`](https://adrien2p.github.io/medusa-extender/#/?id=monitoring)
- [Multi-tenancy architecture `(Optional module)`](#https://adrien2p.github.io/medusa-extender/#/?id=multi-tenancy)

All those features aims to help you build what you want such as

- Creating and managing a marketplace
- Creating a media store to sell nft - video - images - keys - etc.
- And basically create whatever you want on top of `@medusajs`

Share your code

- Build shareable modules/plugins to use across your project or to share with the community


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#architecture)

## Directory Architecture

Using this package also allow you to manage your architecture as you want.
you will not be limited by any constraint as long as the component are decorated
and the modules are referenced into the main file to be loaded, everything is fine.
Using this package help you organise your code in a module approach.
That means that you can go for a modular architecture and decoupled
your code depending on your domains.

Expand Down
2 changes: 1 addition & 1 deletion blueprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"input": "blueprint.md",
"output": "documentation/_README_BUILT.md",
"line": "cloudy",
"text": "Fully customisable medusa, create custom fields in any entity, implement your own feature or extend existing one in minutes! Make your own architecture or choose the modular architecture provided.\n Build a store, marketplace, media store and anything you want to do you can do it.\n Enjoy the full power of Medusa with extra badass features :rocket:",
"text": "The extender provides an out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications.\nIn also increase medusa extensibility and customisation for special use cases. It comes with handy\ndecorators approach to increase the DX and full typings support for easier development. It is a complement to medusa but not a replacement :rocket:",
"documentationConfig": {
"markdown": {
"titleLevel": 2
Expand Down
57 changes: 7 additions & 50 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
</p>

<p align="center">
<b>:syringe: Medusa on steroid, take your medusa project to the next level with some badass features :rocket:</b></br>
<sub>Fully customisable medusa, create custom fields in any entity, implement your own feature or extend existing one in minutes! Make your own architecture or choose the modular architecture provided.
Build a store, marketplace, media store and anything you want to do you can do it.
Enjoy the full power of Medusa with extra badass features :rocket:<sub>
<b>Medusa on steroid, take your medusa project to the next level with some badass features :rocket:</b></br>
<sub>The extender provides an out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications.
In also increase medusa extensibility and customisation for special use cases. It comes with handy
decorators approach to increase the DX and full typings support for easier development. It is a complement to medusa but not a replacement :rocket:<sub>
</p>

<br />
Expand All @@ -51,9 +51,7 @@
* [Getting started :rocket:](#getting-started-rocket)
* [Existing medusa project](#existing-medusa-project)
* [From server starter](#from-server-starter)
* [Features :monocle_face:](#features-monocle_face)
* [Non exhaustive list](#non-exhaustive-list)
* [Directory Architecture](#directory-architecture)
* [Directory Architecture](#directory-architecture)
* [CLI `medex`](#cli-medex)
* [Commands references](#commands-references)
* [Command `generate` reference](#command-generate-reference)
Expand Down Expand Up @@ -146,52 +144,11 @@ npm run start
That's it, your server is now up and running :rocket:


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#features-monocle_face)

# Features :monocle_face:


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#non-exhaustive-list)

## Non exhaustive list

Here is a list of the features that you can find in that package

- [Create or extend an entity](#decorators)
- [Create or extend a repository](#decorators)
- [Create or extend a service](#decorators)
- [Create middleware before or after medusa authentication strategy](#decorators)
- [Create new migrations](#decorators)
- [Create new router handler](#decorators)
- [Extend validators from medusa to includes custom fields](#decorators)
- [Emit entity subscribers events](#decorators)
- [Group your component by module](#module)
- [Register component dynamically with dynamic module](#module-dynamic-module)
- [Listen to entity subscribers and handle them wherever you want](#decorators)
- [CLI](#cli-medex)
- [Generate new components](#cli-medex)
- [Migrate your data](#cli-medex)
- [Monitoring `(Optional module)`](#monitoring)
- [Multi-tenancy architecture `(Optional module)`](#multi-tenancy)

All those features aims to help you build what you want such as

- Creating and managing a marketplace
- Creating a media store to sell nft - video - images - keys - etc.
- And basically create whatever you want on top of `@medusajs`

Share your code

- Build shareable modules/plugins to use across your project or to share with the community


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#directory-architecture)

## Directory Architecture
# Directory Architecture

Using this package also allow you to manage your architecture as you want.
you will not be limited by any constraint as long as the component are decorated
and the modules are referenced into the main file to be loaded, everything is fine.
Using this package help you organise your code in a module approach.
That means that you can go for a modular architecture and decoupled
your code depending on your domains.

Expand Down
8 changes: 4 additions & 4 deletions docs/classes/Medusa.Medusa-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Load medusa and apply all components

#### Defined in

[src/Medusa.ts:39](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/Medusa.ts#L39)
[src/Medusa.ts:39](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/Medusa.ts#L39)

## Properties

Expand All @@ -46,7 +46,7 @@ Load medusa and apply all components

#### Defined in

[src/Medusa.ts:32](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/Medusa.ts#L32)
[src/Medusa.ts:32](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/Medusa.ts#L32)

___

Expand All @@ -56,7 +56,7 @@ ___

#### Defined in

[src/Medusa.ts:33](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/Medusa.ts#L33)
[src/Medusa.ts:33](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/Medusa.ts#L33)

## Methods

Expand All @@ -76,4 +76,4 @@ ___

#### Defined in

[src/Medusa.ts:47](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/Medusa.ts#L47)
[src/Medusa.ts:47](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/Medusa.ts#L47)
2 changes: 1 addition & 1 deletion docs/classes/core_componentMap.ComponentMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ Map.get

#### Defined in

[src/core/componentMap.ts:4](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/componentMap.ts#L4)
[src/core/componentMap.ts:4](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/componentMap.ts#L4)
12 changes: 6 additions & 6 deletions docs/classes/core_event_emmiter.Internals.CustomEventEmmiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ EventEmitter.constructor

#### Defined in

[src/core/event-emmiter.ts:22](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/event-emmiter.ts#L22)
[src/core/event-emmiter.ts:22](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/event-emmiter.ts#L22)

## Properties

Expand All @@ -51,7 +51,7 @@ EventEmitter.constructor

#### Defined in

[src/core/event-emmiter.ts:20](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/event-emmiter.ts#L20)
[src/core/event-emmiter.ts:20](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/event-emmiter.ts#L20)

## Methods

Expand Down Expand Up @@ -80,7 +80,7 @@ Emit an asynchrone event entity based and wait for the result.

#### Defined in

[src/core/event-emmiter.ts:79](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/event-emmiter.ts#L79)
[src/core/event-emmiter.ts:79](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/event-emmiter.ts#L79)

___

Expand Down Expand Up @@ -110,7 +110,7 @@ Register a new event handler.

#### Defined in

[src/core/event-emmiter.ts:32](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/event-emmiter.ts#L32)
[src/core/event-emmiter.ts:32](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/event-emmiter.ts#L32)

___

Expand All @@ -132,7 +132,7 @@ Apply all event handlers hold by the `listenerDescriptor`.

#### Defined in

[src/core/event-emmiter.ts:44](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/event-emmiter.ts#L44)
[src/core/event-emmiter.ts:44](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/event-emmiter.ts#L44)

___

Expand All @@ -146,4 +146,4 @@ ___

#### Defined in

[src/core/event-emmiter.ts:67](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/event-emmiter.ts#L67)
[src/core/event-emmiter.ts:67](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/event-emmiter.ts#L67)
26 changes: 13 additions & 13 deletions docs/classes/core_logger.Logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Internal logger to display information about the build.

#### Defined in

[src/core/logger.ts:20](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L20)
[src/core/logger.ts:20](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L20)

## Properties

Expand All @@ -59,7 +59,7 @@ Internal logger to display information about the build.

#### Defined in

[src/core/logger.ts:10](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L10)
[src/core/logger.ts:10](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L10)

___

Expand All @@ -69,7 +69,7 @@ ___

#### Defined in

[src/core/logger.ts:9](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L9)
[src/core/logger.ts:9](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L9)

___

Expand All @@ -79,7 +79,7 @@ ___

#### Defined in

[src/core/logger.ts:8](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L8)
[src/core/logger.ts:8](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L8)

## Accessors

Expand All @@ -93,7 +93,7 @@ ___

#### Defined in

[src/core/logger.ts:16](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L16)
[src/core/logger.ts:16](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L16)

___

Expand All @@ -107,7 +107,7 @@ ___

#### Defined in

[src/core/logger.ts:12](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L12)
[src/core/logger.ts:12](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L12)

## Methods

Expand All @@ -131,7 +131,7 @@ Build logs taking in count the level color

#### Defined in

[src/core/logger.ts:89](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L89)
[src/core/logger.ts:89](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L89)

___

Expand All @@ -154,7 +154,7 @@ Display error logs in red immediately

#### Defined in

[src/core/logger.ts:66](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L66)
[src/core/logger.ts:66](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L66)

___

Expand All @@ -170,7 +170,7 @@ display all queues logs and then reset the queue.

#### Defined in

[src/core/logger.ts:73](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L73)
[src/core/logger.ts:73](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L73)

___

Expand All @@ -193,7 +193,7 @@ Display log immediately.

#### Defined in

[src/core/logger.ts:48](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L48)
[src/core/logger.ts:48](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L48)

___

Expand All @@ -216,7 +216,7 @@ Push new logs to queue and then show them later on.

#### Defined in

[src/core/logger.ts:34](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L34)
[src/core/logger.ts:34](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L34)

___

Expand All @@ -239,7 +239,7 @@ Display warning immediately.

#### Defined in

[src/core/logger.ts:57](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L57)
[src/core/logger.ts:57](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L57)

___

Expand All @@ -260,4 +260,4 @@ ___

#### Defined in

[src/core/logger.ts:25](https://github.com/adrien2p/medusa-extender/blob/f0b5bec/src/core/logger.ts#L25)
[src/core/logger.ts:25](https://github.com/adrien2p/medusa-extender/blob/83dceb0/src/core/logger.ts#L25)
Loading

0 comments on commit 8795eba

Please sign in to comment.