Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs on docusaurus #1795

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a2a0458
docusaurus intro
maciejkorsan Jul 1, 2024
77a98bf
Configure basic branding options for docusaurus
maciejkorsan Jul 8, 2024
b711f3e
Configure color pallette
maciejkorsan Jul 8, 2024
5ba1b6f
Add tailwind & fill the homepage
maciejkorsan Jul 15, 2024
a3da0e0
Index cleanup
maciejkorsan Jul 15, 2024
3deda5f
fix dark mode colors
maciejkorsan Jul 15, 2024
76a5dd0
add community page
maciejkorsan Jul 18, 2024
3b4f4fd
add contribuitng page
maciejkorsan Jul 18, 2024
d8dc359
class -> className
maciejkorsan Jul 18, 2024
9aabc9e
add support page
maciejkorsan Jul 18, 2024
4f9ddff
update navigation
maciejkorsan Jul 18, 2024
c675e68
get rid of docusaurs content
maciejkorsan Jul 24, 2024
917db6c
add support for ruby & bash highlighting
maciejkorsan Jul 24, 2024
2a7c026
introduce versioning
maciejkorsan Jul 24, 2024
d299547
v2 docs moved to docusaurus structure
maciejkorsan Jul 24, 2024
7786a19
read.html.md -> read.md
maciejkorsan Jul 24, 2024
8a97c9e
v1.3.1 moved to docusaurus
maciejkorsan Jul 24, 2024
2fd804a
add static api docs links
maciejkorsan Jul 24, 2024
fafdecb
Let netlify build new site
mostlyobvious Jul 25, 2024
53192a9
Let it build with broken links
mostlyobvious Jul 25, 2024
cfe4173
tidy links in navigations
maciejkorsan Jul 29, 2024
e991303
update editurl link for docs
maciejkorsan Jul 29, 2024
86ee9bd
add algolia config
maciejkorsan Jul 29, 2024
7b5e087
pages cleanup
maciejkorsan Jul 29, 2024
5c7248e
Scope creep
mostlyobvious Aug 1, 2024
d0dec86
We don't need two sites side-by-side
mostlyobvious Aug 1, 2024
f192f23
File-watch-reduild as it was
mostlyobvious Aug 1, 2024
33748fc
FFS
mostlyobvious Aug 1, 2024
b5ca37d
update dependencies
maciejkorsan Dec 9, 2024
685d278
enable asciinema
maciejkorsan Dec 10, 2024
a2b9746
remove unused import
maciejkorsan Dec 10, 2024
731f242
move navigation to sidebars.js
maciejkorsan Dec 19, 2024
b64fda9
convert sidebars to json
maciejkorsan Dec 19, 2024
ff750ba
asciinema fix
maciejkorsan Dec 19, 2024
3f05e18
ui improvements
maciejkorsan Dec 20, 2024
cc314f7
move to tailwind typography
maciejkorsan Dec 23, 2024
65daceb
add new billetto content
maciejkorsan Dec 23, 2024
3261e2b
fix v2 docs content
maciejkorsan Dec 23, 2024
09c4410
fix padding in v1 docs
maciejkorsan Dec 23, 2024
51aa3e1
docs(start): fix typo about provided word
maciejkorsan Dec 24, 2024
0ae48c3
bump docs version to 2.15.0
maciejkorsan Dec 24, 2024
16387ee
fix asciicinema id in install.mdx
maciejkorsan Dec 24, 2024
652c8d2
update company logos
maciejkorsan Dec 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ ruby_event_store-browser/public/*
.inch/
.tmp
support/bundler/*.lock
.DS_Store
3 changes: 1 addition & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[build]
base = "railseventstore.org/"
base = "railseventstore.org"
command = "make build"
publish = "build/"
ignore = "false"

[build.environment]
NODE_VERSION = "20.10"
RUBY_VERSION = "3.2.2"

[[redirects]]
from = "http://www.railseventstore.org/*"
Expand Down
20 changes: 20 additions & 0 deletions railseventstore.org/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
14 changes: 0 additions & 14 deletions railseventstore.org/Gemfile

This file was deleted.

149 changes: 0 additions & 149 deletions railseventstore.org/Gemfile.lock

This file was deleted.

19 changes: 14 additions & 5 deletions railseventstore.org/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
install: ## Install dependencies
@bundle install
@npm install --no-fund --no-audit
.PHONY: install

build: ## Output static files (production)
@bundle exec middleman build
@npm run build
.PHONY: build

serve:
@npm run serve
.PHONY: serve

watch:
@npx chokidar-cli "docs/**/*.md" \
-c "make build" \
--initial
.PHONY: watch

dev: ## Run server (development)
@bundle exec middleman server
@$(MAKE) -j2 watch serve
.PHONY: dev

include ../support/make/help.mk

.PHONY: install build dev
6 changes: 4 additions & 2 deletions railseventstore.org/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ Source files for the documentation and website of [Rails Event Store](https://ra

## Serving the docs locally

Provided you have Ruby installed, you can serve the docs locally at `http://localhost:4567`

```
bundle install
npm install
Expand All @@ -16,6 +14,10 @@ bundle exec middleman server

Documentation and website are deployed continuously and automatically from the `master` branch.

## Docs navigation update

The navigation is now generated from the `sidebars.json` file. You need to restart the development server after updating the file.

## About

<img src="http://arkency.com/images/arkency.png" alt="Arkency" width="20%" align="left" />
Expand Down
3 changes: 3 additions & 0 deletions railseventstore.org/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
11 changes: 0 additions & 11 deletions railseventstore.org/browserconfig.xml

This file was deleted.

48 changes: 0 additions & 48 deletions railseventstore.org/config.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Consider you're an HR person responsible for dealing with employee salaries. You
When you gather the information from managers, you put them into an Excel sheet and mail them to payroll. Payroll is taking care of the money getting into employees' bank accounts. You also import the Excel sheet into your HR system, which happens to be Event Sourced.

Usually, things go great and we build our stream of salary-tracking events like this:
![BiTemporalEventSourcingWhenThingsGoSmoothly](../../images/bi_temporal_event_sourcing_when_things_go_smoothly.jpg)
![BiTemporalEventSourcingWhenThingsGoSmoothly](/images/bi_temporal_event_sourcing_when_things_go_smoothly.jpg)
However an error might happen. The error might happen when gathering the data from manager or putting it into an Excel sheet.

Instead of asking a developer to modify the event data (events should always be immutable!), you could use a bi-temporal event. Consider the example below:
![BiTemporalEventSourcingValidAt](../../images/bi_temporal_valid_at_event_sourcing.jpg)
![BiTemporalEventSourcingValidAt](/images/bi_temporal_valid_at_event_sourcing.jpg)
In this example, the salary was raised on January 1, 2020, and it was also paid out on February 1, 2020. Then the mistake was detected. Instead of modifying the history of events, the new one has been published. The new event describes the proper value of the salary and specifies when the salary is valid.

## Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Those repositories were written by community members and are not guaranteed to b

## Writing your own repository

If you want to write your own repository, we provide [a suite of tests that you can re-use](https://github.com/RailsEventStore/rails_event_store/blob/master/ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb). Just [require](https://github.com/RailsEventStore/rails_event_store/blob/a6ffb8a535373023296222bbbb5dd6ee131a6792/rails_event_store_active_record/spec/event_repository_spec.rb#L3) and [include it](https://github.com/RailsEventStore/rails_event_store/blob/a6ffb8a535373023296222bbbb5dd6ee131a6792/rails_event_store_active_record/spec/event_repository_spec.rb#L26) in your repository spec. Make sure to meditate on which [expected_version option](/docs/v2/expected_version//) you are going to support and how.
If you want to write your own repository, we provide [a suite of tests that you can re-use](https://github.com/RailsEventStore/rails_event_store/blob/master/ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb). Just [require](https://github.com/RailsEventStore/rails_event_store/blob/a6ffb8a535373023296222bbbb5dd6ee131a6792/rails_event_store_active_record/spec/event_repository_spec.rb#L3) and [include it](https://github.com/RailsEventStore/rails_event_store/blob/a6ffb8a535373023296222bbbb5dd6ee131a6792/rails_event_store_active_record/spec/event_repository_spec.rb#L26) in your repository spec. Make sure to meditate on which [expected_version option](..core-concepts/expected-version/) you are going to support and how.

## Using RubyEventStore::InMemoryRepository for faster tests

Expand Down Expand Up @@ -69,7 +69,7 @@ We don't recommend using `InMemoryRepository` in production even if you don't ne

RubyEventStore comes with `RubyEventStore::ROM::EventRepository` that you can use with a SQL database without requiring ActiveRecord or when not using Rails altogether. It is tested with the same test suite as the ActiveRecord implementation and raises identical exceptions.

See [Using Ruby Event Store without Rails](https://railseventstore.org/docs/v2/without_rails//) for information on how to use ROM (and Sequel).
See [Using Ruby Event Store without Rails](./without-rails) for information on how to use ROM (and Sequel).

## Using PgLinearizedEventRepository for linearized writes

Expand Down
Loading