Skip to content

Commit 94cc7b5

Browse files
authored
feat(docs): enhance docs and accordion for faqs (#609)
1 parent 24052f9 commit 94cc7b5

File tree

6 files changed

+254
-139
lines changed

6 files changed

+254
-139
lines changed

apps/web/content/docs/analytics.mdx

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,42 @@ Not collected:
1717
- Project name, path, or file contents (explicitly omitted)
1818
- Secrets or environment variables from your machine
1919

20-
21-
2220
## Disable telemetry
2321

2422
Telemetry is enabled by default. To disable:
2523

26-
<Tabs items={['bun', 'pnpm', 'npm']}>
27-
<Tab value="bun">
24+
<Tabs groupId="installtab" defaultValue="npm" persist>
25+
<TabsList>
26+
<TabsTrigger value="npm">
27+
npm
28+
</TabsTrigger>
29+
<TabsTrigger value="pnpm">
30+
pnpm
31+
</TabsTrigger>
32+
<TabsTrigger value="bun">
33+
bun
34+
</TabsTrigger>
35+
</TabsList>
36+
<TabsContent value="npm">
2837
```bash
29-
# Disable for a single run
30-
BTS_TELEMETRY_DISABLED=1 bun create better-t-stack@latest
38+
BTS_TELEMETRY_DISABLED=1 npx create-better-t-stack@latest
3139
```
32-
</Tab>
33-
<Tab value="pnpm">
40+
</TabsContent>
41+
<TabsContent value="pnpm">
3442
```bash
35-
# Disable for a single run
3643
BTS_TELEMETRY_DISABLED=1 pnpm create better-t-stack@latest
3744
```
38-
</Tab>
39-
<Tab value="npm">
45+
</TabsContent>
46+
<TabsContent value="bun">
4047
```bash
41-
# Disable for a single run
42-
BTS_TELEMETRY_DISABLED=1 npx create-better-t-stack@latest
48+
BTS_TELEMETRY_DISABLED=1 bun create better-t-stack@latest
4349
```
44-
</Tab>
50+
</TabsContent>
4551
</Tabs>
4652

53+
<Callout title="Note">The above commands disable it for a single run.</Callout>
54+
55+
4756
Add `export BTS_TELEMETRY_DISABLED=1` to your shell profile to make it permanent.
4857

4958
## Where to view analytics

apps/web/content/docs/cli/programmatic-api.mdx

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,34 @@ The Better-T-Stack CLI can be used programmatically in your Node.js applications
1111

1212
Install the package in your Node.js project:
1313

14-
```bash
15-
npm install create-better-t-stack
16-
# or
17-
pnpm add create-better-t-stack
18-
# or
19-
bun add create-better-t-stack
20-
```
14+
<Tabs groupId="installtab" defaultValue="npm" persist>
15+
<TabsList>
16+
<TabsTrigger value="npm">
17+
npm
18+
</TabsTrigger>
19+
<TabsTrigger value="pnpm">
20+
pnpm
21+
</TabsTrigger>
22+
<TabsTrigger value="bun">
23+
bun
24+
</TabsTrigger>
25+
</TabsList>
26+
<TabsContent value="npm">
27+
```bash
28+
npm install create-better-t-stack
29+
```
30+
</TabsContent>
31+
<TabsContent value="pnpm">
32+
```bash
33+
pnpm add create-better-t-stack
34+
```
35+
</TabsContent>
36+
<TabsContent value="bun">
37+
```bash
38+
bun add create-better-t-stack
39+
```
40+
</TabsContent>
41+
</Tabs>
2142

2243
## Quick Start
2344

apps/web/content/docs/contributing.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ title: Contributing
33
description: How to set up your environment and contribute changes
44
---
55

6-
> **⚠️ Important**: Before starting work on any new features or major changes, please open an issue first to discuss your proposal and get approval. We don't want you to waste time on work that might not align with the project's direction or get merged.
7-
6+
<Callout title="Important" type="warn">
7+
Before starting work on any new features or major changes, **please open an issue first to discuss your proposal and get approval.** We don't want you to **waste time** on work that might not align with the project's direction or get merged.
8+
</Callout>
89
## Overview
910

1011
This project is a monorepo with two main apps:

apps/web/content/docs/faq.mdx

Lines changed: 58 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,79 @@ title: Frequently Asked Questions
33
description: Short answers to common beginner questions
44
---
55

6+
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
7+
68
## General
79

8-
### What is Better‑T‑Stack?
9-
An opinionated CLI that scaffolds full‑stack TypeScript projects (frontend, backend, API, DB/ORM, auth, addons) with a clean monorepo. See the Quick Start on the docs home.
10+
<Accordions type="single">
11+
<Accordion
12+
id="faq-1"
13+
title="What is Better‑T‑Stack?">
14+
An opinionated CLI that scaffolds full‑stack TypeScript projects (frontend, backend, API, DB/ORM, auth, addons) with a clean monorepo. See the Quick Start on the docs home.
15+
</Accordion>
1016

11-
### Do I need to install anything globally?
12-
No. Run the CLI directly with your package manager. See Quick Start and the per‑command pages under CLI.
17+
<Accordion
18+
id="faq-2"
19+
title="Do I need to install anything globally?">
20+
No. Run the CLI directly with your package manager. See Quick Start and the per‑command pages under CLI.
21+
</Accordion>
1322

14-
### Which package manager can I use?
15-
`npm`, `pnpm`, or `bun` (all supported).
23+
<Accordion
24+
id="faq-3"
25+
title="Which package manager can I use?">
26+
`npm`, `pnpm`, or `bun` (all supported).
27+
</Accordion>
1628

17-
### What Node.js version is required?
18-
Node.js 20+ (LTS recommended).
29+
<Accordion
30+
id="faq-4"
31+
title="What Node.js version is required?">
32+
Node.js 20+ (LTS recommended).
33+
</Accordion>
1934

20-
### Can I use this with an existing project?
21-
The CLI is for new projects. You can migrate gradually or use `add` to extend a Better‑T‑Stack project.
35+
<Accordion
36+
id="faq-5"
37+
title="Can I use this with an existing project?">
38+
The CLI is for new projects. You can migrate gradually or use `add` to extend a Better‑T‑Stack project.
39+
</Accordion>
2240

23-
### Where do generated files live?
24-
See Project Structure for high‑level layouts (server‑based vs. Convex, optional web/native).
41+
<Accordion
42+
id="faq-6"
43+
title="Where do generated files live?">
44+
See Project Structure for high‑level layouts (server‑based vs. Convex, optional web/native)..
45+
</Accordion>
46+
</Accordions>
2547

2648
## Choosing options
2749

28-
### Does the CLI recommend a stack?
29-
No. Pick what fits your needs. The CLI validates compatibility. See CLI (per command) and Compatibility for rules.
50+
<Accordions type="single">
51+
<Accordion
52+
id="faq-7"
53+
title="Does the CLI recommend a stack?">
54+
No. Pick what fits your needs. The CLI validates compatibility. See CLI (per command) and Compatibility for rules.
55+
</Accordion>
3056

31-
### I’m unsure between tRPC and oRPC / Drizzle and Prisma
32-
See Compatibility for guidance and constraints. Both pairs work well; choose based on team and hosting needs.
57+
<Accordion
58+
id="faq-8"
59+
title="I’m unsure between tRPC and oRPC / Drizzle and Prisma">
60+
See Compatibility for guidance and constraints. Both pairs work well; choose based on team and hosting needs.
61+
</Accordion>
62+
</Accordions>
3363

3464
## Common issues
3565

36-
### My mobile app can’t connect to the backend (Expo)
37-
Set `EXPO_PUBLIC_SERVER_URL` in `apps/native/.env` to your machine IP (not `localhost`), check firewall, or try `npx expo start --tunnel`.
66+
<Accordions type="single">
67+
<Accordion
68+
id="faq-9"
69+
title="My mobile app can’t connect to the backend (Expo)">
70+
Set `EXPO_PUBLIC_SERVER_URL` in `apps/native/.env` to your machine IP (not `localhost`), check firewall, or try `npx expo start --tunnel`.
71+
</Accordion>
3872

39-
### How do I disable telemetry?
40-
Set `BTS_TELEMETRY_DISABLED=1` (shell env). For one run, prefix the command; to make it permanent, export it in your shell profile.
73+
<Accordion
74+
id="faq-10"
75+
title="How do I disable telemetry?">
76+
Set `BTS_TELEMETRY_DISABLED=1` (shell env). For one run, prefix the command; to make it permanent, export it in your shell profile.
77+
</Accordion>
78+
</Accordions>
4179

4280
## Getting help
4381

0 commit comments

Comments
 (0)