dkmin / codingcat.dev

Home Page:https://codingcat.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodingCatDev

This is the main repo for https://codingcat.dev

Status

Dev

  • admin-dev.codingcat.dev
  • dev.codingcat.dev

Prod (Main)

  • admin.codingcat.dev
  • codingcat.dev

Setup

First install Learna Install Learn by running npm run install To install dependencies run npm run bootstrap

Firebase Backend

You must first setup a project in the firebase console. Then you will need to cd backend/firebase and add firebase by running firebase use --add and provide your new project.

There are several keys that you will need to set for your functions to work fully. You can add them by running firebase functions:config:set For example to set the cloudinary.api_secret you would run firebase functions:config:set cloudinary.api_secret=abcdefg

Validate this is setup correctly by running firebase functions:config:get you should get something like below when you are done

{
  "firestore_backup": {
    "bucket": ""
  },
  "algolia": {
    "search_key": "",
    "index": "",
    "app_id": "",
    "api_key": ""
  },
  "cloudinary": {
    "name": "",
    "api_key": "",
    "api_secret": ""
  }
}

You must obtain your private key information from https://console.firebase.google.com/u/0/project/[YOURPROJECT]/settings/serviceaccounts/adminsdk

Then you will add this to backend/firebase/serviceAccountKey.json. You can find an example template at backend/firebase/serviceAccountKey.json.template.

TODO: Build out sample test data

Firebase Emulator

In order to run locally you will need your config values, you can get those by running the following

Make sure you are in the backend/firebase/functions when running!

firebase functions:config:get > .runtimeconfig.json
# If using Windows PowerShell, replace the above with:
# firebase functions:config:get | ac .runtimeconfig.json
firebase functions:shell

Run Locally

Connect with vercel project TODO: Add logic for using console

You will need to setup a .env.local within any project that requires Firebase.

There are example files located at frontend/main/.env.local.template frontend/admin/.env.local.template

To run all repos in frontend you can run either

npm run dev for all the dev builds and live reload npm run start for all production builds (builds and runs local server)

lerna

About

https://codingcat.dev

License:Other


Languages

Language:TypeScript 88.8%Language:JavaScript 10.6%Language:Shell 0.4%Language:CSS 0.2%