Zum Inhalt springen
Projekt startenStarten

Datei-Uploads

Lass Nutzer Dateien hochladen. Eine API für drei Speicher: die lokale Festplatte, jeden S3-kompatiblen Speicher oder Vercel Blob.

Was es hinzufügt

  • packages/storage, basierend auf Files SDK, mit drei Treibern: der lokalen Festplatte, S3-kompatiblen Speichern (Cloudflare R2, AWS S3, MinIO) und Vercel Blob.
  • Avatar-Upload auf der Kontoseite, unter /api/uploads/avatar.
  • /api/files/*, das die Dateien ausliefert, die die App speichert.

Einrichten

Standardmäßig (STORAGE_DRIVER=local) landen Uploads in apps/web/.storage/, und die App liefert sie aus. Das funktioniert auf einem Server mit Festplatte, nicht auf Vercel.

  • S3-kompatibler Speicher: Setze STORAGE_DRIVER=s3, dann S3_ENDPOINT, S3_REGION, S3_BUCKET, S3_ACCESS_KEY_ID und S3_SECRET_ACCESS_KEY. Mit einem öffentlichen Bucket oder einem CDN setzt du STORAGE_PUBLIC_URL auf dessen Basis-URL.
  • Vercel Blob: Lege im Vercel-Projekt einen Blob-Store an, dann setze STORAGE_DRIVER=vercel-blob und BLOB_READ_WRITE_TOKEN.

Die CLI fragt, wo Dateien in Produktion landen (--files-driver local, s3 oder vercel-blob), und behält nur die Abhängigkeiten dieses Treibers.

Vor dem Livegang

  • Produktion nutzt s3 oder vercel-blob: local verliert bei jedem Deploy auf einem Serverless-Host die Dateien.
  • Der öffentliche Zugriff und CORS des Buckets passen zu STORAGE_PUBLIC_URL.

Weglassen oder später hinzufügen

Lass files in --modules weg, um ohne Uploads zu starten. Um sie zu einem bestehenden Projekt hinzuzufügen, bitte deinen Agent, den Skill add-module zu nutzen.

Starte einen Befehl. Die CLI fragt den Rest, und dein Agent macht von dort aus weiter.

pnpm create turbinekit my-app
Prompt ansehen

Füge ihn in einen Agent ein, der Befehle ausführen kann, etwa Claude Code, Codex oder Cursor. Der Prompt ist auf Englisch.

Create a new TurbineKit project with me.
Talk to me in German.

TurbineKit (https://turbinekit.dev) is an open-source Turborepo and Next.js starter. Its CLI, create-turbinekit, needs Node.js 24 and pnpm 10 (run `corepack enable` once).

1. Run `pnpm dlx create-turbinekit --help` to see its options.
2. Ask me its questions one at a time, with their defaults: the folder, the product name, one sentence about the product, the company or legal name, the contact email, the languages and the modules. Skip what I have already told you.
3. The CLI only asks questions in an interactive terminal, so run it with my answers as options and `--yes`. Show me the command before you run it.
4. In the new folder, read AGENTS.md. Then do "1. Minimal setup" in SETUP.md, and tick each box you finish.
5. Tell me the URL of the running app, and which services SETUP.md lists next.

Keine Anmeldung, keine API-Keys. Braucht Node.js 24 und pnpm 10.