Skip to content

Commit

Permalink
Merge pull request #26 from kathunk/chris/ver-31-spike-plan-docs
Browse files Browse the repository at this point in the history
Blatantly steal Livewire's docs structure
  • Loading branch information
inxilpro authored Nov 6, 2023
2 parents f81136c + 35b1782 commit c8c8acd
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
build
composer.lock
coverage
docs
phpunit.xml
phpstan.neon
testbench.yaml
Expand Down
29 changes: 29 additions & 0 deletions docs/navigation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"section": "Getting Started",
"items": [
{
"title": "Quickstart",
"uri": "quickstart",
"file": "quickstart.md"
},
{
"title": "What you absolutely need to know",
"uri": "need-to-know",
"file": "need-to-know.md"
}
]
},
{
"section": "Event Sourcing Crash Course",
"items": []
},
{
"section": "Event Lifecycle",
"items": []
},
{
"section": "Migrating from other packages",
"items": []
}
]
12 changes: 12 additions & 0 deletions docs/need-to-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Verbs is generally very simple to use. But there are a few things that you really need to know to
get started using event sourcing in Verbs.

## The "Rules"

### Rule 1: ID === Global Identity

In Verbs, IDs are **global identity**. This means that whatever IDs you use, they should be completely
unique regardless of what database you happen to be using. The easiest way to do that is to use
**Snowflakes**, which are unique IDs that also fit into a traditional database's "big int" primary key.

### Rule 2: Keep your events separate from your models
16 changes: 16 additions & 0 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Let’s get you started with Verbs!

## Prerequisites

First, make sure you have the following installed:

- Laravel version 10 or later
- PHP version 8.1 or later

## Install Verbs

Install Verbs using composer:

```shell
composer require kathunk/verbs
```

0 comments on commit c8c8acd

Please sign in to comment.