Skip to content

Commit

Permalink
doc: add dev doc page in documentation, rewrote readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitFicus committed Sep 18, 2024
1 parent 17e210c commit 40d4cb5
Show file tree
Hide file tree
Showing 9 changed files with 548 additions and 322 deletions.
89 changes: 16 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,33 @@
# Izanami

<p align="center">
<img src="./izanami-frontend/izanami.png" alt="image" width="300" height="auto">
</p>

This README is for anyone who would like to contribute to Izanami.
Izanami is an open source centralized feature flag solution.

If you're interested in Izanami documentation, [it's here](https://maif.github.io/izanami/).
Feature flags are a software development pattern that allows turning a feature on or off without needing to modify or redeploy an application.

## Start application locally
Feature flags typically allow implementation of canary release, progressive rollout, A/B testing or even "panic buttons".

### Izanami frontend
Izanami is a centralized feature flag solution, which allows sharing flags between applications, having a fine-tuned right management and keeping a log of who modify or request flags.

```sh
cd izanami-frontend
npm run dev
```
## Documentation

### Local database & misc tools
To get started with Izanami, follow [this guide](https://maif.github.io/izanami/docs/getstarted).

```sh
docker-compose rm -f && docker-compose up
```
Reference documentation is available [here](https://maif.github.io/izanami/docs/usages).

### Izanami backend
Some guides for common use cases [are also available](https://maif.github.io/izanami/docs/guides/).

```sh
sbt -jvm-debug 5005
~run -Dconfig.resource=dev.conf
```
## Contribution

Once everything is started, just browse to [localhost:3000](http://localhost:3000).
Izanami contribution are welcome !

If you see a bug or would like a specific feature, you can either open an issue, or show your interest by commenting an existing one.

In a developement setup, it may be usefull to craft tokens with longer TTL
If you feel like contributing by helping to write code or documentation, feel free to discuss it in a related issue or open a pull request.

```
sbt -jvm-debug 5005
~run -Dconfig.resource=dev.conf -Dapp.sessions.TTL=604800
```
## Development

### Backend tests

To run test, you can either start Izanami and associated tooling (db, ...) with above commands or just run a suite / a test.

In fact, an Izanami instance and docker containers will be started by tests if none is running. This could be usefull for coverage / debug.

You'll need docker-compose installed locally to run tests like this, due to [this issue](https://github.com/testcontainers/testcontainers-java/issues/7239).

#### Colima setup

To run test without having starting docker-compose, you'll need these env variables to be set.

```sh
DOCKER_HOST=unix://${HOME}/.colima/default/docker.sock;
RYUK_CONTAINER_PRIVILEGED=true;
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
```


## Package application

To package frontend :

```sh
cd izanami-frontend
npm run build
```

To package backend (make sure to package frontend first) :

```sh
sbt "set test in assembly := {}" clean assembly
```

To start generated jar

```sh
java -Dconfig.resource=dev.conf -jar ./target/scala-2.13/izanami.jar
```

To build docker image (after packaging frontend and backends)

```sh
docker build -t izanami .
```
To test docker image

```sh
docker run --env IZANAMI_PG_URI=postgresql://postgres:[email protected]:5432/postgres -p 9000:9000 izanami
```
To setup a dev Izanami instance, [read this page](https://maif.github.io/izanami/docs/dev/).
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import lunr from "/home/runner/work/izanami/izanami/manual/node_modules/lunr/lunr.js";
require("/home/runner/work/izanami/izanami/manual/node_modules/lunr-languages/lunr.stemmer.support.js")(lunr);
import lunr from "/Users/77199M/workspace/oss/izanami-v2/manual/node_modules/lunr/lunr.js";
require("/Users/77199M/workspace/oss/izanami-v2/manual/node_modules/lunr-languages/lunr.stemmer.support.js")(lunr);
require("@easyops-cn/docusaurus-search-local/dist/client/shared/lunrLanguageZh").lunrLanguageZh(lunr);
require("/home/runner/work/izanami/izanami/manual/node_modules/lunr-languages/lunr.multi.js")(lunr);
require("/Users/77199M/workspace/oss/izanami-v2/manual/node_modules/lunr-languages/lunr.multi.js")(lunr);
export const language = ["en","zh"];
export const removeDefaultStopWordFilter = false;
export const removeDefaultStemmer = false;
export { default as Mark } from "/home/runner/work/izanami/izanami/manual/node_modules/mark.js/dist/mark.js"
export const searchIndexUrl = "search-index{dir}.json?_=2674a70d";
export { default as Mark } from "/Users/77199M/workspace/oss/izanami-v2/manual/node_modules/mark.js/dist/mark.js"
export const searchIndexUrl = "search-index{dir}.json?_=d171d4ed";
export const searchResultLimits = 8;
export const searchResultContextMaxLength = 50;
export const explicitSearchResultPath = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@
}
],
"href": "/izanami/docs/clients/"
},
{
"type": "link",
"label": "Developing Izanami",
"href": "/izanami/docs/dev/",
"docId": "dev/index",
"unlisted": false
}
]
},
Expand Down Expand Up @@ -245,6 +252,12 @@
"description": "A feature flag is a switch allowing to enable / disable application features.",
"sidebar": "tutorialSidebar"
},
"dev/index": {
"id": "dev/index",
"title": "Developing Izanami",
"description": "Here are some tips to help you get started with Izanami contribution.",
"sidebar": "tutorialSidebar"
},
"getstarted/index": {
"id": "getstarted/index",
"title": "Get started",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@
"previous": {
"title": "Error handling",
"permalink": "/izanami/docs/clients/java/error-handling"
},
"next": {
"title": "Developing Izanami",
"permalink": "/izanami/docs/dev/"
}
},
{
Expand Down Expand Up @@ -166,6 +170,27 @@
"permalink": "/izanami/docs/usages/"
}
},
{
"id": "dev/index",
"title": "Developing Izanami",
"description": "Here are some tips to help you get started with Izanami contribution.",
"source": "@site/docs/06-dev/index.mdx",
"sourceDirName": "06-dev",
"slug": "/dev/",
"permalink": "/izanami/docs/dev/",
"draft": false,
"unlisted": false,
"tags": [],
"version": "current",
"frontMatter": {
"title": "Developing Izanami"
},
"sidebar": "tutorialSidebar",
"previous": {
"title": "Server Sent Events",
"permalink": "/izanami/docs/clients/java/sse"
}
},
{
"id": "getstarted/index",
"title": "Get started",
Expand Down Expand Up @@ -850,6 +875,11 @@
"type": "doc",
"id": "clients/index"
}
},
{
"type": "doc",
"label": "Developing Izanami",
"id": "dev/index"
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions manual/.docusaurus/globalData.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
"path": "/izanami/docs/concepts/",
"sidebar": "tutorialSidebar"
},
{
"id": "dev/index",
"path": "/izanami/docs/dev/",
"sidebar": "tutorialSidebar"
},
{
"id": "getstarted/index",
"path": "/izanami/docs/getstarted/",
Expand Down
Loading

0 comments on commit 40d4cb5

Please sign in to comment.