Giter VIP home page Giter VIP logo

basegym's Introduction

Welcome to Base Gym

Quick Links

Getting Started Guide

Users API


Get Started

Installation

Clone from GitHub

cd into /functions

run npm install

Run the server

Run npm run serve

You may have to install firebase-tools globally to get serve to work npm install -g firebase-tools


Users API

See the Postman Documentation

Because this is a personal project using GCP and Firebase, the URL's will not be made public as to not incure unnecessary costs. API documentation is purely for demonstration purposes

Create Email User

Endpoint: POST /users-createEmailUser

Example body:

{
    "email": "[email protected]",
    "password": "test12"
}

Example response:

{
    "message": "Successfully created email user",
    "user": {
        "uid": "yOQm...",
        "email": "[email protected]",
        "emailVerified": false,
        "isAnonymous": false,
        "providerData": [
            {
                "providerId": "password",
                "uid": "[email protected]",
                "displayName": null,
                "email": "[email protected]",
                "phoneNumber": null,
                "photoURL": null
            }
        ],
        "stsTokenManager": {
            "refreshToken": "AIwUaOkU...",
            "accessToken": "eyJhbGciO...",
            "expirationTime": 1656804060344
        },
        "createdAt": "1656800460165",
        "lastLoginAt": "1656800460165",
        "apiKey": "AI...",
        "appName": "[DEFAULT]"
    }
}

Login Email User

Endpoint: POST /users-signInEmailUser

Example body:

{
    "email": "[email protected]",
    "password": "test12"
}

Example response:

{
    "message": "Successfully created email user",
    "user": {
        "uid": "yOQm...",
        "email": "[email protected]",
        "emailVerified": false,
        "isAnonymous": false,
        "providerData": [
            {
                "providerId": "password",
                "uid": "[email protected]",
                "displayName": null,
                "email": "[email protected]",
                "phoneNumber": null,
                "photoURL": null
            }
        ],
        "stsTokenManager": {
            "refreshToken": "AIwUaOkU...",
            "accessToken": "eyJhbGciO...",
            "expirationTime": 1656804060344
        },
        "createdAt": "1656800460165",
        "lastLoginAt": "1656800460165",
        "apiKey": "AIza...",
        "appName": "[DEFAULT]"
    }
}

Signout User

Endpoint: GET /users-signoutUser

Example response:

{
    "message": "Successfully signed out"
}

basegym's People

Contributors

tygedavis avatar

Watchers

James Cloos avatar  avatar

basegym's Issues

Edit User Information

Users should have the ability to edit their info in the event that they made a mistake.

Notifications for invalid username or password

Currently there is no indication as to what is wrong with my username or password if I don't meet the validations. As a user, I would like to know what to fix in either field if I don't meet all of the requirements.

Potential Fixes:

  • Use built in React Native Alert() call (not preferred)
  • Build custom notification that will indicate errors (probably preferred)
  • Find a 3rd party that will do it for you (Mostly preferred)

Get User Data endpoint does not actually get user data

Firebase documentation says that using the onAuthStateChanged method should get the Information of the current user and return it. Right now it is returning null and so our user is apparently never logged in.

Remember to use the user login endpoint before trying the get user info endpoint.

Integrate GCP Secrets Manager

Currently secrets are being stored locally in a .env file. Ideally, these secrets would be stored securely in the cloud so that individual contributors can use those secrets without having explicit access to them.

The API has been enabled in GCP for secrets manager, all that's left is to connect it to the app.

Home Screen

A main Home Screen. Should have the following:

  • Next Workout Section
  • Calendar (showing which days you've worked out)
  • Navigation bar (Home, Workouts, Achievements, ...)
  • Profile (just a link to view your profile, like a profile picture)

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.