From e1f44242476d4a1a10b4bd8b53473846f44b9674 Mon Sep 17 00:00:00 2001 From: Janos Dobronszki Date: Thu, 15 Oct 2020 15:28:50 +0200 Subject: [PATCH 1/3] Blog design in the readme --- blog/README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/blog/README.md b/blog/README.md index e05d238..7fc9d5c 100644 --- a/blog/README.md +++ b/blog/README.md @@ -5,3 +5,47 @@ This is a full end to end example of writing a multi-service blog application ## Usage Check out the [blog tutorial](https://m3o.dev/tutorials/building-a-blog) on the developer docs. + +# How it works + +# Present + +The blog services are designed so a user can deploy them to their own micro namespace, write content with their Micro account with commands like + +```sh +micro posts save --id=7 --tags=News,Finance --title="Breaking News" --content="The stock market has just crashed" +``` + +and display content on their frontend by consuming the API: + +```sh +curl -H "Authorization: Bearer $MICRO_API_TOKEN" "Micro-Namespace: $NAMESPACE" https://api.m3o.com/tags/list + + +{ + "tags": [ + { + "type": "post-tag", + "slug": "news", + "title": "News", + "count": "3" + } + ] +] +``` + +There are no comments provided yet, just posts and tags. +Access is governed by auth rules, ie. Posts List, Tags List is open, Posts Save requires a Micro login. + +# Future possibilities + +## Enable non Micro users to write posts, comments + +If we provide a user/login service (markedly different from auth, it can be a simple session based auth) to enable non Micro users to register, the following can be done: + +- A user (let's call the user Alice from this point) launches posts, tags, login service in their namespace. +- User opens up said endpoints +- People (let's call them Yoga Pants Co and Drone Inc) hosting JS and HTML on Netlify or Github Pages could create accounts in the services hosted by Alice. In this way, Alice, by having a Micro account becomes a headless CMS provider. Multiple blogs can be created on top of Alice's service instances. + +Questions: +- How will Yoga Pants Co or Drone Inc pay Alice or M3O for the costs of their backend hosting? \ No newline at end of file From 3e9fe190300cf7f452ac1b66c65ac1ca42efe81e Mon Sep 17 00:00:00 2001 From: Janos Dobronszki Date: Thu, 15 Oct 2020 15:32:29 +0200 Subject: [PATCH 2/3] Fix headers --- blog/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blog/README.md b/blog/README.md index 7fc9d5c..e906937 100644 --- a/blog/README.md +++ b/blog/README.md @@ -6,9 +6,9 @@ This is a full end to end example of writing a multi-service blog application Check out the [blog tutorial](https://m3o.dev/tutorials/building-a-blog) on the developer docs. -# How it works +## How it works -# Present +### Present The blog services are designed so a user can deploy them to their own micro namespace, write content with their Micro account with commands like @@ -37,9 +37,9 @@ curl -H "Authorization: Bearer $MICRO_API_TOKEN" "Micro-Namespace: $NAMESPACE" h There are no comments provided yet, just posts and tags. Access is governed by auth rules, ie. Posts List, Tags List is open, Posts Save requires a Micro login. -# Future possibilities +### Future possibilities -## Enable non Micro users to write posts, comments +#### Enable non Micro users to write posts, comments If we provide a user/login service (markedly different from auth, it can be a simple session based auth) to enable non Micro users to register, the following can be done: From 32fd3e8c0b707c02fdff4a46f7f08b22ee62b4f6 Mon Sep 17 00:00:00 2001 From: Janos Dobronszki Date: Thu, 15 Oct 2020 15:34:53 +0200 Subject: [PATCH 3/3] Fix --- blog/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/README.md b/blog/README.md index e906937..491f29e 100644 --- a/blog/README.md +++ b/blog/README.md @@ -44,7 +44,7 @@ Access is governed by auth rules, ie. Posts List, Tags List is open, Posts Save If we provide a user/login service (markedly different from auth, it can be a simple session based auth) to enable non Micro users to register, the following can be done: - A user (let's call the user Alice from this point) launches posts, tags, login service in their namespace. -- User opens up said endpoints +- Alice opens up said endpoints - People (let's call them Yoga Pants Co and Drone Inc) hosting JS and HTML on Netlify or Github Pages could create accounts in the services hosted by Alice. In this way, Alice, by having a Micro account becomes a headless CMS provider. Multiple blogs can be created on top of Alice's service instances. Questions: