🥳 SHELF turns your Firebase project into a HEADLESS CMS
This repository is a complementary simple backend for achieving extra capabilities with SHELF
under 170kb:
- Creating Checkouts from Web or Mobile
- Capture / Void / Refund Payments 💳 (Currently PayPal, but more are coming and you can add your own)
- Marketing emails (User signup, Payments)
Clone this repository and follow instructions
Simply, follow our guide HERE 📖
Write
projectId
and your Authuid
(when you created yourself as user)
git clone https://github.com/shelf-cms/shelf-slim-backend.git
npm install -g firebase-tools
cd into the repo directory
firebase login
Open .firebaserc
and paste your projectId
into YOUR_PROJECT_ID_HERE
Open firestore.rules
and paste your uid
into YOUR_UID_HERE
Open storage.rules
and paste your uid
into YOUR_UID_HERE
firebase deploy --only firestore,storage
firebase emulators:start --only functions
If, you are ready to deploy the functions
firebase deploy --only functions
- Login to SHELF
- Settings > Update
Backend URL
with your local or production url.
💡 For local dev, make sure your browser does not block requests to localhost (Brave browser does it and it can be disabled)
💡 Few suggestions:
- Edit
functions/src/actions/send-mail.js
with your own:STORE_NAME
STORE_WEBSITE
YOUR_MAIL
SEND_GRID_SECRET
(Be sure to open an account with sendgrid)
- Modify the logic of events at
functions/index.js
- Add a new payment gateway by inspecting
functions/gateways
folder and reading The SHELF Gateways Docs 📖
Any contribution is welcome. Here are some, that will be cool to add:
- More Payment Gateways
- Automatic bootstrap script
- Better docs
- Anything you feel is an improvement
Also, feel free to fork and make it your own, for your own projects