Get free $100 credits on DigitalOcean:
Join our Discord:
Everything you need to build a SvelteKit project powered with Appwrite backend, starter powered by Increasio.
We'll update this starter template once we fix issue with installing metawrite
package using npm install metawrite
. But with this template it's easy to get latest version of our metawrite
package because we still use npm.
Before developing install the metawrite
package.
npm run metawrite
package
folder or use another output directory for svelte-kit package
.package
folder from .gitignore
file and run npm run metawrite
before commiting or deployment.Once you've installed Metawrite with npm run metawrite
and installed other dependencies with npm install
(or pnpm
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
If you need build command:
docker-compose up --build
This is a good option for deployment, because starter template has all required configs to automatically install newest version of metawrite
, all dependencies and start SSR server using Node.
You can add this template to your Appwrite Server configuration by pasting following on top of your Appwrite's docker-compose.yml
services:
services:
frontend:
image: koodeau/sveltekit-metawrite
container_name: frontend
restart: unless-stopped
env_file: .env
environment:
VITE_SITE_URL: ${VITE_SITE_URL}
VITE_ENDPOINT_URL: ${VITE_ENDPOINT_URL}
VITE_PROJECT_ID: ${VITE_PROJECT_ID}
VITE_LOCALE: ${VITE_LOCALE}
# Add more env variables here
volumes:
- ./app:/srv/frontend
ports:
- "3000:3000"
And add following to your Appwrite's .env
file:
VITE_SITE_URL=localhost
VITE_ENDPOINT_URL=http://localhost/v1
VITE_PROJECT_ID=example
VITE_LOCALE=en
Don't forget to change values to match your server configuration.
To deploy your app if you're not using Docker, you may need to install another adapter for your target environment.