stack/docs
Zai Shi 202f54d787
Add S3 bucket (#816)
Note for deployment: This PR needs to add some env vars
<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Adds S3-compatible storage for profile images with S3Mock for local
development, updating environment variables, Docker configurations, and
tests.
> 
>   - **Behavior**:
> - Adds S3-compatible storage for user, team, and team member profile
images using `uploadAndGetUrl()` in `s3.tsx`.
> - Integrates S3Mock for local development in `docker.compose.yaml` and
`emulator/docker.compose.yaml`.
> - Updates `crud.tsx` files for `users`, `teams`, and
`team-member-profiles` to use S3 for profile images.
>   - **Environment**:
>     - Adds S3-related environment variables to `.env.development`.
>     - Updates `package.json` to include `@aws-sdk/client-s3`.
>   - **Testing**:
> - Modifies test cases in `teams.test.ts` and `users.test.ts` to
validate S3 URL behavior.
> - Updates `auto-migration.tests.ts` for concurrent migration handling.
>   - **Documentation**:
>     - Updates `self-host.mdx` to include S3 storage requirements.
> 
> <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 901f0b56cd. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

----


<!-- ELLIPSIS_HIDDEN -->

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

* **New Features**
* Added support for uploading and storing user, team, and team member
profile images using S3-compatible storage.
* Integrated S3Mock for local development and testing of storage
features.
* Added new services to Docker Compose configurations for S3Mock and
related dependencies.
* Introduced image validation and processing for base64-encoded images
before upload.

* **Bug Fixes**
* Profile image upload now returns a storage URL instead of echoing back
the base64 data.

* **Documentation**
* Updated self-hosting documentation to include S3 storage requirements
and usage.

* **Chores**
* Added and updated environment variables for S3 storage configuration.
  * Updated backend dependencies to include the AWS S3 SDK.
  * Enhanced test cases to validate new image upload and URL behaviors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-08-01 20:30:44 +02: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 fix links and redirect issues on components index page (#796) 2025-07-23 19:13:30 -07:00
src Better 404 for docs 2025-07-30 13:37:05 -07:00
templates Add S3 bucket (#816) 2025-08-01 20:30:44 +02:00
templates-api New docs (#698) 2025-06-20 13:30:01 -07:00
templates-python Docs updates (#753) 2025-07-11 10:00:02 -07: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-07-30 10:50:54 -07:00
cli.json New docs (#698) 2025-06-20 13:30:01 -07:00
docs-platform.yml Docs updates (#753) 2025-07-11 10:00:02 -07:00
middleware.ts Docs updates (#753) 2025-07-11 10:00:02 -07: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-07-30 10:50:54 -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: