This repository contains the API server, primarily for communicating with Firebase. It's a single Node.js file, index.mjs that runs a Polka server which sends data to Firebase.
The following environment variables are required.
Firebase:
FIREBASE_DATABASE_URLis the full Firebase database URLFIREBASE_SERVICE_ACCOUNTis the service account key in JSON
Authentication:
TWT_SECRETis the secret used to sign TWTsJWT_SECRETis the secret used to sign JWTsROOT_USERNAMEis the username for logging inROOT_PASSWORDis the hashed password for logging in
AWS-managed ElasticSearch:
AWS_ELASTIC_HOSTis the endpointAWS_ACCESS_KEY_IDis the AWS access keyAWS_SECRET_ACCESS_KEYis the AWS secret keyAWS_REGIONis the AWS region
Sales:
PIPEDRIVE_API_KEYis the Pipedrive CRM API keySLACK_BOT_ACCESS_TOKENis the access token of the Slack bot
Locally, these environment variables are loaded from a .env. This repository also uses GitHub Actions CI/CD and triggers an endpoint for deployment from the master branch. Optionally, you may add the required environment variables as repository secrets (see Creating and storing encrypted secrets).
An open source project by Koj.
Furnish your home in style, for as low as CHF175/month →