@magek/mcp-server 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +42 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +25 -0
  4. package/dist/prompts/cqrs-flow.d.ts +15 -0
  5. package/dist/prompts/cqrs-flow.js +252 -0
  6. package/dist/prompts/troubleshooting.d.ts +15 -0
  7. package/dist/prompts/troubleshooting.js +239 -0
  8. package/dist/resources/cli-reference.d.ts +13 -0
  9. package/dist/resources/cli-reference.js +193 -0
  10. package/dist/resources/documentation.d.ts +18 -0
  11. package/dist/resources/documentation.js +62 -0
  12. package/dist/server.d.ts +5 -0
  13. package/dist/server.js +127 -0
  14. package/dist/utils/docs-loader.d.ts +19 -0
  15. package/dist/utils/docs-loader.js +111 -0
  16. package/docs/advanced/custom-templates.md +96 -0
  17. package/docs/advanced/data-migrations.md +181 -0
  18. package/docs/advanced/environment-configuration.md +74 -0
  19. package/docs/advanced/framework-packages.md +17 -0
  20. package/docs/advanced/health/sensor-health.md +389 -0
  21. package/docs/advanced/instrumentation.md +135 -0
  22. package/docs/advanced/register.md +119 -0
  23. package/docs/advanced/sensor.md +10 -0
  24. package/docs/advanced/testing.md +96 -0
  25. package/docs/advanced/touch-entities.md +45 -0
  26. package/docs/architecture/command.md +367 -0
  27. package/docs/architecture/entity.md +214 -0
  28. package/docs/architecture/event-driven.md +30 -0
  29. package/docs/architecture/event-handler.md +108 -0
  30. package/docs/architecture/event.md +145 -0
  31. package/docs/architecture/notifications.md +54 -0
  32. package/docs/architecture/queries.md +207 -0
  33. package/docs/architecture/read-model.md +507 -0
  34. package/docs/contributing.md +349 -0
  35. package/docs/docs-index.json +200 -0
  36. package/docs/features/error-handling.md +204 -0
  37. package/docs/features/event-stream.md +35 -0
  38. package/docs/features/logging.md +81 -0
  39. package/docs/features/schedule-actions.md +44 -0
  40. package/docs/getting-started/ai-coding-assistants.md +181 -0
  41. package/docs/getting-started/coding.md +543 -0
  42. package/docs/getting-started/installation.md +143 -0
  43. package/docs/graphql.md +1213 -0
  44. package/docs/index.md +62 -0
  45. package/docs/introduction.md +58 -0
  46. package/docs/magek-arch.png +0 -0
  47. package/docs/magek-cli.md +67 -0
  48. package/docs/magek-logo.svg +1 -0
  49. package/docs/security/authentication.md +189 -0
  50. package/docs/security/authorization.md +242 -0
  51. package/docs/security/security.md +16 -0
  52. package/package.json +46 -0
@@ -0,0 +1,349 @@
1
+ ---
2
+ title: "Contributing"
3
+ group: "Guides"
4
+ ---
5
+
6
+ # Contributing to Magek
7
+
8
+ > **DISCLAIMER:** The Magek docs are undergoing an overhaul. Most of what's written here applies, but expect some hiccups in the build process
9
+ > that is described here, as it changed in the last version. New documentation will have this documented properly.
10
+
11
+ Thanks for taking the time to contribute to Magek. It is an open-source project and it wouldn't be possible without people like you 🙏🎉
12
+
13
+ This document is a set of guidelines to help you contribute to Magek, which is hosted on the [`theam/magek`](https://github.com/theam/magek) GitHub
14
+ repository. These aren’t absolute laws, use your judgment and common sense 😀.
15
+ Remember that if something here doesn't make sense, you can also propose a change to this document.
16
+
17
+ ## Code of Conduct
18
+
19
+ This project and everyone participating in it are expected to uphold the [Magek's Code of Conduct](https://github.com/theam/magek/blob/main/CODE_OF_CONDUCT.md), based on the Covenant Code of Conduct.
20
+ If you see unacceptable behavior, please communicate so to `info@theagilemonkeys.com`.
21
+
22
+ ## I don't want to read this whole thing, I just have a question
23
+
24
+ Go ahead and ask the community in [Discord](https://discord.com/invite/bDY8MKx) or [create a new issue](https://github.com/theam/magek/issues).
25
+
26
+ ## What should I know before I get started?
27
+
28
+ ### Packages
29
+
30
+ Magek is divided in many different packages. The criteria to split the code in packages is that each package meets at least one of the following conditions:
31
+
32
+ - They must be run separately, for instance, the CLI is run locally, while the server code runs as a standalone server or serverless function.
33
+ - They contain code that is used by at least two of the other packages.
34
+ - They're an adapter implementation of some abstract part of the framework (for instance, the storage adapter packages).
35
+
36
+ The packages are managed using [rush](https://rushjs.io/) and [npm](https://npmjs.com), if you run `rush build`, it will build all the packages.
37
+
38
+ The packages are published to `npmjs` under the prefix `@magek/`, their purpose is as follows:
39
+
40
+ - `cli` - You guessed it! This package is the `magek` command-line tool, it interacts only with the core package in order to load the project configuration.
41
+ - `core` - This one contains all the framework runtime logic. Stuff like the generation of the config or the commands and events handling happens here.
42
+ - `server` - Local development server with Fastify-based HTTP, WebSocket, SSE support, and all infrastructure components.
43
+ - `common` - This package defines shared types and helpers used across all other packages. It includes the main Magek concepts like:
44
+ - Entity
45
+ - Command
46
+ - etc…
47
+
48
+ This is a dependency graph that shows the dependencies among all packages, including the application using Magek:
49
+ ![Magek packages dependencies](https://raw.githubusercontent.com/theam/magek/main/docs/img/packages-dependencies.png)
50
+
51
+ ## How Can I Contribute?
52
+
53
+ Contributing to an open source project is never just a matter of code, you can help us significantly by just using Magek and interacting with our community. Here you'll find some tips on how to do it effectively.
54
+
55
+ ### Reporting Bugs
56
+
57
+ Before creating a bug report, please search for similar issues to make sure that they're not already reported. If you don't find any, go ahead and create an issue including as many details as possible. Fill out the required template, the information requested helps us to resolve issues faster.
58
+
59
+ > **Note:**
60
+ > If you find a Closed issue that seems related to the issues that you're experiencing, make sure to reference it in the body of your new one by writing its number like this => #42 (Github will autolink it for you).
61
+
62
+ Bugs are tracked as GitHub issues. Explain the problem and include additional details to help maintainers reproduce the problem:
63
+
64
+ - Use a clear and descriptive title for the issue to identify the problem.
65
+ - Describe the exact steps which reproduce the problem in as many details as possible.
66
+ - Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
67
+ - Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
68
+ - Explain which behavior you expected to see instead and why.
69
+ - If the problem is related to performance or memory, include a CPU profile capture with your report.
70
+
71
+ ### Suggesting Enhancements
72
+
73
+ Enhancement suggestions are tracked as GitHub issues. Make sure you provide the following information:
74
+
75
+ - Use a clear and descriptive title for the issue to identify the suggestion.
76
+ - Provide a step-by-step description of the suggested enhancement in as many details as possible.
77
+ - Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
78
+ - Describe the current behavior and explain which behavior you expected to see instead and why.
79
+ - Explain why this enhancement would be useful to most Magek users and isn't something that can or should be implemented as a community package.
80
+ - List some other libraries or frameworks where this enhancement exists.
81
+
82
+ ### Improving documentation
83
+
84
+ [Magek documentation](https://docs.magek.ai) is treated as a live document that continues improving on a daily basis. If you find something that is missing or can be improved, please contribute, it will be of great help for other developers.
85
+ To contribute you can use the button "Edit on github" at the top of each chapter.
86
+
87
+ #### Documentation principles and practices
88
+
89
+ The ultimate goal of a technical document is to translate the knowledge from the technology creators into the reader's mind so that they learn. The challenging
90
+ part here is the one in which they learn. It is challenging because, under the same amount of information, a person can suffer an information overload because
91
+ we (humans) don't have the same information-processing capacity. That idea is going to work as our compass, it should drive our efforts so people with less
92
+ capacity is still able to follow and understand our documentation.
93
+
94
+ To achieve our goal we propose writing documentation following these principles:
95
+
96
+ 1. Clean and Clear
97
+ 2. Simple
98
+ 3. Coherent
99
+ 4. Explicit
100
+ 5. Attractive
101
+ 6. Inclusive
102
+ 7. Cohesive
103
+
104
+ ##### Principles
105
+
106
+ **1. Clean and Clear**
107
+
108
+ Less is more. Apple is, among many others, a good example of creating clean and clear content, where visual elements are carefully chosen to look beautiful
109
+ (e.g. [Apple's swift UI](https://developer.apple.com/tutorials/swiftui)) and making the reader getting the point as soon as possible.
110
+
111
+ The intention of every section, paragraph, and sentence must be clear, we should avoid writing details of two different things even when they are related.
112
+ It is better to link pages and keep the focus and the intention clear, Wikipedia is the best example on this.
113
+
114
+ **2. Simple**
115
+
116
+ Technical writings deal with different backgrounds and expertise from the readers. We should not assume the reader knows everything we are talking about
117
+ but we should not explain everything in the same paragraph or section. Every section has a goal to stick to the goal and link to internal or external resources
118
+ to go deeper.
119
+
120
+ Diagrams are great tools, you know a picture is worth more than a thousand words unless that picture contains too much information.
121
+ Keep it simple intentionally omitting details.
122
+
123
+ **3. Coherent**
124
+
125
+ The documentation tells a story. Every section should integrate naturally without making the reader switch between different contexts. Text, diagrams,
126
+ and code examples should support each other without introducing abrupt changes breaking the reader’s flow. Also, the font, colors, diagrams, code samples,
127
+ animations, and all the visual elements we include, should support the story we are telling.
128
+
129
+ **4. Explicit**
130
+
131
+ Go straight to the point without assuming the readers should know about something. Again, link internal or external resources to clarify.
132
+
133
+ The index of the whole content must be visible all the time so the reader knows exactly where they are and what is left.
134
+
135
+ **5. Attractive**
136
+
137
+ Our text must be nice to read, our diagrams delectable to see, and our site… a feast for the eyes!!
138
+
139
+ **6. Inclusive**
140
+
141
+ Everybody should understand our writings, especially the topics at the top. We have arranged the documentation structure in a way that anybody can dig
142
+ deeper by just going down so, sections 1 to 4 must be suitable for all ages.
143
+
144
+ Use gender-neutral language to avoid the use of he, him, his to refer to undetermined gender. It is better to use their or they as a gender-neutral
145
+ approach than s/he or similars.
146
+
147
+ **7. Cohesive**
148
+
149
+ Writing short and concise sentences is good, but remember to use proper connectors (“Therefore”, “Besides”, “However”, “thus”, etc) that provide a
150
+ sense of continuation to the whole paragraph. If not, when people read the paragraphs, their internal voice sounds like a robot with unnatural stops.
151
+
152
+ For example, read this paragraph and try to hear your internal voice:
153
+
154
+ > Entities are created on the fly, by reducing the whole event stream. You shouldn't assume that they are stored anywhere. Magek does create
155
+ automatic snapshots to make the reduction process efficient. You are the one in charge of writing the reducer function.
156
+
157
+ And now read this one:
158
+
159
+ > Entities are created on the fly by reducing the whole event stream. While you shouldn't assume that they are stored anywhere, Magek does create automatic
160
+ snapshots to make the reduction process efficient. In any case, this is opaque to you and the only thing you should care is to provide the reducer function.
161
+
162
+ Did you feel the difference? The latter makes you feel that everything is connected, it is more cohesive.
163
+
164
+ ##### Practices
165
+
166
+ There are many writing styles depending on the type of document. It is common within technical and scientific writing to use Inductive and/or Deductive styles
167
+ for paragraphs. They have different outcomes and one style may suit better in one case or another, that is why it is important to know them, and decide which
168
+ one to use in every moment. Let’s see the difference with 2 recursive examples.
169
+
170
+ **Deductive paragraphs ease the reading for advanced users but still allows you to elaborate on ideas and concepts for newcomers**. In deductive paragraphs,
171
+ the conclusions or definitions appear at the beginning, and then, details, facts, or supporting phrases complete the paragraph’s idea. By placing the
172
+ conclusion in the first sentence, the reader immediately identifies the main point so they can decide to skip the whole paragraph or keep reading.
173
+ If you take a look at the structure of this paragraph, it is deductive.
174
+
175
+ On the other hand, if you want to drive the readers' attention and play with it as if they were in a roller coaster, you can do so by using a different approach.
176
+ In that approach, you first introduce the facts and ideas and then you wrap them with a conclusion. This style is more narrative and forces the reader to
177
+ continue because the main idea is diluted in the whole paragraph. Once all the ideas are placed together, you can finally conclude the paragraph. **This style is
178
+ called Inductive.**
179
+
180
+ The first paragraph is deductive and the last one is inductive. In general, it is better to use the deductive style, but if we stick to one, our writing will start looking weird and maybe boring.
181
+ So decide one or another being conscious about your intention.
182
+
183
+ ### Create your very first GitHub issue
184
+
185
+ [Click here](https://github.com/theam/magek/issues/new) to start making contributions to Magek.
186
+
187
+ ## Your First Code Contribution
188
+
189
+ Unsure where to begin contributing to Magek? You can start by looking through issued tagged as `good-first-issue` and `help-wanted`:
190
+
191
+ - Beginner issues - issues which should only require a few lines of code, and a test or two.
192
+ - Help wanted issues - issues which should be a bit more involved than beginner issues.
193
+
194
+ Both issue lists are sorted by the total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have.
195
+
196
+ Make sure that you assign the chosen issue to yourself to communicate your intention to work on it and reduce the possibilities of other people taking the same assignment.
197
+
198
+ ### Getting the code
199
+
200
+ To start contributing to the project you would need to set up the project in your system, to do so, you must first follow these steps in your terminal.
201
+
202
+ - Install Rush: `npm install -g @microsoft/rush`
203
+
204
+ - Clone the repo and get into the directory of the project: `git clone https://github.com/theam/magek.git && cd magek`
205
+
206
+ - Install project dependencies: `rush update`
207
+
208
+ - Compile the project `rush build`
209
+
210
+ - Add your contribution
211
+
212
+ - Make sure everything works by [executing the unit tests](#running-unit-tests): `rush rest`
213
+
214
+ ### Understanding the "rush monorepo" approach and how dependencies are structured in the project
215
+
216
+ The Magek Framework project is organized following the ["rush monorepo"](https://rushjs.io/) structure. There are several "package.json" files and each one has its purpose with regard to the dependencies you include on them:
217
+
218
+ - The "package.json" files that are on each package root should contain the dependencies used by that specific package. Be sure to correctly differentiate which dependency is only for development and which one is for production.
219
+
220
+ Finally, **always use exact numbers for dependency versions**. This means that if you want to add the dependency "graphql" in version 1.2.3, you should add `"graphql": "1.2.3"` to the corresponding "package.json" file, and never `"graphql": "^1.2.3"` or `"graphql": "~1.2.3"`. This restriction comes from hard problems we've had in the past.
221
+
222
+ ### Running unit tests
223
+
224
+ Unit tests are executed when you type `rush test`. If you want to run the unit tests for an especific package, you should move to the corresponding folder and run one of the following commands:
225
+
226
+ - `rushx test:cli -v`: Run unit tests for the `cli` package.
227
+ - `rushx test:core -v`: Run unit tests for the `core` package.
228
+ - `rushx test:server -v`: Run unit tests for the `server` package.
229
+ - `rushx test:common -v`: Run unit tests for the `common` package.
230
+
231
+ - `doc/*` - PR that enhances the documentation
232
+
233
+ In the right side of the branch name you can include the GitHub issue number. An example of doing this could be:
234
+
235
+ ```bash
236
+ git checkout -b feature/XXX_add-an-awesome-new-feature
237
+ ```
238
+
239
+ (where `XXX` is the issue number)
240
+
241
+ ### Commit message guidelines
242
+
243
+ The merge commit message should be structured following the [conventional commits](https://www.conventionalcommits.org/) standard:
244
+
245
+ ```text
246
+ <commit type>([optional scope]): <description>
247
+ ```
248
+
249
+ As an example:
250
+
251
+ ```text
252
+ fix(cli): Correct minor typos in code
253
+ ```
254
+
255
+ The most important kind of commits are the ones that trigger version bumps and therefore a new release in the CI/CD system:
256
+
257
+ - `fix` - patch version bump (`0.0.x`)
258
+ - `feat` - minor version bump (`0.x.0`)
259
+ - Any commit type followed by `!`, i.e. `feat!` - major version bump (`x.0.0`)
260
+
261
+ Apart from those previously mentioned, there are more commit types:
262
+
263
+ - **build**: Changes that affect the build system or external dependencies (example scopes: rush, tsconfig, npm)
264
+ - **ci**: Changes to our CI configuration files and scripts
265
+ - **docs**: Documentation only changes
266
+ - **feat**: A new feature
267
+ - **fix**: A bug fix
268
+ - **perf**: A code change that improves performance
269
+ - **refactor**: A code change that neither fixes a bug nor adds a feature
270
+ - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
271
+ - **test**: Adding missing tests or correcting existing tests
272
+
273
+ We're using the following scopes in the project:
274
+
275
+ - **cli**
276
+ - **core**
277
+ - **common**
278
+ - **server**
279
+
280
+ Apart of using conventional commits for triggering releases, we use them to build the project changelog.
281
+
282
+ ## Code Style Guidelines
283
+
284
+ The Magek project comes with a nice set of ESLint config files to help you follow a consistent style, and we really encourage to use it in your editor. You can also run the `rush run lint:fix` commands to try solving any linter problems automatically.
285
+
286
+ For everything else, the rule of thumb is: Try to be consistent with the code around yours, and if you're not sure, ask :-)
287
+
288
+ There are some things that the linter doesn't force but are preferred this way:
289
+
290
+ ### Importing other files and libraries
291
+
292
+ Use ES modules (`import`/`export`) instead of CommonJS (`require`/`module.exports`), and import the objects individually when possible:
293
+
294
+ ```typescript
295
+ ```
296
+
297
+ ### Functional style
298
+
299
+ We give priority to a functional style of programming, but always taking into account how the objects are used to make sure they form a nice DSL. Classes are allowed when there's an actual state to hold, and we usually avoid default exports:
300
+
301
+ ```typescript
302
+ // module-a.ts, a conventional functional module
303
+ export functionA() {
304
+ ...
305
+ }
306
+
307
+ export const someConstantA = 42
308
+ ```
309
+
310
+ ### Dependency injection
311
+
312
+ Prefer functions and modules to accept their dependencies as parameters rather than hard-coding imports. This enhances testability and composability.
313
+
314
+ ```typescript
315
+ // module-b.ts, grouping functions with a scope
316
+ export const ModuleB = {
317
+ functionB1: () => {...},
318
+ functionB2: () => {...},
319
+ }
320
+ ```
321
+
322
+ ```typescript
323
+ // object-c.ts, a class
324
+ export class ObjectC {
325
+ constructor(readonly value: number) {}
326
+ }
327
+ ```
328
+
329
+ ```typescript
330
+
331
+ functionA()
332
+ ModuleB.functionB1()
333
+ const obj = new ObjectC(someConstantA)
334
+ ```
335
+
336
+ ### Use `const` and `let`
337
+
338
+ Default to `const` and immutable objects when possible, otherwise, use `let`.
339
+
340
+ ```typescript
341
+ // Good
342
+ let a = 0
343
+ const b = 3
344
+ a = a + b
345
+
346
+ // Less Good
347
+ var c = 0
348
+ let d = 3 // Never updated
349
+ ```
@@ -0,0 +1,200 @@
1
+ [
2
+ {
3
+ "uri": "magek://docs/advanced/custom-templates",
4
+ "path": "advanced/custom-templates.md",
5
+ "title": "Customizing CLI resource templates",
6
+ "description": "You can change what the newly created Magek resources will contain by customizing the resource template files."
7
+ },
8
+ {
9
+ "uri": "magek://docs/advanced/data-migrations",
10
+ "path": "advanced/data-migrations.md",
11
+ "title": "Migrations",
12
+ "description": "Migrations are a mechanism for updating or transforming the schemas of events and entities as your system evolves. This allows you to make changes to your data model without losing or corrupting ex..."
13
+ },
14
+ {
15
+ "uri": "magek://docs/advanced/environment-configuration",
16
+ "path": "advanced/environment-configuration.md",
17
+ "title": "Environments",
18
+ "description": "You can create multiple environments calling the `Magek.configure` function several times using different environment names as the first argument. You can create one file for each environment, but ..."
19
+ },
20
+ {
21
+ "uri": "magek://docs/advanced/framework-packages",
22
+ "path": "advanced/framework-packages.md",
23
+ "title": "Framework packages",
24
+ "description": "The framework is already splitted into different packages:"
25
+ },
26
+ {
27
+ "uri": "magek://docs/advanced/health/sensor-health",
28
+ "path": "advanced/health/sensor-health.md",
29
+ "title": "Sensor Health",
30
+ "description": null
31
+ },
32
+ {
33
+ "uri": "magek://docs/advanced/instrumentation",
34
+ "path": "advanced/instrumentation.md",
35
+ "title": "Magek instrumentation",
36
+ "description": "The Trace Decorator is a **Magek** functionality that facilitates the reception of notifications whenever significant events occur in Magek's core, such as event dispatching or migration execution."
37
+ },
38
+ {
39
+ "uri": "magek://docs/advanced/register",
40
+ "path": "advanced/register.md",
41
+ "title": "Advanced uses of the Register object",
42
+ "description": "The Register object is a built-in object that is automatically injected by the framework into all command or event handlers to let users interact with the execution context. It can be used for a va..."
43
+ },
44
+ {
45
+ "uri": "magek://docs/advanced/sensor",
46
+ "path": "advanced/sensor.md",
47
+ "title": "Sensor",
48
+ "description": "- [Sensor Health](health/sensor-health.md) - Health monitoring and indicators"
49
+ },
50
+ {
51
+ "uri": "magek://docs/advanced/testing",
52
+ "path": "advanced/testing.md",
53
+ "title": "Testing",
54
+ "description": "Magek applications are fully tested by default. This means that you can be sure that your application will work as expected. However, you can also write your own tests to check that your applicatio..."
55
+ },
56
+ {
57
+ "uri": "magek://docs/advanced/touch-entities",
58
+ "path": "advanced/touch-entities.md",
59
+ "title": "TouchEntities",
60
+ "description": "Magek provides a way to refresh the value of an entity and update the corresponding ReadModels that depend on it."
61
+ },
62
+ {
63
+ "uri": "magek://docs/architecture/command",
64
+ "path": "architecture/command.md",
65
+ "title": "Command",
66
+ "description": "Commands are any action a user performs on your application. For example, `RemoveItemFromCart`, `RatePhoto` or `AddCommentToPost`. They express the intention of an user, and they are the main inter..."
67
+ },
68
+ {
69
+ "uri": "magek://docs/architecture/entity",
70
+ "path": "architecture/entity.md",
71
+ "title": "Entity",
72
+ "description": "If events are the _source of truth_ of your application, entities are the _current state_ of your application. For example, if you have an application that allows users to create bank accounts, the..."
73
+ },
74
+ {
75
+ "uri": "magek://docs/architecture/event-driven",
76
+ "path": "architecture/event-driven.md",
77
+ "title": "Magek architecture",
78
+ "description": "Magek is a highly opinionated framework that provides a complete toolset to build production-ready event-driven serverless applications."
79
+ },
80
+ {
81
+ "uri": "magek://docs/architecture/event-handler",
82
+ "path": "architecture/event-handler.md",
83
+ "title": "Event handler",
84
+ "description": "An event handler is a class that reacts to events. They are commonly used to trigger side effects in case of a new event. For instance, if a new event is registered in the system, an event handler ..."
85
+ },
86
+ {
87
+ "uri": "magek://docs/architecture/event",
88
+ "path": "architecture/event.md",
89
+ "title": "Event",
90
+ "description": "An event is a fact of something that has happened in your application. Every action that takes place on your application should be stored as an event. They are stored in a single collection, formin..."
91
+ },
92
+ {
93
+ "uri": "magek://docs/architecture/notifications",
94
+ "path": "architecture/notifications.md",
95
+ "title": "Notifications",
96
+ "description": "Notifications are an important concept in event-driven architecture, and they play a crucial role in informing interested parties about certain events that take place within an application."
97
+ },
98
+ {
99
+ "uri": "magek://docs/architecture/queries",
100
+ "path": "architecture/queries.md",
101
+ "title": "Queries",
102
+ "description": "ReadModels offer read operations over reduced events. On the other hand, Queries provide a way to do custom read operations."
103
+ },
104
+ {
105
+ "uri": "magek://docs/architecture/read-model",
106
+ "path": "architecture/read-model.md",
107
+ "title": "Read model",
108
+ "description": "A read model contains the data of your application that is exposed to the client through the GraphQL API. It's a _projection_ of one or more entities, so you dont have to directly expose them to th..."
109
+ },
110
+ {
111
+ "uri": "magek://docs/contributing",
112
+ "path": "contributing.md",
113
+ "title": "Contributing to Magek",
114
+ "description": "> **DISCLAIMER:** The Magek docs are undergoing an overhaul. Most of what's written here applies, but expect some hiccups in the build process"
115
+ },
116
+ {
117
+ "uri": "magek://docs/features/error-handling",
118
+ "path": "features/error-handling.md",
119
+ "title": "Error handling",
120
+ "description": "Magek provides a default error handling mechanism that will try to catch all the errors that are thrown in the application and will log them. This is useful for debugging purposes, but you may want..."
121
+ },
122
+ {
123
+ "uri": "magek://docs/features/event-stream",
124
+ "path": "features/event-stream.md",
125
+ "title": "The event stream",
126
+ "description": "The event stream API is a read-only API that allows you to fetch the events that have been generated by your application. It's useful for debugging purposes, but also for building your own analytic..."
127
+ },
128
+ {
129
+ "uri": "magek://docs/features/logging",
130
+ "path": "features/logging.md",
131
+ "title": "Logging in Magek",
132
+ "description": "If no configuration is provided, Magek uses the default JavaScript logging capabilities. Depending on the log level, it will call different logging methods:"
133
+ },
134
+ {
135
+ "uri": "magek://docs/features/schedule-actions",
136
+ "path": "features/schedule-actions.md",
137
+ "title": "Schedule actions",
138
+ "description": "There are many cases in which you want to trigger some action periodically. For example, you may want to send a reminder email to a user every day at 10:00 AM. For this, you can use scheduled comma..."
139
+ },
140
+ {
141
+ "uri": "magek://docs/getting-started/ai-coding-assistants",
142
+ "path": "getting-started/ai-coding-assistants.md",
143
+ "title": "AI Coding Assistants",
144
+ "description": "Magek provides an MCP (Model Context Protocol) server that enables AI coding assistants like **Claude Code** and **Codex CLI** to understand and work with Magek projects. This gives your AI assista..."
145
+ },
146
+ {
147
+ "uri": "magek://docs/getting-started/coding",
148
+ "path": "getting-started/coding.md",
149
+ "title": "Build a Magek app in minutes",
150
+ "description": "In this section, we will go through all the necessary steps to have the backend up and"
151
+ },
152
+ {
153
+ "uri": "magek://docs/getting-started/installation",
154
+ "path": "getting-started/installation.md",
155
+ "title": "Installation",
156
+ "description": "You can develop with Magek using any of the following operating systems:"
157
+ },
158
+ {
159
+ "uri": "magek://docs/graphql",
160
+ "path": "graphql.md",
161
+ "title": "GraphQL API",
162
+ "description": "This is the main API of your application, as it allows you to:"
163
+ },
164
+ {
165
+ "uri": "magek://docs/index",
166
+ "path": "index.md",
167
+ "title": "Magek Framework Documentation",
168
+ "description": "Welcome to the Magek documentation! Use the navigation on the left to browse guides and API reference."
169
+ },
170
+ {
171
+ "uri": "magek://docs/introduction",
172
+ "path": "introduction.md",
173
+ "title": "Introduction",
174
+ "description": "> _Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something._ — [Robert A. Heinlein](https://en.wikipedia.org/wiki/Robert_A._Heinlein)"
175
+ },
176
+ {
177
+ "uri": "magek://docs/magek-cli",
178
+ "path": "magek-cli.md",
179
+ "title": "Magek CLI",
180
+ "description": "The Magek CLI is a command line interface that helps you develop your Magek applications. It is built with Node.js and published to NPM through the package `@magek/cli`. It's automatically included..."
181
+ },
182
+ {
183
+ "uri": "magek://docs/security/authentication",
184
+ "path": "security/authentication.md",
185
+ "title": "Authentication",
186
+ "description": "Magek uses the OAuth 2.0 protocol to authenticate users. That means that it uses tokens to identify users and authorize them. These tokens are called _access tokens_ and are issued by an _authentic..."
187
+ },
188
+ {
189
+ "uri": "magek://docs/security/authorization",
190
+ "path": "security/authorization.md",
191
+ "title": "Authorization",
192
+ "description": "Magek uses a whitelisting approach to authorize users to perform commands and read models. This means that you must explicitly specify which users are allowed to perform each action. In order to do..."
193
+ },
194
+ {
195
+ "uri": "magek://docs/security/security",
196
+ "path": "security/security.md",
197
+ "title": "Security",
198
+ "description": "Magek accepts standard [JWT tokens](https://jwt.io/) to authenticate incoming requests."
199
+ }
200
+ ]