Svelte Starter with Sapper, GraphQL and Firebase Auth.
- Svelte
- Sapper
- RxJS
- GraphQL via Hasura's graphql-engine
- Authentication via Firebase Auth
- Uses Service Worker to Cache GraphQL Request
- Install dependencies: run
yarn
in project root - For dev server: run
yarn dev
ornpm run dev
, from project root. The app should be running at: http://localhost:3000. - To build frontend run:
yarn build
ornpm run build
from project root. Runyarn start
ornpm start
to start app.
- Repo was set up using my personal Hasura and Firebase configurations which is not included. So some setup is required for this repo to work for you.
- You will need to edit the
.env
file to add your credentials - Add your Firebase config to `src/firebase/config.js
- You also need to update the graphql directory with your own queries and mutations
- To run/test in docker locally run
docker run -p 3000:3000 -it <IMAGE> sh
. e.g.docker run -p 3000:3000 -it gcr.io/your_project/your_service:54bxr7g9 sh
, then from inside image runnode __sapper__/build
. Now open browser tolocalhost:3000
- Uses Cloud Run
- To deploy on Cloud Run: run
yarn deploy
ornpm run deploy
,
- Move the
src/svql
directory into it's own repo and publish as a lightweight graphql client forsvelte
on npm - use firebase-admin
- Add TypeScript when supported