stack/docs
BilalG1 0c4958afb4
init stack cli project-id and publishable-client-key args (#888)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Add CLI options for project ID and publishable client key, update
initialization process, and modify documentation to reflect changes.
> 
>   - **CLI Options**:
> - Added `--project-id` and `--publishable-client-key` options to
`index.ts` for CLI setup.
>   - **Initialization**:
> - Updated `writeEnvVars()` in `index.ts` to include project ID and
publishable client key in `.env.local`.
> - Modified `writeStackAppFile()` in `index.ts` to handle new CLI
options.
>   - **Documentation**:
> - Updated references from `stack.ts` to `stack/client.ts` and
`stack/server.ts` in multiple `.mdx` files.
> - Added examples for using project ID and publishable client key in
`setup.mdx` and `example-pages.mdx`.
>   - **Testing**:
> - Added `test-run-keys-next` and `test-run-keys-js` scripts in
`package.json` for testing new CLI options.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for b204910ebd. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

----


<!-- ELLIPSIS_HIDDEN -->

<!-- RECURSEML_SUMMARY:START -->
## Review by RecurseML

_🔍 Review performed on
[bd14f6b..92c332a](bd14f6be6a...92c332ad3f)_

 No bugs found, your code is sparkling clean

<details>
<summary> Files analyzed, no issues (2)</summary>

  • `packages/init-stack/src/index.ts`
•
`apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/new-project/page-client.tsx`
</details>

<details>
<summary>⏭️ Files skipped (trigger manually) (1)</summary>

| Locations | Trigger Analysis |
|-----------|------------------|
`packages/init-stack/package.json` |
[![Analyze](4d33d423a3/?repo_owner=stack-auth&repo_name=stack-auth&pr_number=888)
</details>

[![Need help? Join our
Discord](https://img.shields.io/badge/Need%20help%3F%20Join%20our%20Discord-5865F2?style=plastic&logo=discord&logoColor=white)](https://discord.gg/n3SsVDAW6U)
<!-- RECURSEML_SUMMARY:END -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- New Features
- Init tool accepts project ID and publishable client key; generated
projects include those values in client/server outputs and env hints.
- Next.js projects now generate both client and server app artifacts
using a standardized client/server layout.

- UI
- Removed the vertical divider on the New Project page for a cleaner
preview/form layout.

- Documentation
- Updated docs and examples to reference the new client/server file
split.

- Chores
  - Added key-based test-run scripts for Next.js and JS.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-11 10:10:36 -07:00
..
lib Update AI chatbot prompt 2025-07-16 13:38:12 -07:00
public Re-add CLI auth docs 2025-07-03 15:43:36 -07:00
scripts init emails docs (#848) 2025-08-21 12:05:48 -05:00
src [Docs][UI] - Components pop-up dynamic-codeblock (#877) 2025-09-10 01:54:20 -05:00
templates init stack cli project-id and publishable-client-key args (#888) 2025-09-11 10:10:36 -07:00
templates-api New docs (#698) 2025-06-20 13:30:01 -07:00
templates-python [Docs][MDX] Add python backend integration (#874) 2025-09-10 02:19:09 -05:00
.env.development New docs (#698) 2025-06-20 13:30:01 -07:00
.eslintrc.json New docs (#698) 2025-06-20 13:30:01 -07:00
.gitignore Docs updates (#753) 2025-07-11 10:00:02 -07:00
CHANGELOG.md chore: update package versions 2025-09-03 01:38:13 -07:00
cli.json New docs (#698) 2025-06-20 13:30:01 -07:00
docs-platform.yml init emails docs (#848) 2025-08-21 12:05:48 -05:00
next.config.mjs Add API docs to llms.txt file. (#766) 2025-07-15 11:13:32 -05:00
package.json chore: update package versions 2025-09-03 01:38:13 -07:00
postcss.config.mjs New docs (#698) 2025-06-20 13:30:01 -07:00
README.md New docs (#698) 2025-06-20 13:30:01 -07:00
source.config.ts New docs (#698) 2025-06-20 13:30:01 -07:00
tsconfig.json New docs (#698) 2025-06-20 13:30:01 -07:00

stack-docs

This is a Next.js application generated with Create Fumadocs.

Run development server:

npm run dev
# or
pnpm dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Explore

In the project, you can see:

  • lib/source.ts: Code for content source adapter, loader() provides the interface to access your content.
  • app/layout.config.tsx: Shared options for layouts, optional but preferred to keep.
Route Description
app/(home) The route group for your landing page and other pages.
app/docs The documentation layout and pages.
app/api The documentation for API pages.
app/api/search/route.ts The Route Handler for search.

Fumadocs MDX

A source.config.ts config file has been included, you can customise different options like frontmatter schema.

Read the Introduction for further details.

Learn More

To learn more about Next.js and Fumadocs, take a look at the following resources: