Back to templates

Template details

Background Remover

SvelteKit boilerplate using Appwrite and Azure AI to remove image backgrounds, with auth and image history.

About this template

Background Remover is an open-source SvelteKit boilerplate that uses Appwrite Cloud for authentication, storage, and database, and Azure AI Vision to remove backgrounds from headshots and other images.

What is Background Remover?

Background Remover is a SvelteKit application that accepts an uploaded image, sends it to Azure AI Vision's background removal endpoint, and returns a background-free version saved to Appwrite Cloud storage. The project was created by adityaoberai and is published on GitHub with 21 stars. It is configured for deployment on Vercel via the SvelteKit adapter, with instructions to switch to other platforms like Cloudflare or Azure.

The app uses Appwrite for user accounts (email registration and guest login), a database collection with userId and fileId attributes to associate saved images with users, and two Appwrite storage buckets — one for input images that are deleted after processing and one for output images that persist for logged-in users. As of the README, the project is not functional because the Azure Background Removal API has been deprecated, so the live site at bgremover.in may not be processing images.

Key Features

  • Azure AI Vision background removal — Each uploaded file is sent to the Azure Computer Vision endpoint configured in the environment; the processed output is stored in the output bucket.
  • Email or guest authentication — Users can register with an email address or enter as a guest; only registered users get persistent image history.
  • Profile image library — Logged-in users can view and share links to previously processed pictures.
  • Appwrite Cloud integration — The template wires up Appwrite Auth, Database, Storage, and Functions, including a Delete Account function that cleans up user data.
  • SvelteKit with Melt UI — The UI is built with SvelteKit and uses the Melt UI preprocessor for accessible components.
  • Vercel-ready configuration — The default svelte.config.js targets the Vercel adapter and sets a custom timeout for server actions; instructions are provided for swapping in adapter-auto for other hosters.
  • Environment-driven setup — Ten environment variables control the Appwrite project, buckets, collection, function ID, and Azure credentials, so the same codebase deploys to different projects by changing one .env file.

Who is it for?

  • SvelteKit developers who want a working reference for integrating Appwrite Auth, Storage, and Databases with server actions and external AI APIs.
  • Self-hosting enthusiasts who want to run their own background-removal service with full control over user data and storage.
  • Portfolio projects for job seekers — the app is a complete, deployable example of a SaaS-style image tool that can be demonstrated in interviews.

What can you do with it?

  • Job seekers: Upload a casual photo to produce a clean, neutral-background headshot for resumes, LinkedIn, and job applications.
  • E-commerce sellers: Strip backgrounds from product photos to create consistent, white-background catalog images.
  • Content creators: Quickly generate transparent-background portraits for thumbnails, memes, or video overlays without using a desktop editor.

How does it work?

The flow is: a user uploads an image through the SvelteKit frontend, the file is stored in the "input" Appwrite bucket, a server action sends it to the Azure AI Vision background removal endpoint, the output is written to the "output" bucket, and for registered users the output file ID is saved in the database. The README walks through creating the Azure Computer Vision resource, setting up two Appwrite buckets, defining the database collection, and deploying the Delete Account function.

Setup and deployment

The repository includes a .env.example file listing every required variable. For Vercel, no adapter changes are needed; for other PaaS platforms, install @sveltejs/adapter-auto and replace svelte.config.js with the provided snippet. The Delete Account function lives on the appwrite-functions Git branch and is deployed via Appwrite's CLI.

FAQ

Is Background Remover still working?

The README explicitly warns: "The project is currently not functional as the Azure Background Removal API has been deprecated." That means the background removal endpoint used by the app is no longer available, so the demo and any deployments that depend on it will fail at the Azure call.

Do I need an Azure account to deploy this?

Yes. You must create an Azure Computer Vision resource (from the Azure Marketplace) and provide its endpoint and API key as the SECRET_VISION_ENDPOINT and SECRET_VISION_KEY environment variables.

Can I use the app without registering?

Yes, the app allows guest login. Guests can process images, but the result is not saved to a profile and no shareable link is generated; those features require email registration.

What is the Appwrite data model?

The database has a single collection with two required string attributes: userId (length 255) and fileId (length 255). The collection and both storage buckets must have the exact permissions shown in the README's screenshots for the app to function.

screenshot of Background Remover on template0.com