A file uploader web app built with SvelteKit, Prisma, and Amazon S3-compatible storage.
This repository contains a small SvelteKit application that allows uploading, storing, and viewing files with metadata persisted via Prisma (Postgres/SQLite) and file contents stored in S3.
Key technologies
Quick start
Copy .env.example to .env and fill in the values for your environment (database URL, S3 credentials, etc.).
cp .env.example .env
Then edit .env and provide:
.env.exampleThis project includes a docker-compose.yml that can start the app and common dependencies (database, MinIO, etc.).
Build and start services:
docker-compose up --build
Stop and remove containers:
docker-compose down
Notes:
docker-compose logs -f to follow logs for troubleshooting.Install dependencies and run database migrations and code generation locally using pnpm:
pnpm i
pnpx prisma migrate dev
pnpx prisma generate
pnpm run dev -- --open
pnpm i installs dependencies.pnpx prisma migrate dev runs Prisma migrations and creates the database schema.pnpx prisma generate generates the Prisma client.pnpm run dev -- --open starts the dev server and opens the app in your browser.Development notes
prisma/.src/generated/prisma/client.ts .FileUploader helper in
src/lib/server/FileUploader.ts.src/lib/helpers.Environment / Deployment tips
pnpm build and then the appropriate
adapter start command).Troubleshooting
.env or wrong values: the app will fail to connect to the database or S3. Double-check .env and the logs.pnpx prisma migrate dev again and pnpx prisma generate.