Skip to content

Commit ba2b7a2

Browse files
Merge pull request #46 from MeshJS/improvement/ui
Improvements and fixes
2 parents ec9128a + 4b96369 commit ba2b7a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1733
-1154
lines changed

.github/workflows/hetzner.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to Hetzner
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "apps/meshjs-rag/**"
9+
10+
11+
jobs:
12+
publish_images:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: checkout
16+
uses: actions/checkout@v4
17+
18+
- name: build image
19+
run: docker build -t ${{ secrets.DOCKER_HUB_USERNAME }}/meshai-backend:latest .
20+
21+
- name: push image to the docker hub
22+
run: |
23+
echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
24+
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/meshai-backend:latest
25+
26+
- name: Deploy to Hetzner via SSH
27+
uses: appleboy/[email protected]
28+
with:
29+
host: ${{ secrets.HETZNER_HOST }}
30+
username: ${{ secrets.HETZNER_USERNAME }}
31+
key: ${{ secrets.SSH_PRIVATE_KEY }}
32+
script: |
33+
docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/meshai-backend:latest
34+
docker stop meshai-backend || true
35+
docker rm meshai-backend || true
36+
docker run -d --name meshai-backend --env-file ./.env --restart always -p 127.0.0.1:8000:8000 ${{ secrets.DOCKER_HUB_USERNAME }}/meshai-backend:latest

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1-
# MIMIR
2-
AI compatible web3 tools
1+
# Mimir
2+
3+
Web3 tools and documentation platform for the Cardano ecosystem.
4+
5+
## Applications
6+
7+
**Mesh Documentation Platform** (`apps/docs`)
8+
- MeshJS documentation site built with Next.js and Fumadocs
9+
- AI Chat functionality
10+
- Includes llms.txt
11+
12+
**Mesh AI** (`apps/mesh-ai` & `apps/mesh.ai.chat-main`)
13+
- Discord bot for community knowledge management
14+
- Question answering from community interactions
15+
16+
**RAG System** (`apps/mesh-rag-ai`)
17+
- RAG system for discord bot in TS
18+
19+
**Starter Site** (`apps/mesh-startersite`)
20+
- Application for onboarding non Web3 developers.
21+
22+
**RAG Backend** (`meshjs-rag`)
23+
- Python based contextual RAG system

apps/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Apps
2+
3+
This folder contains all applications in the Mimir monorepo.
4+
5+
## Applications
6+
7+
- **docs** - Documentation platform for MeshJS built with Next.js and Fumadocs
8+
- **mesh-ai** - Discord bot interface for AI-powered community assistance
9+
- **mesh-rag-ai** - Retrieval-Augmented Generation system for discord bot
10+
- **mesh-startersite** - Application for onboarding non Web3 developers.
11+
- **mesh.ai.chat-main** - Discord bot for community knowledge management
12+
- **meshjs-rag** - Python backend contextual RAG system which powers chat functionality on the meshjs website

apps/docs/README.md

Lines changed: 13 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,18 @@
1-
# meshjs-docs
1+
# MeshJS Documentation
22

3-
This is a Next.js application generated with
4-
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
3+
Documentation platform for MeshJS built with Next.js and Fumadocs.
54

6-
Run development server:
5+
## Structure
76

8-
```bash
9-
npm run dev
10-
# or
11-
pnpm dev
12-
# or
13-
yarn dev
14-
```
7+
- `app/(home)` - Landing page
8+
- `app/docs` - Documentation layout and pages
9+
- `app/api/search` - Search functionality
10+
- `lib/source.ts` - Content source adapter
11+
- `content/docs/` - MDX documentation files
12+
- `components/` - Reusable React components
1513

16-
Open http://localhost:3000 with your browser to see the result.
14+
## Features
1715

18-
## Explore
19-
20-
In the project, you can see:
21-
22-
- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
23-
- `app/layout.config.tsx`: Shared options for layouts, optional but preferred to keep.
24-
25-
| Route | Description |
26-
| ------------------------- | ------------------------------------------------------ |
27-
| `app/(home)` | The route group for your landing page and other pages. |
28-
| `app/docs` | The documentation layout and pages. |
29-
| `app/api/search/route.ts` | The Route Handler for search. |
30-
31-
### Fumadocs MDX
32-
33-
A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.
34-
35-
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.
36-
37-
## Learn More
38-
39-
To learn more about Next.js and Fumadocs, take a look at the following
40-
resources:
41-
42-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
43-
features and API.
44-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
45-
- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs
16+
- Up-to-date documentation
17+
- AI-powered search and assistance
18+
- llms.txt file for AI code editors

apps/docs/app/(docs)/[...slug]/page.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default async function Page(props: {
2727
<LLMCopyButton markdownUrl={`${page.url}.mdx`} />
2828
<ViewOptions
2929
markdownUrl={`${page.url}.mdx`}
30-
githubUrl={`https://github.com/smutyala1at/meshjs-docs/blob/dev/apps/docs/content/docs/${page.path}`}
30+
githubUrl={`https://github.com/MeshJS/mimir/tree/main/apps/docs/content/docs/${page.path}`}
3131
/>
3232
</div>
3333
<DocsBody>
@@ -46,15 +46,25 @@ export async function generateStaticParams() {
4646
return source.generateParams();
4747
}
4848

49-
export async function generateMetadata(props: {
49+
export async function generateMetadata({
50+
params,
51+
}: {
5052
params: Promise<{ slug?: string[] }>;
5153
}) {
52-
const params = await props.params;
53-
const page = source.getPage(params.slug);
54+
const { slug = [] } = await params;
55+
const page = source.getPage(slug);
5456
if (!page) notFound();
5557

58+
const image = ['/docs-og', ...slug, 'image.png'].join('/');
5659
return {
5760
title: page.data.title,
5861
description: page.data.description,
62+
openGraph: {
63+
images: image,
64+
},
65+
twitter: {
66+
card: 'summary_large_image',
67+
images: image,
68+
},
5969
};
60-
}
70+
}

apps/docs/app/(docs)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function Layout({ children }: { children: ReactNode }) {
5656
},
5757
}}
5858
sidebar={{
59-
collapsible: false,
59+
collapsible: true,
6060
}}
6161
>
6262
<WrapperLayout isHomeLayout={false}>

0 commit comments

Comments
 (0)