diff --git a/_content/cases/stepsy.wiki.md b/_content/cases/stepsy.wiki.md
new file mode 100644
index 0000000..600a5ec
--- /dev/null
+++ b/_content/cases/stepsy.wiki.md
@@ -0,0 +1,44 @@
+---
+title: Multi-tenant knowledge base website based on Google APIs
+goal: Create a modern multi-tenant web app that lets users use their Google Drive as a knowledge base
+role: Design and implement the web app
+date: Jul 29, 2023 - Nov 5, 2023
+---
+
+
+Solution
+
+I chose NextJS as the backbone for this project as it offers the greatest amount of flexibility while still being very powerful both on the client as well as on the server with an active community and thriving ecosystem.
+
+For styles I chose TailwindCSS with DaisyUI for the optimizations and development speed that come out of using them. Tailwind uses purgecss to minimize the final bundle making the page load and feel faster.
+
+The database is PostgreSQL with Prisma ORM running on Vercel's cloud infrastructure.
+
+For authentication I chose NextAuth with JWT as it's the preferred way to handle auth in a NextJS project.
+
+
+The actual implementation is a lengthy process involving many moving parts and lots of code. I'll go over the three most challenging problems in no particular order.
+
+Interfacing with Google Drive is done to read the content there and almost never used for writing except for setting and removing permissions. To read the content the reader must have appropriate permissions and that's determined by the auth system with a JWT.
+For each request we can get the JWT and use it in the google client to auth unless it's an anonymous user, in which case we must use a google service account JWT. This JWT holds a google client access token used by google in determining permissions.
+Once the client is set up we can start making drive requests on behalf of the user getting their drive content inside the web app including folders, files, documents, pictures, shared drives and so on, which can later be rendered on a page.
+These requests are a bottleneck, which required many optimizations and concurrency tricks to make the site considerably faster than the competition.
+
+The storage API uses Prisma ORM for storing and getting all the user info including wikis and spaces. When a user logs in they can see their wiki as well as all the wikis they are allowed to manage. It's used to handle authorized requests like changing the wiki/space name, url, permissions and more. Storage is an integral part of any web application.
+
+The UI/UX uses TailwindCSS and DaisyUI to make everything a fast, modern, optimized and intuitive experience with extra features like dozens of themes as well as a custom theme builder.
+React was used with TypeScript to provide a nice modern client-side experience between transitions and interactions.
+This setup supports maximum optimization as you can see in the screenshots below allowing the app to reach a lighthouse score of 100 on all but one (it has 99) pages.
+Both mobile and desktop is supported.
+
+
+This project aims to be a Google Drive frontend. It uses the Google APIs to fetch document data and display that data in a wiki-style web page.
+
+
+![thumbnail](/thumbnail.png)
+
+
+It supports Google Docs, Google Sheets, Google Slides, PDFs and regular files.
+
+
+
diff --git a/bun.lockb b/bun.lockb
index 68a6bbd..ce03ca9 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/flake.nix b/flake.nix
index 97de4fc..6c7acc2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -20,7 +20,9 @@
tmux new-session -s my_session -d
tmux new-window -t my_session:1
tmux new-window -t my_session:2
+ tmux new-window -t my_session:3
tmux send-keys -t my_session:1.0 'vi' C-m
+ tmux send-keys -t my_session:3.0 'bun run dev' C-m
tmux attach-session -t my_session
'';
in
diff --git a/package.json b/package.json
index 0455da4..615d5ed 100644
--- a/package.json
+++ b/package.json
@@ -14,9 +14,16 @@
"@fortawesome/free-regular-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "latest",
+ "gray-matter": "^4.0.3",
"next": "latest",
"react": "latest",
- "react-dom": "latest"
+ "react-dom": "latest",
+ "react-markdown": "^9.0.0",
+ "rehype-highlight": "^7.0.0",
+ "rehype-raw": "^7.0.0",
+ "remark-frontmatter": "^5.0.0",
+ "remark-gfm": "^4.0.0",
+ "tailwind-highlightjs": "^2.0.1"
},
"devDependencies": {
"typescript": "latest",
diff --git a/public/c/cases/stepsy.wiki.md/thumbnail.png b/public/c/cases/stepsy.wiki.md/thumbnail.png
new file mode 100644
index 0000000..674951c
Binary files /dev/null and b/public/c/cases/stepsy.wiki.md/thumbnail.png differ
diff --git a/src/app/c/[...slug]/content.module.css b/src/app/c/[...slug]/content.module.css
new file mode 100644
index 0000000..2b55e18
--- /dev/null
+++ b/src/app/c/[...slug]/content.module.css
@@ -0,0 +1,47 @@
+.md ol {
+ @apply list-decimal list-inside
+}
+.md ul {
+ @apply list-disc list-inside
+}
+
+.md blockquote {
+ @apply border-l-neutral-500 border-l-4 p-2
+}
+
+.md blockquote p {
+ @apply before:content-['"'] after:content-['"']
+}
+
+.md details {
+ @apply p-20
+}
+
+.md details * {
+ @apply p-2
+}
+
+.md h1 {
+ @apply text-6xl
+}
+
+.md h2 {
+ @apply text-5xl
+}
+
+.md h3 {
+ @apply text-4xl
+}
+
+.md h4 {
+ @apply text-3xl
+}
+
+.md h5 {
+ @apply text-2xl
+}
+
+.md h6 {
+ @apply text-xl
+}
+
diff --git a/src/app/c/[...slug]/page.tsx b/src/app/c/[...slug]/page.tsx
new file mode 100644
index 0000000..84bc094
--- /dev/null
+++ b/src/app/c/[...slug]/page.tsx
@@ -0,0 +1,88 @@
+import { getAllPaths, getContent } from "$lib/content";
+import Markdown from "react-markdown";
+import remarkGfm from "remark-gfm";
+import remarkFrontmatter from "remark-frontmatter";
+import styles from "./content.module.css"
+import Image from "next/image";
+import rehypeRaw from "rehype-raw";
+import rehypeHighlight from "rehype-highlight";
+
+type Params = {
+ slug: string[]
+}
+
+type Props = {
+ params: Params
+}
+
+export async function generateStaticParams(): Promise {
+ return getAllPaths().map(p => ({ slug: p.split("/") }))
+}
+
+export default function Content({ params }: Props) {
+ const imgSize = 1024;
+ const { data, content } = getContent(params.slug);
+
+ const title = () => {
+ return (
+
+ {data.title}
+
+ )
+ }
+ const goal = () => {
+ const g = data.goal
+ return g ?
+ (
+
+
The goal
+ {g}
+
+ ) :
+ ""
+ }
+ const role = () => {
+ const r = data.role
+ return r ?
+ (
+