Skip to content

OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights — built openly, for everyone, forever free.

feat: announce the October update with a banner and a What's new page

ravixalgorithmd741a2bc273f
diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsx
index 9558431..5222db7 100644
--- a/app/(marketing)/layout.tsx
+++ b/app/(marketing)/layout.tsx
@@ -5,6 +5,7 @@ import { getSession } from "@/lib/better-auth/auth";
import { formatCount, getRepoStats } from "@/lib/github";
import OpenDevSocietyBranding from "@/components/OpenDevSocietyBranding";
import SponsorsBand from "@/components/sponsors/SponsorsBand";
+import UpdateBanner from "@/components/UpdateBanner";
import { DISCORD_URL, REPO_URL } from "@/lib/constants";
const FOOTER_LINKS = [
@@ -14,6 +15,7 @@ const FOOTER_LINKS = [
{ href: '/terms', label: 'Terms' },
{ href: '/sponsor', label: 'Sponsor' },
{ href: '/love', label: 'Wall of love' },
+ { href: '/whats-new', label: 'What’s new' },
{ href: REPO_URL, label: 'GitHub' },
{ href: DISCORD_URL, label: 'Discord' },
{ href: 'https://www.linkedin.com/company/opendevsociety-in/', label: 'LinkedIn' },
@@ -25,6 +27,7 @@ export default async function MarketingLayout({ children }: { children: React.Re
return (
<div className="min-h-dvh bg-page">
+ <UpdateBanner className="mx-5 mt-3 xl:mx-auto xl:max-w-[1160px]" />
<header className="sticky top-0 z-40 border-b border-transparent bg-page/80 backdrop-blur-md">
<div className="mx-auto flex h-16 max-w-[1200px] items-center gap-6 px-5">
<Link href="/" aria-label="OpenStock home" className="shrink-0">
diff --git a/app/(marketing)/whats-new/page.tsx b/app/(marketing)/whats-new/page.tsx
new file mode 100644
index 0000000..58de590
--- /dev/null
+++ b/app/(marketing)/whats-new/page.tsx
@@ -0,0 +1,53 @@
+import Link from "next/link";
+import { Check } from "lucide-react";
+import PageHero from "@/components/marketing/PageHero";
+import { REPO_URL } from "@/lib/constants";
+import { UPDATES } from "@/lib/updates";
+
+export const metadata = {
+ title: 'What’s new',
+ description: 'What changed in OpenStock, release by release.',
+};
+
+export default function WhatsNewPage() {
+ return (
+ <>
+ <PageHero
+ kicker="What’s new"
+ title="What changed in OpenStock."
+ sub="Every release, in plain words. OpenStock is open source, so each change is also on GitHub."
+ >
+ <Link href="/dashboard" className="btn btn-primary h-11 px-5 text-[15px]">Open dashboard</Link>
+ <a href={`${REPO_URL}/pulls?q=is%3Apr+is%3Amerged`} target="_blank" rel="noreferrer" className="btn btn-ghost h-11 px-5 text-[15px]">Every change on GitHub</a>
+ </PageHero>
+
+ <div className="mx-auto mt-16 flex max-w-[1200px] flex-col gap-16 px-5">
+ {UPDATES.map((update) => (
+ <section key={update.id} aria-labelledby={`update-${update.id}`}>
+ <p className="kicker text-brand-ink">{update.date}</p>
+ <h2 id={`update-${update.id}`} className="mt-2 text-[28px] font-bold tracking-[-0.04em] md:text-[34px]">{update.title}</h2>
+ <p className="mt-2 max-w-2xl text-[16px] text-muted-foreground">{update.headline}.</p>
+
+ <div className="mt-8 grid gap-3 md:grid-cols-2">
+ {update.sections.map((section) => (
+ <div key={section.title} className="hatch">
+ <div className="card h-full p-5">
+ <h3 className="text-[16px] font-bold">{section.title}</h3>
+ <ul className="mt-3 flex flex-col gap-2.5 text-[14px] leading-relaxed">
+ {section.items.map((item) => (
+ <li key={item} className="flex gap-2.5">
+ <Check className="mt-1 size-4 flex-none text-brand-ink" />
+ <span className="text-muted-foreground">{item}</span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ </div>
+ ))}
+ </div>
+ </section>
+ ))}
+ </div>
+ </>
+ );
+}
diff --git a/components/UpdateBanner.tsx b/components/UpdateBanner.tsx
new file mode 100644
index 0000000..81d39cf
--- /dev/null
+++ b/components/UpdateBanner.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import { useEffect, useState } from "react";
+import Link from "next/link";
+import { ArrowRight, X } from "lucide-react";
+import { LATEST_UPDATE } from "@/lib/updates";
+import { cn } from "@/lib/utils";
+
+const STORAGE_KEY = 'openstock:update-seen';
+
+// Announces the latest release until it's dismissed or opened. Rendered only after mount, so people who already
+// closed it never see it flash in.
+export default function UpdateBanner({ className }: { className?: string }) {
+ const [visible, setVisible] = useState(false);
+ useEffect(() => {
+ try { setVisible(localStorage.getItem(STORAGE_KEY) !== LATEST_UPDATE.id); } catch { setVisible(true); }
+ }, []);
+
+ if (!visible) return null;
+
+ const markSeen = () => {
+ setVisible(false);
+ try { localStorage.setItem(STORAGE_KEY, LATEST_UPDATE.id); } catch { /* private mode: hidden for this visit */ }
+ };
+
+ return (
+ <div
+ role="region"
+ aria-label="What's new"
+ className={cn('flex items-center gap-2.5 rounded-[12px] bg-brand-soft/50 py-1.5 pl-2 pr-1.5 text-[13px] shadow-[inset_0_0_0_1px_oklch(0.8_0.13_176/0.25)]', className)}
+ >
+ <span className="pill is-brand shrink-0">New</span>
+ <p className="min-w-0 flex-1 truncate">
+ <span className="font-semibold text-foreground">{LATEST_UPDATE.title}:</span>{' '}
+ <span className="text-muted-foreground">{LATEST_UPDATE.headline}</span>
+ </p>
+ <Link href="/whats-new" onClick={markSeen} className="flex shrink-0 items-center gap-1 font-semibold text-brand-ink hover:underline">
+ What’s new <ArrowRight className="size-3.5" />
+ </Link>
+ <button type="button" onClick={markSeen} className="icon-btn size-7 shrink-0" aria-label="Dismiss update banner" title="Dismiss">
+ <X className="size-3.5" />
+ </button>
+ </div>
+ );
+}
diff --git a/components/shell/AppShell.tsx b/components/shell/AppShell.tsx
index a1c6614..1fa67f0 100644
--- a/components/shell/AppShell.tsx
+++ b/components/shell/AppShell.tsx
@@ -6,6 +6,7 @@ import Sidebar from "@/components/shell/Sidebar";
import TabBar from "@/components/shell/TabBar";
import SearchCommand from "@/components/SearchCommand";
import { cn } from "@/lib/utils";
+import UpdateBanner from "@/components/UpdateBanner";
type AppShellProps = {
user: User;
@@ -43,7 +44,10 @@ const AppShell = ({ user, watchlist, initialStocks, children }: AppShellProps) =
<div className="app">
<TabBar onMenu={() => setNavOpen(true)} />
<main ref={workspaceRef} className={cn('workspace', pathname === '/dashboard' && 'is-first-tab')}>
- <div className="workspace-inner">{children}</div>
+ <div className="workspace-inner">
+ <UpdateBanner />
+ {children}
+ </div>
</main>
</div>
</div>
diff --git a/lib/updates.ts b/lib/updates.ts
new file mode 100644
index 0000000..4c1b388
--- /dev/null
+++ b/lib/updates.ts
@@ -0,0 +1,59 @@
+// What changed in each release, newest first. The banner announces UPDATES[0] until it's dismissed, and /whats-new
+// lists everything. Give each update a new id so a dismissed banner comes back for the next release.
+export type Update = {
+ id: string;
+ date: string;
+ title: string;
+ headline: string;
+ sections: { title: string; items: string[] }[];
+};
+
+export const UPDATES: Update[] = [
+ {
+ id: '2026-10-18',
+ date: '18 October 2026',
+ title: 'October update',
+ headline: 'Draw on charts, keep your indicators, and safer sign-in',
+ sections: [
+ {
+ title: 'Charts',
+ items: [
+ 'Draw on the stock chart: trend lines, horizontal lines, Fibonacci, shapes and text.',
+ 'The indicators you pick (SMA, EMA, Bollinger Bands, VWAP, RSI, MACD, Stochastic, ATR) stay on every chart, after a reload and in fullscreen.',
+ 'Tickers with a - or & now chart correctly, such as M&M and Bajaj-Auto in India, Ericsson B in Stockholm and Novo Nordisk B in Copenhagen.',
+ ],
+ },
+ {
+ title: 'Watchlist',
+ items: [
+ 'Watchlists hold up to 50 stocks, and you’re told when yours is full instead of seeing a generic error.',
+ ],
+ },
+ {
+ title: 'Community',
+ items: [
+ 'A new Wall of love: our sponsors and supporters, plus the posts, videos and articles people have made about OpenStock.',
+ ],
+ },
+ {
+ title: 'Security',
+ items: [
+ 'Sign-in, sign-up and password reset are rate-limited, so nobody can guess passwords or flood inboxes.',
+ 'Welcome emails can no longer carry links or markup injected at sign-up.',
+ 'Next.js security update covering about 30 advisories.',
+ ],
+ },
+ {
+ title: 'Self-hosting',
+ items: [
+ 'A prebuilt Docker image for amd64 and arm64: ghcr.io/open-dev-society/openstock.',
+ 'Docker builds need no database or secrets, and no key is stored in the image.',
+ 'docker compose no longer publishes MongoDB on your network, and its password comes from .env.',
+ 'The image runs on Node 22 LTS.',
+ ],
+ },
+ ],
+ },
+];
+
+export const LATEST_UPDATE = UPDATES[0];
diff --git a/middleware.ts b/middleware.ts
index 331c6bd..d859ebc 100644
--- a/middleware.ts
+++ b/middleware.ts
@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import { getSessionCookie } from "better-auth/cookies";
-const PUBLIC_PATHS = new Set(['/', '/about', '/help', '/terms', '/api-docs', '/sponsor', '/love']);
+const PUBLIC_PATHS = new Set(['/', '/about', '/help', '/terms', '/api-docs', '/sponsor', '/love', '/whats-new']);
export async function middleware(request: NextRequest) {
// The marketing site is public