Git Product home page Git Product logo

firebase-monorepo-template's Introduction

firebase monorepo template

日本語はこちら

This is a template repository that shares entities with firebase web/cloud functions and also allows unit tests to be shared.

See here for the explanation in the article

The following functions are prepared as templates.

  • Entity sharing using yarn workspace
  • firestore/security-rule, template implementation of unittest of cloud functions
  • Automatic deployment when develop/main merge is done
  • Automatic generation of hosting URL for preview when PR is submitted

package description

packages contains the following packages for each role.

common

Place entities and other items that you want to use commonly in all projects. User entity is placed as a template.

common-test

Place common processes to be used for testing.

functions

Place cloud functions.

web

Place web project. Only the bare typescript is placed so that it can be placed in both react and vue. Also, the security rule test is placed here.

How to install

Copy the template by clicking the "Use this template" button at the top of the repository.

After copying the template, replace the following words throughout the project.

s/virapture\/firebase-monorepo-template/your-account\/your-repository-name/g
s/firebase-monorepo-template/your-repository-name/g

Replace the firebase project id with your own.

s/fir-monorepo-template-dev/your-firebase-dev-project-id/g
s/fir-monorepo-template-prd/your-firebase-prod-project-id/g

Set up github secrets so that you can run the CD. [github secrets setting page](. /settings/secrets/actions)

The two secret names are GOOGLE_APPLICATION_CREDENTIALS_DEV and GOOGLE_APPLICATION_CREDENTIALS_PROD. The values can be found here to create a service account for deployment. Set the contents of the downloaded JSON file as is. Prepare for the dev environment and the production environment respectively.

cloud functions setup

Catch errors in cloud functions and send them to sentry. Set the DSN value for sentry with the following command.

firebase functions:secrets:set SENTRY_DSN

web setup

web is initialized using files in the env directory. Since the files dev.env / prod.env are prepared, enter the values of firebase on the client side for each environment.

Translated with www.DeepL.com/Translator (free version)

firebase-monorepo-template's People

Contributors

mogmet avatar inoue2002 avatar

Stargazers

serinuntius avatar  avatar remew avatar andmohiko avatar  avatar  avatar frankfanslc avatar mono — Masayuki Ono avatar

Forkers

inoue2002

firebase-monorepo-template's Issues

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.