Giter Club home page Giter Club logo

shelf-slim-backend's Introduction

Shelf Slim Backend

๐Ÿฅณ SHELF turns your Firebase project into a HEADLESS CMS

What is this ?

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)

I want it, how to use it ?

Clone this repository and follow instructions

Instructions

1. Create Firebase project

Simply, follow our guide HERE ๐Ÿ“–

Write projectId and your Auth uid (when you created yourself as user)

2. Clone this repository

git clone https://github.com/shelf-cms/shelf-slim-backend.git

3. Install firebase CLI globally

npm install -g firebase-tools

4. Kick some things

cd into the repo directory

firebase login

5. Edit .firebaserc

Open .firebaserc and paste your projectId into YOUR_PROJECT_ID_HERE

6. Edit firestore.rules

Open firestore.rules and paste your uid into YOUR_UID_HERE

7. Edit storage.rules (Optional, if you prefer other storage services)

Open storage.rules and paste your uid into YOUR_UID_HERE

8. Deploy Firestore rules and indexes and storage rules

firebase deploy --only firestore,storage

9. Tinker with functions before deploy

firebase emulators:start --only functions

If, you are ready to deploy the functions

firebase deploy --only functions

10. Update your backend @ shelf

  • 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)

11. Tinker with the backend

๐Ÿ’ก 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 ๐Ÿ“–

๐Ÿ‘‹ Contribution Guide

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

shelf-slim-backend's People

Contributors

hendrixstring avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.