Git Product home page Git Product logo

hello-nyxo / nyxo-app Goto Github PK

View Code? Open in Web Editor NEW
288.0 6.0 61.0 12.74 MB

The repository for Nyxo React Native app, a personal sleep tracker and sleep coach

Home Page: https://nyxo.app

License: GNU General Public License v3.0

JavaScript 1.50% TypeScript 92.03% Ruby 0.12% Starlark 0.09% Java 0.92% Objective-C 1.11% Swift 0.30% C 0.03% HTML 3.90%
react-native aws-amplify sleep-tracker sleep sleep-coaching redux react hacktoberfest

nyxo-app's Introduction

Nyxo App

Nyxo App – Better Sleep 💤💤💤

code style: prettier commit activity release license


Download iOSDownload AndroidContactNyxo Newsletter

What is Nyxo App

Nyxo is a mobile application for improving your sleep. Its built with React Native, AWS Amplify, styled-components, and Redux. Nyxo provides the following features:

  • Sleep tracking, with support for multiple different trackers
    • Google Fit
    • Apple Health
    • Oura
    • Withings
    • Fitbit
    • Polar
  • Sleep trends and sleep diary
  • Nyxo Cloud: backup your sleep data and coaching progress, and access it from nyxo.app
  • 4 week sleep coaching program
  • Ask experts, if you have any questions we have the professional sleep coaches to help
  • And more

The plan is to develop Nyxo further and allow contributions from everyone. If you want to for example build a new sleep visualization or add support for new sleep tracker, we will gladly welcome a pull request of that :)

Can I help?

Always!

If you like the app, go give it 5 stars and a review! It helps more people find the app, and makes the developer very happy 😊

If you know a language other than English, help us translate the app!

Getting started

Start by cloning repository and installing dependencies using yarn

git clone
cd nyxo-app
yarn

Link assets

react-native link

For iOS, install Cocoapods and run command

cd ios && pod install

Setting up the environment and services

App Center Set up Microsoft's Visual Studio App Center for event analytics & crash reports: https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/react-native

Sentry Set up Sentry for React Native by executing the command. More Sentry-related information can be found at: https://docs.sentry.io/platforms/react-native/

sentry-wizard

AWS-amplify

We use aws-amplify for our api and authentication. We will most likely simplify the process of setting up Amplify in fresh project at some point. At the moment the worfklow for getting everything to run is following:

  • Get AWS account
  • See the instructions for installing amplify-cli
  • Do the following setup

Setting up enviroment variables

Nyxo configurations keys are placed in config.ts file, which then references the requirement enviroment variables from local .envfile. Head to docs/env-structure.md file to learn more. The way the project is structured you should need to provide keys for all the services to make the app work.

//.env contents
REVENUE_CAT=YOUR_KEY
SENTRY_DSN=YOUR_KEY
CONTENTFUL_SPACE=YOUR_KEY
CONTENTFUL_ACCESS_TOKEN=YOUR_KEY
FITBIT_ID=YOUR_KEY
FITBIT_TOKEN_ENDPOINT=YOUR_KEY
FITBIT_REVOCATION_ENDPOINT=YOUR_KEY
WITHINGS_ID=YOUR_KEY
WITHINGS_TOKEN_ENDPOINT=YOUR_KEY
WITHINGS_REVOCATION_ENDPOINT=YOUR_KEY
OURA_ID=YOUR_KEY
OURA_TOKEN_ENDPOINT=YOUR_KEY
GOOGLE_FIT_URL_ANDROID=YOUR_KEY
GOOGLE_FIT_ID_ANDROID=YOUR_KEY
GOOGLE_FIT_ID_IOS=YOUR_KEY
GOOGLE_FIT_ID_IOS=YOUR_KEY
GARMIN_ID=YOUR_KEY
GARMIN_REQUEST_TOKEN_ENDPOINT=YOUR_KEY
GARMIN_ACCESS_TOKEN_ENDPOINT=YOUR_KEY
GARMIN_GET_SLEEP_ENDPOINT=YOUR_KEY
POLAR_ID=YOUR_KEY
POLAR_TOKEN_ENDPOINT=YOUR_KEY
LINK_CODE_URL=YOUR_KEY

After creating the .env file, run yarn rnuc .env to generate variable files.

Troubleshooting

main.jsbundle missing

Run command react-native bundle --entry-file index.js --platform ios --dev=false --bundle-output ios/main.jsbundle --assets-dest ios for iOS Run command react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ for Android

When you get a weird Xcode error about undefined symbols

If you see something like this:

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RCTReconnectingWebSocket", referenced from: objc-class-ref in libReact.a(RCTPackagerConnection.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Delete your Derived data

If you run into an Xcode build input file error

If you see a build error like this:

error: Build input file cannot be found: '/...path/Nyxo.app/PlugIns/NyxoTests.xctest/NyxoTests' (in target 'NyxoTests' from project 'Nyxo')

Switch your XCode Build System to Legacy Build System

Resetting bundlers etc.

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache.
  4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*.

nyxo-app's People

Contributors

eevasii avatar minhchinh97h avatar plahteenlahti avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nyxo-app's Issues

Cancelling linking sends unnecessary errors

Description

When user cancels linking with Google Fit or any other service and error message is sent to Sentry.

Steps to reproduce

Start linking with Google fit, but cancel it

Expected result

No error message should be sent

Actual result

Causes unnecessary errors

Build error

Hi,
I'm not able to run the app, I got the following error:
info Installing the app...

Welcome to Gradle 6.1.1!

Here are the highlights of this release:

  • Reusable dependency cache
  • Configurable compilation order between Groovy/Kotlin/Java/Scala
  • New sample projects in Gradle's documentation

For more details see https://docs.gradle.org/6.1.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • Where:
    Build file 'C:\MyData\Thor Apps\Aplicacions\React\nyxo\android\app\build.gradle' line: 8

  • What went wrong:
    A problem occurred evaluating project ':app'.

C:\MyData\Thor Apps\Aplicacions\React\nyxo\android\keystores\release.keystore.properties (El sistema no puede encontrar la ruta especificada)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    ==============================================================================

2: Task failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

compileSdkVersion is not specified. Please add it to build.gradle

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    ==============================================================================

  • Get more help at https://help.gradle.org

BUILD FAILED in 28s

Thanks for your job

Night quality tracking

This task is about creating a better mood tracking feature in Nyxo Mobile. Using the current feature I would like the new one to work this way:

Basic mood tracking up to 30 days

When the user is not registered they can mark rating for the last 30 days, using the current rating system. Changes required:

  • Show the rating under the day in top calendar strip with a small icon
  • Add night rating into the sleep trend chart
  • Add rating data to separate redux state

When the user has account

  • Can save for many days
  • Data is uploaded to the cloud

Many imports are missing. Not able to run app in my local.

Description

Some paths are wrong and i found some imports missing such as AWS amplify

Steps to reproduce

Clear steps describing how to reproduce the issue. Please please please link to a demo project if possible, this makes your issue much easier to diagnose (seriously).

Expected result

What should happen?

Actual result

What happened.

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.