import type { AppThemeScheme, SectionsPagesIndex } from "./types";
type Const = {
APP_NAME: string;
DEFAULT_THEME_SCHEME: AppThemeScheme;
SECTIONS_WITH_PAGES: SectionsPagesIndex;
SECTIONS_TITLES: Record<string, string>;
SECTIONS_SUMMARIES: Record<string, string>;
SSR_CACHE_MAX_SIZE_BYTES: number;
};
export const Const: Const = {
APP_NAME: "React Monolith",
DEFAULT_THEME_SCHEME: "dark",
SSR_CACHE_MAX_SIZE_BYTES: 50_000_000,
SECTIONS_WITH_PAGES: {
["getting-started"]: [
"the-monolith-architecture",
"tooling-typescript",
"generate-project-cli",
],
["server-configuration"]: ["server-file-explained", "options"],
["declarative-routing"]: ["routes-file-explained", "options"],
["controllers"]: ["what-is-a-controller"],
["views-and-islands"]: ["what-is-a-view", "what-is-an-island"],
["seo-and-a11y"]: ["meta-tags", "accessibility"],
["faq-and-known-issues"]: ["islands-cannot-share-react-context"],
},
SECTIONS_TITLES: {
"getting-started": "Getting Started",
"server-configuration": "Server Configuration",
"declarative-routing": "Declarative Routing",
controllers: "Controllers",
"views-and-islands": "Views and Islands",
"seo-and-a11y": "SEO & A11Y",
"faq-and-known-issues": "FAQ & Known Issues",
},
SECTIONS_SUMMARIES: {
"getting-started":
"Discover the concepts behind React Monolith and how to use them so they benefit to your websites and web applications.",
"server-configuration":
"Learn about the server file and how you can use the options it provides to develop an application that fit your needs in a fast way.",
"declarative-routing":
"Navigation handling couldn’t be made easier thanks to a simple JSX declarative routes file that contains all your route/controller mappings.",
controllers:
"Discover how you can implement your business logic on the server-side and reply by streaming React views as a response to the client request.",
"views-and-islands":
"Learn more about the two types ReactView and ReactIsland and how they help you to create interactivity in area where you need it.",
"seo-and-a11y":
"Learn how you can leverage the ViewContext to generate meta-tags that improve your search engine ranking and accessibility for your users.",
"faq-and-known-issues":
"Frequently Asked Questions and Known Issues around the React Monolith Framework and its underlying fastify-stream-react-views plugin (which does most of the SSR/Islands work).",
},
};