pebble-dev / rebblestore-api

Rebble Store api code.
MIT License
39 stars 8 forks source link
api database golang pebble rebblestore

Repo archived

Moved to python implementation: https://github.com/pebble-dev/rebble-appstore-api

Rebble Store for pebble Backend/API

The Rebble Store is a Pebble Appstore replacement. If you want to contribute join us on the Pebble Dev Discord server, then head to #appstore.

Requirements

Backend/API layer requires git, go, npm, and apib2swagger.

To make the backend do anything, you also need to download a copy of the Pebble App Store. You can already start downloading it here while you setup the development environment.

Dev Environment Setup

Pull down the project within your $GOPATH's src folder ($GOPATH is an environment variable and is typically set to $HOME/go/ on *nix). This can be done by running (for example) the following set of commands:

# export GOPATH=~/go/ # Optional if your didn't move your ~/go directory
mkdir -p $GOPATH/src/pebble-dev
git clone https://github.com/pebble-dev/rebblestore-api.git $GOPATH/src/pebble-dev/rebblestore-api

Build Process

Backend

  1. If you haven't already, you will need to run go get -v . within the project directory;
  2. Run either make to build everything, or go build -v . to just build the go executable;
  3. You can run the api with ./rebblestore-api, or run the tests with ./rebblestore-api-tests.

Database

Instructions to setup the database:

  1. If you haven't already, download a copy of the Pebble App Store by using this tool. To ease the load on fitbit's servers, you can download it directly here;
  2. Extract the PebbleAppStore folder to the project directory: tar -xzf PebbleAppStore.tar.gz -C $GOPATH/src/pebble-dev/rebblestore-api;
  3. Start ./rebblestore-api and access http://localhost:8080/admin/rebuild/db to rebuild the database.

Contributing

How Do I Help?

Everyone is welcome to help. Efforts are coordinated in the issues tab, and in the Discord Server in the channel #appstore.

If this is your first time contributing to an Open-Source project, you can read this article to familiarize yourself with the process.

Please format your code with go fmt and run go test before committing your changes. Some editor plugins (such as vim-go) should be able to do this automatically before save.

Code Structure