All Projects → babichjacob → Sapper Firebase Typescript Graphql Tailwindcss Actions Template

babichjacob / Sapper Firebase Typescript Graphql Tailwindcss Actions Template

Licence: mit
A template that includes Sapper for Svelte, Firebase functions and hosting, TypeScript and TypeGraphQL, Tailwind CSS, ESLint, and automatic building and deployment with GitHub Actions

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Sapper Firebase Typescript Graphql Tailwindcss Actions Template

Sapper Typescript Graphql Template
A template that includes Sapper for Svelte, TypeScript preprocessing, and a GraphQL server through TypeGraphQL
Stars: ✭ 84 (-24.32%)
Mutual labels:  graphql, apollo-server, eslint, svelte
sapper-postcss-template
A template that includes Sapper for Svelte and PostCSS preprocessing with Tailwind CSS
Stars: ✭ 84 (-24.32%)
Mutual labels:  postcss, eslint, svelte, tailwindcss
Sapper Template Firebase
Starter Rollup template for Sapper apps with Firebase functions based on https://github.com/nhristov/sapper-template-rollup.
Stars: ✭ 29 (-73.87%)
Mutual labels:  firebase, tailwindcss, svelte, postcss
Kit
ReactQL starter kit (use the CLI)
Stars: ✭ 232 (+109.01%)
Mutual labels:  graphql, eslint, postcss
sapper-template-rollup
Starter Rollup template for Sapper apps using postcss, cssnano, tailwindcss, and svelte-preprocess.
Stars: ✭ 32 (-71.17%)
Mutual labels:  postcss, svelte, tailwindcss
Firestore Apollo Graphql
An example of a GraphQL setup with a Firebase Firestore backend. Uses Apollo Engine/Server 2.0 and deployed to Google App Engine.
Stars: ✭ 371 (+234.23%)
Mutual labels:  graphql, apollo-server, firebase
Firebase Gcp Examples
🔥 Firebase app architectures, languages, tools & some GCP things! React w Next.js, Svelte w Sapper, Cloud Functions, Cloud Run.
Stars: ✭ 470 (+323.42%)
Mutual labels:  graphql, firebase, svelte
Apollo Server Vercel
⚫ Production-ready Node.js GraphQL server for Vercel Serverless Functions
Stars: ✭ 69 (-37.84%)
Mutual labels:  graphql, apollo-server
Type Graphql Dataloader
TypeGraphQL + DataLoader + TypeORM made easy
Stars: ✭ 73 (-34.23%)
Mutual labels:  graphql, apollo-server
Pingcrm Svelte
🦊 Ping CRM Svelte - A demo app to illustrate how Inertia.js works with Laravel and Svelte (hosted on a heroku free dyno).
Stars: ✭ 74 (-33.33%)
Mutual labels:  tailwindcss, svelte
Firegraph
GraphQL Superpowers for Google Cloud Firestore
Stars: ✭ 80 (-27.93%)
Mutual labels:  graphql, firebase
Bathe
The simplest WordPress starter theme including full setup for Sass, PostCSS, Autoprefixer, stylelint, Webpack, Eslint, imagemin, Browsersync, etc.
Stars: ✭ 65 (-41.44%)
Mutual labels:  eslint, postcss
Astexplorer.app
https://astexplorer.net with ES Modules support and Hot Reloading
Stars: ✭ 65 (-41.44%)
Mutual labels:  eslint, postcss
React Hipstaplate
A ReactJS full-stack boilerplate based on typescript with ssr, custom apollo-server and huge stack of modern utilities which will help you to start your own project
Stars: ✭ 74 (-33.33%)
Mutual labels:  graphql, apollo-server
Next React Graphql Apollo boostrap
React + GraphQL + Next.js project architecture that I play with right now
Stars: ✭ 59 (-46.85%)
Mutual labels:  graphql, eslint
Graphql Api Gateway
An open-sourced example of a GraphQL API Gateway. This service queries and joins data across different back-ends into one GraphQL schema.
Stars: ✭ 57 (-48.65%)
Mutual labels:  graphql, apollo-server
Postcss Elm Tailwind
put some tailwind in your elm
Stars: ✭ 80 (-27.93%)
Mutual labels:  tailwindcss, postcss
Laqul
A complete starter kit that allows you create amazing apps that look native thanks to the Quasar Framework. Powered by an API developed in Laravel Framework using the easy GraphQL queries language. And ready to use the Google Firebase features.
Stars: ✭ 110 (-0.9%)
Mutual labels:  graphql, firebase
Sapper Graphql Firebase
Svelte + Sapper + GraphQL + Firebase Auth
Stars: ✭ 88 (-20.72%)
Mutual labels:  graphql, svelte
Minna Ui
😸 A fast, friendly, and fun web UI kit for everyone.
Stars: ✭ 86 (-22.52%)
Mutual labels:  svelte, postcss

🌐 Opinionated Sapper project base

❓ What is this?

The site that builds from this repository can be found here.

This is an extremely opinionated Sapper project base intended for my own use. That being said, there is quite a bit of work put into it to make it generalized and adaptable to your own setup, given that you want to use most of these things. The lower something is on this list, the easier it is to reconfigure or remove:

This template comes from combining two of my smaller ones: one for Tailwind CSS (PostCSS), and another for TypeScript and GraphQL. If this is too much for you, check out one of those!

🧭 Project Status

This project base will continue to be maintained until SvelteKit is ready.

Once you are prepared to migrate, check out the Svelte Adders project for information about how to recreate this project base's functionality. You should specifically look at svelte-add-firebase-hosting, svelte-add-tailwindcss, and svelte-add-graphql. Beware that svelte-add-graphql is not compatible with svelte-add-firebase-hosting yet.

Read on to use this project base today:

📋 Copy

Choose either to clone or fork depending on your preference.

🐑 Clone

git clone https://github.com/babichjacob/sapper-firebase-typescript-graphql-tailwindcss-actions-template

🍴 Fork

Click the Use this template button on this project's GitHub page.

⬇️ Install Dependencies

You need to be using version 14.15 or higher of Node; the package.json engines field only specifies 10 for Cloud Functions for Firebase.

cd sapper-firebase-typescript-graphql-tailwindcss-actions-template
npm install  # pnpm also works

🛠 Usage

🧪 Development

npm run dev

🔥 Deployment to Firebase

This will create a production build for you before deploying.

npm run deploy

🔨 Testing Production Builds Locally

This probably pairs well with Firebase Emulators.

npm run prod
npm run start

📦 Deploying a Static Site to Firebase Hosting

Cloud Functions for Firebase requires billing set up with the Blaze Plan, but you can stay on the Spark Plan for a free and fast (no cold starts!) static site:

npm run deploy:export

This will create an exported build for you before deploying.

If your project is transitioning from SSR to a static site, be sure to delete the residual ssr Cloud Function:

npm run firebase functions:delete ssr

You will also need to remove rewrites from firebase.json.

⚙ Configuration

🔥 Firebase and 🐙 GitHub Actions

The least you should need to do to get started is to edit .firebaserc, changing the project ID to your project (initialized in the Firebase console) ID.

For automatic building and deployment to work, you need to generate a CI login token from Firebase:

npm run firebase login:ci

Then, go to your repository's Settings > Secrets. Copy the result of the command above and save it as a Secret named FIREBASE_TOKEN.

You can test if it's working by making a commit to main or master and checking the Actions tab of your repository to see if your project successfully builds and deploys to Firebase.

⚡ Web app

Many of the fields in static/manifest.json (short_name, name, description, categories, theme_color, and background_color) are filled with demonstrative values that won't match your site. Similarly, you've got to take new screenshots to replace the included static/screenshot-1.png and static/screenshot-2.png files. If you want, you can add app shortcut definitions for "add to home screen" on Android. Once you change theme_color, update the meta name="theme-color" tag in src/template.html to match.

The Apple touch icon, favicon, and logo- files (also all in the static directory) are created by placing the logo within a "safe area" centered circle that takes up 80% of the canvas's dimension. For instance, the constraining circle in logo-512.png is 512 × 0.80 = 409.6 ≈ 410 pixels wide and tall.

🗺 Source maps

This project base comes with source maps enabled during development and disabled during production for the best compromise between performance and developer experience. You can change this behavior through the sourcemap variable in rollup.config.js.

💨 Optionally removing Tailwind CSS (and PurgeCSS)

  1. Remove all Tailwind imports in the src/global.pcss file
  2. Remove these lines in postcss.config.js:
    1. const tailwindcss = require("tailwindcss");
      
    2. const tailwindcssConfig = require("./tailwind.config");
      
    3. tailwindcss(tailwindcssConfig),
      
  3. Delete the tailwind.config.js file
  4. Uninstall the tailwindcss package

🕸 Optionally removing the GraphQL server

  1. Remove these lines in src/server.ts:

    1. import { createApolloServer } from "./graphql";
      
    2. const apolloServer = await createApolloServer();
      
    3. apolloServer.applyMiddleware({ app, path: graphqlPath });
      
  2. Remove the now-useless graphqlPath parameter to createSapperAndApolloServer in src/server.ts. This is also a good opportunity to rename the function since there is no longer an Apollo Server; if you do rename it, then also update the reference in /index.js or your Cloud Functions will still be referring to the old (now non-existent) function

  3. Delete the src/graphql folder

  4. Uninstall the apollo-server-express, bufferutil, class-validator, graphql, reflect-metadata, type-graphql, and utf-8-validate packages

  5. Remove the now-error-causing

    - name: "Delete the Unexportable GraphQL Page"
      run: "rm __sapper__/export/graphql"
    

    task in .github/workflows/build-and-deploy.yml

😵 Help! I have a question

Create an issue and I'll try to help.

😡 Fix! There is something that needs improvement

Create an issue or pull request and I'll try to fix.

I'm sorry, because of my skill level and the fragility of (the combination of) some of these tools, there are likely to be problems in this project. Thank you for bringing them to my attention or fixing them for me.

📄 License

MIT


This README was generated with ❤️ by readme-md-generator

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].