You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* cleanup from base-stack
* sidebar initial working version
* functional table of content component
* small change in the knip.json
* custom script to validate content folder positions inside frontmatter, and some fixes in sidebar, toc and ocumentation page
* updated readme.md file
* updated readme.md file
* small refactoring and added documnetation for some components
* footer component
* initial theme switcher, changes on UI, additional components
* fonts, some fixes
* small change
* convention xx-file-name.mdx update - still updates needed
* refactoring
* small changes and updated package.json
* ts fix?
* ts fix?
* ts fix?
* ts fix?
* ts fix?
* sidebar fix
* added content folder and some fixes and improvements in UI
* removed _index route, added index.mdx file for hopemage, reorganized routes.ts
* refactoring
* small update in update-frontmatter logic
* small refactoring
* small ui improvements
* small ui improvements
* refactoring
* refactoring
* theme toggle fix
* refactoring ad vitest tests for some helper functions
* small refactoring
* fix in breadcrumbs building
* fix in breadcrumbs building
* unit tests and small improvements
* comments and tests
* fixed so it doesnt contains v1.0.1 now
* fixes
* small update
* small fixes
* small change
* small fix in sidebar
* refactoring
* improvements
This template is designed to support a flexible content structure using `.md` and `.mdx` files organized into folders. It enables deeply nested sections and subsections, making it easy to manage complex documentation with a clear and scalable hierarchy.
4
+
5
+
The project is built using the [@forge-42/base-stack](https://github.com/forge-42/base-stack) and leverages the [content-collections](https://github.com/sdorra/content-collections).
6
+
7
+
8
+
## Documentation Template Structure Overview
9
+
10
+
`app/`
11
+
12
+
This folder contains React Router v7 web application folders and files, including components and UI primitives for the documentation site’s interface, internal hooks and utilities, and the tailwind.css file for styling.
13
+
14
+
15
+
`resources/`
16
+
17
+
This folder contains all the resources used by the documentation site, such as SVG icons, fonts, and other assets.
18
+
19
+
`content/`
20
+
21
+
This folder contains sections and subsections with .mdx files that hold your documentation content. Below is the recommended structure to follow.
22
+
23
+
24
+
An example of a valid content/ folder structure for organizing your package documentation:
This is a base-stack for Forge 42 projects. This stack is a starting point for all Forge 42 stacks with more
10
-
advanced features. This is an ESM Vite stack with Remix.run / React Router v7.
11
-
12
-
It includes a basic setup for a project with react-router v7 framework mode and:
13
-
- React 19 & react-compiler
14
-
- TypeScript
15
-
- TailwindCSS
16
-
- Vite
17
-
- Vitest (unit tests)
18
-
- Scripting
19
-
- Biome (linter & formatter)
20
-
- i18n support (client and server)
21
-
- Icons spritesheet generator
22
-
- lefthook hooks
23
-
- CI checks for quality control
24
-
- react-router-devtools
25
-
- Hono server
26
-
- .env var handling for server and client
27
-
- SEO robots.txt, sitemap-index and sitemap built in.
28
-
29
-
## Internationalization
30
-
31
-
This stack uses i18next for internationalization. It supports both client and server side translations.
32
-
Features included out of the box:
33
-
- Support for multiple languages
34
-
- Typesafe resources
35
-
- client side translations are fetched only when needed
36
-
- language switcher
37
-
- language detector (uses the request to detect the language, falls back to your fallback language)
38
-
39
-
## Hono server
40
-
41
-
This stack uses Hono for the server. More information about Hono can be found [here](https://honojs.dev/).
42
-
Another important thing to note is that we use a dependency called `react-router-hono-server` which is a wrapper for Hono that allows us to use Hono in our React Router application.
43
-
44
-
The server comes preconfigured with:
45
-
- i18next middleware
46
-
- caching middleware for assets
47
-
- easily extendable global application context
48
-
- .env injection into context
49
-
50
-
In order to add your own middleware, extend the context, or anything along those lines, all you have to do is edit the server
51
-
inside the `entry.server.tsx` file.
52
-
53
-
## .env handling
54
-
55
-
This stack parses your `.env` file and injects it into the server context. For the client side, in the `root.tsx` file, we use the `useLoaderData` hook to get the `clientEnv` from the server and set it as a global variable on the `window` called `env`.
56
-
If you need to access the env variables in both environments, you can create a polyEnv helper like this:
57
-
```ts
58
-
// app/utils/env.ts
59
-
// This will return the process.env on the server and window.env on the client
The server will fail at runtime if you don't set your `.env` file properly.
27
+
content/
28
+
├── _index.mdx
29
+
├── 01-changelog.mdx
30
+
├── 02-introduction.mdx
31
+
├── 03-overview.mdx
32
+
├── 04-getting-started/
33
+
│ ├── index.md
34
+
│ ├── 01-installation.mdx
35
+
│ ├── 02-quick-start.mdx
36
+
│ └── 03-project-setup.mdx
37
+
└── 05-core-features/
38
+
├── index.md
39
+
├── 01-authentication.mdx
40
+
├── 02-authorization.mdx
41
+
├── 03-data-management/
42
+
│ ├── index.md
43
+
│ ├── 01-fetching-data.mdx
44
+
│ └── 02-caching-strategies.mdx
45
+
└── 04-ui-components/
46
+
├── index.md
47
+
├── 01-buttons.mdx
48
+
└── 02-modals.mdx
49
+
```
50
+
- Top-level .mdx files (like 01-changelog.mdx) are allowed.
51
+
- Sections (like 04-getting-started, 05-core-features) are subfolders inside the content/ folder.
52
+
- Subsections (like 03-data-management, 04-ui-components) are nested folders within sections.
53
+
- Each section or subsection should have an index.md file for its sidebar title.
54
+
55
+
### Example of the valid `02-introduction.mdx` file:
56
+
```
57
+
---
58
+
title: "Introduction to Forge42 Base Stack"
59
+
summary: "Overview of the Stack"
60
+
description: "Get started with the Forge42 Base Stack — a modern web app starter template designed for speed, scalability, and developer experience."
61
+
---
62
+
63
+
## What is Forge42 Base Stack?
64
+
65
+
The Forge42 Base Stack is a full-featured web application starter template. It combines modern tools and technologies like **Remix**, **Tailwind CSS**, **TypeScript**, **Vitest**, and **React Aria Components** to help you build accessible and scalable web apps quickly.
66
+
67
+
This documentation will guide you through setting up the project, understanding its structure, and customizing it for your needs.
68
+
69
+
## Installation
70
+
71
+
To get started with the base stack, simply clone the repository and install dependencies:
72
+
73
+
```bash
74
+
npx degit forge42/base-stack my-app
75
+
cd my-app
76
+
npm install
77
+
```
78
+
79
+
### Example of the valid `04-getting-started/index.md` file:
80
+
```
81
+
---
82
+
title: Getting Started
83
+
---
84
+
85
+
```
86
+
63
87
64
88
## Getting started
65
89
@@ -71,17 +95,10 @@ pnpm install
71
95
```
72
96
3. Read through the README.md files in the project to understand our decisions.
73
97
74
-
4. Run the cleanup script:
75
-
```bash
76
-
pnpm cleanup
77
-
```
78
-
79
-
This will remove everything in the project related to the base-stack like README.md etc.
80
-
This is the first thing you should run after initializing the project.
81
-
After it is run it will remove itself from the package.json.
0 commit comments