Giter VIP home page Giter VIP logo

sveltekit-appwrite's Introduction

Metawrite

Support Us

Get free $100 credits on DigitalOcean:

Join our Discord:

SvelteKit Metawrite Starter Template

Everything you need to build a SvelteKit project powered with Appwrite backend, starter powered by Increasio.

Important to mention

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

Keep in mind

  • If you have to package your own lib source the you can rename existing package folder or use another output directory for svelte-kit package.
  • Also, if you're not using Docker or any CI/CD, custom workflows for deployment, then consider removing package folder from .gitignore file and run npm run metawrite before commiting or deployment.

Developing

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

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

Building with Docker

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.

Appwrite and SvelteKit Combo

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.

sveltekit-appwrite's People

Contributors

koodeau avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.