Mighty Minds SDK
Mighty minds is a crowd-funding platform designed to help students. This is the Javascript SDK for developing mightyminds app.
Installation and Usage
$ cd <project-directory>
$ yarn add fireabse @mightyminds/sdk
import sdk from '@mightyminds/sdk';
// initialize the sdk
const firebaseConfig = {
apiKey: 'some-api-key',
databaseURL: 'some-database-url',
// ...other configs
};
sdk.initilize({ firebaseConfig });
// observe the current user
sdk.auth().currentUser$(console.log);
// signin
sdk.auth().signin('emailandpassword', { email: 'my@email.com', password: 'some-passwrd' })
Services
- accounts -
sdk.accounts()
- auth -
sdk.auth()
- beneficiaries -
sdk.beneficiaries()
- core -
sdk.core()
- fundings -
sdk.fundings()
- timelines -
sdk.timelines()
see docs for more info
Related npm modules
-
@mightyminds/sdk-vue
- vue-plugin implemented sdk that integrates well with vuex (store/state-persistence) and vue-router (guards)
$ cd <project-directory>>
$ yarn add vue vuex vue-router firebase @mightyminds/{sdk,sdk-vue}
import Vue from 'vue';
import Vuex from 'vuex';
import VueRouter from 'vue-router';
import Sdk from '@mightyminds/sdk-vue';
const store = new Vuex();
const router = new VueRouter();
Vue.use(Sdk, { store, router })