rootCircle / codemark-cli

CLI app for Codemark for HOF v4.0
https://devfolio.co/projects/codemark-251c
Apache License 2.0
6 stars 5 forks source link

Create docs for setting up Firebase for Contributor #4

Closed rootCircle closed 9 months ago

rootCircle commented 9 months ago

Description

Create the docs for setting up firebase account and push in the dummy data present in Schemas/ folder. And also setting up the required secrets in codemark/secrets.py

Petsamuel commented 9 months ago

@rootCircle if this issue is available I would like to work on it

rootCircle commented 9 months ago

Sure @Petsamuel , go ahead! If you need any help, please ping me out in Issue Thread!

rootCircle commented 9 months ago

Here is the dummy file for codemark/secrets.py file that need to be put in! Data is dummy!

import os

dir_path = os.path.dirname(os.path.realpath(__file__))
SERVICEACCOUNTFILE = os.path.join(dir_path,"firebase", "res", "service-account-file.json")
api_key="sk-asjkdsakdasasdklldas" # OPENAI KEY
dbURL = "https://codemark-jdxknzklndkasnkldjkasljd.firebasedatabase.app/"
firebaseConfig = {
    "apiKey": "jfdskjlksdflskfkslfk-QEhUe_bI",
    "authDomain": "codemark-hfksjdfksdf.firebaseapp.com",
    'databaseURL': dbURL,
    "projectId": "codemark-6f33a",
    "storageBucket": "codemark-sdjfkjkflsd.appspot.com",
    "messagingSenderId": "jfdskfjdsk",
    "appId": "1:lkjsdfjsdjfklsj:web:hsdfkjkdlsjfklsdj",
    "serviceAccount": SERVICEACCOUNTFILE
}
STORAGE_BUCKET_URL = 'codemark-jkhsdkfjskdfjlksdjf.appspot.com'

# from web3.storage
web3storage_api_key = 'zxjkkcljzxkc.eyJzdWIiOiJkaWQ'
rootCircle commented 9 months ago

Forgot to mention but there in an extra required file in codemark/firebase/res/service-account.json

{
  "type": "service_account",
  "project_id": "codemark-6f33a",
  "private_key_id": "urwoqr9qiop",
  "private_key": "-----BEGIN PRIVATE KEY-----\nfjkasljflksajflk",
  "client_email": "jfahsjkfhkajfklajm.gserviceaccount.com",
  "client_id": "328798237",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/xxxxxxxxxx",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xxxxxxx"
}