π₯³ 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
projectIdand your Authuid(when you created yourself as user)
git clone https://github.com/shelf-cms/shelf-slim-backend.gitnpm install -g firebase-toolscd into the repo directory
firebase loginOpen .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,storagefirebase emulators:start --only functionsIf, you are ready to deploy the functions
firebase deploy --only functions- Login to SHELF
- Settings > Update
Backend URLwith 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.jswith your own:STORE_NAMESTORE_WEBSITEYOUR_MAILSEND_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/gatewaysfolder 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
