Skip to content

Commit c834b05

Browse files
committed
feat: expand documentation, improve SQS implementation details, and add installation-target hook
1 parent 578c4da commit c834b05

32 files changed

Lines changed: 2110 additions & 1236 deletions

apps/web/www/app/components/shared/footer.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import mildstack from '@/assets/logos/mildstack-logo-full-white.png';
22
import { Download } from 'lucide-react';
3+
import { useInstallationTarget } from '@/hooks/use-installation-target';
34

45
export function Footer() {
56
const year = new Date().getFullYear();
7+
const { installationHref } = useInstallationTarget();
68

79
const website = [
810
{
@@ -63,7 +65,7 @@ export function Footer() {
6365
))}
6466
<a
6567
className="hover:bg-accent rounded-md border p-1.5 flex flex-row items-center gap-2 text-sm font-light"
66-
href="/download"
68+
href={installationHref}
6769
>
6870
<Download className="size-5" />
6971
Download App

apps/web/www/app/components/shared/navbar.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { motion, AnimatePresence, useScroll, useMotionValueEvent } from 'motion/
33
import { Star, Download, Menu, X } from 'lucide-react';
44
import { useLocation } from 'react-router';
55
import { Button } from '@/components/ui/button';
6+
import { useInstallationTarget } from '@/hooks/use-installation-target';
67
import { cn } from '@/lib/utils';
78
import logoFullWhite from '../../assets/logos/mildstack-logo-full-white.png'
89

@@ -36,6 +37,7 @@ export const Navbar: React.FC = () => {
3637
const [activeSection, setActiveSection] = useState<string | null>('home');
3738
const { scrollY } = useScroll();
3839
const { pathname } = useLocation();
40+
const { installationDocsRoute, installationHref } = useInstallationTarget();
3941

4042
const handleSectionClick = (
4143
event: React.MouseEvent<HTMLAnchorElement>,
@@ -159,7 +161,8 @@ export const Navbar: React.FC = () => {
159161
</>
160162
);
161163

162-
const isDownloadActive = pathname === '/download';
164+
const isDownloadActive =
165+
pathname === '/download' || pathname === installationDocsRoute;
163166

164167
const ActionButtons = ({ isMobile = false, closeMenu }: { isMobile?: boolean; closeMenu?: () => void }) => (
165168
<>
@@ -172,7 +175,7 @@ export const Navbar: React.FC = () => {
172175
isMobile ? 'px-8 h-12 text-lg w-full max-w-[280px] flex' : 'hidden md:flex h-9 px-4 text-sm hover:text-gray-300'
173176
)}
174177
>
175-
<a href="/download" onClick={closeMenu}>
178+
<a href={installationHref} onClick={closeMenu}>
176179
<Download className={isMobile ? 'size-5' : 'size-4'} />
177180
Download
178181
</a>

apps/web/www/app/features/home/components/call-to-action.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { ArrowRightIcon, PlusIcon } from "lucide-react";
22
import { Button } from "@/components/ui/button";
3+
import { useInstallationTarget } from "@/hooks/use-installation-target";
34

45
export function CallToAction() {
6+
const { installationHref } = useInstallationTarget();
7+
58
return (
69
<div className="relative mx-auto flex w-full max-w-3xl flex-col justify-between gap-y-6 border-y bg-background bg-[radial-gradient(35%_80%_at_75%_0%,color-mix(in_oklab,var(--color-primary)_35%,var(--color-background)),transparent)] px-4 py-8">
710
<PlusIcon
@@ -43,7 +46,7 @@ export function CallToAction() {
4346
</a>
4447
</Button>
4548
<Button asChild>
46-
<a href="/download">
49+
<a href={installationHref}>
4750
Download <ArrowRightIcon className="size-4 ml-1" />
4851
</a>
4952
</Button>

apps/web/www/app/features/home/sections/hero/hero.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useRef, useEffect, useState } from 'react';
22
import { motion, type Variants } from 'motion/react';
33
import { ChevronRight, Cpu, Timer, MemoryStick, PlugZap } from 'lucide-react';
4+
import { useInstallationTarget } from '@/hooks/use-installation-target';
45

56
interface LightningProps {
67
hue?: number;
@@ -254,6 +255,7 @@ const FeatureItem: React.FC<FeatureItemProps> = ({ name, value, position, icon }
254255
export const HeroSection: React.FC = () => {
255256
const lightningHue = 245;
256257
const [lightningXOffset, setLightningXOffset] = useState(0);
258+
const { installationHref } = useInstallationTarget();
257259

258260
useEffect(() => {
259261
const updateLightningOffset = () => {
@@ -304,7 +306,7 @@ export const HeroSection: React.FC = () => {
304306
className="relative z-30 mx-auto flex min-h-[calc(100vh-7rem)] max-w-4xl flex-col items-center justify-center text-center md:min-h-0 md:mt-28"
305307
>
306308
<motion.a
307-
href="/download"
309+
href={installationHref}
308310
variants={itemVariants}
309311
whileHover={{ scale: 1.05 }}
310312
whileTap={{ scale: 0.95 }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { useEffect, useState } from 'react';
2+
3+
type PlatformFamily = 'macos' | 'windows' | 'linux' | 'unknown';
4+
5+
const DOWNLOAD_ROUTE = '/download';
6+
const INSTALLATION_DOCS_ROUTE = '/docs/getting-started/installation';
7+
8+
function detectPlatform(): PlatformFamily {
9+
if (typeof navigator === 'undefined') return 'unknown';
10+
11+
const platform = navigator.platform.toLowerCase();
12+
const userAgent = navigator.userAgent.toLowerCase();
13+
14+
if (platform.includes('mac') || userAgent.includes('mac os')) return 'macos';
15+
if (platform.includes('win') || userAgent.includes('windows')) return 'windows';
16+
if (platform.includes('linux') || userAgent.includes('linux')) return 'linux';
17+
18+
return 'unknown';
19+
}
20+
21+
export function useInstallationTarget() {
22+
const [platform, setPlatform] = useState<PlatformFamily>('unknown');
23+
24+
useEffect(() => {
25+
setPlatform(detectPlatform());
26+
}, []);
27+
28+
const installationHref =
29+
platform === 'macos' ? INSTALLATION_DOCS_ROUTE : DOWNLOAD_ROUTE;
30+
31+
return {
32+
downloadRoute: DOWNLOAD_ROUTE,
33+
installationDocsRoute: INSTALLATION_DOCS_ROUTE,
34+
installationHref,
35+
isMacOS: platform === 'macos',
36+
platform,
37+
};
38+
}
39+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Build from Source
3+
description: |
4+
Build MildStack from source for local development, contribution workflows, or custom packaging.
5+
---
6+
7+
## When to Use This Guide
8+
9+
Use this path when you want to compile MildStack directly from this repository for development, contribution workflows, or custom packaging.
10+
11+
<Callout type="info" title="Standard users">
12+
If you only need to run MildStack, use [Installation](/docs/getting-started/installation) instead.
13+
</Callout>
14+
15+
## Prerequisites
16+
17+
- Go `1.26.2` or later
18+
- Node.js and npm for the Desktop App build
19+
- Git
20+
21+
## Clone the Repository
22+
23+
```bash
24+
git clone https://github.com/michasdev/mildstack.git
25+
cd mildstack
26+
```
27+
28+
## Build the CLI Binary
29+
30+
From the repository root:
31+
32+
```bash
33+
go build -o mildstack ./core/cmd/mildstack/main.go
34+
```
35+
36+
Optional CLI smoke check:
37+
38+
```bash
39+
./mildstack start --detach
40+
./mildstack instances
41+
./mildstack stop --all
42+
```
43+
44+
## Build the Desktop App
45+
46+
```bash
47+
cd apps/desktop
48+
npm install
49+
npm run build
50+
```
51+
52+
## Build Desktop Installers (optional)
53+
54+
From `apps/desktop`:
55+
56+
```bash
57+
npm run build:mac
58+
# or
59+
npm run build:win
60+
# or
61+
npm run build:linux
62+
```
63+
64+
## Back to Installation
65+
66+
For standard installation paths, see [Installation](/docs/getting-started/installation).

0 commit comments

Comments
 (0)