├── .all-contributorsrc ├── .eslintignore ├── .eslintrc.js ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── documentation.md │ ├── feature_request.md │ └── question.md ├── PULL_REQUEST_TEMPLATE.md ├── scripts │ └── decrypt-team-provider.sh └── workflows │ ├── main.yml │ └── scheduled.yml ├── .gitignore ├── .gitmodules ├── .graphqlconfig.yml ├── .huskyrc ├── .lintstagedrc ├── .npmrc ├── .prettierignore ├── .prettierrc.js ├── @types ├── childImageSharp.ts ├── content │ └── meta.ts └── generated │ └── contentful.d.ts ├── LICENSE ├── README.md ├── amplify ├── .config │ └── project-config.json └── backend │ ├── api │ └── nyxoDev │ │ ├── parameters.json │ │ ├── pipelineFunctions │ │ ├── InvokeRequestCodeLambdaDataSource.req.vtl │ │ ├── InvokeRequestCodeLambdaDataSource.res.vtl │ │ ├── MutationCreateCoachingRequestFunction.req.vtl │ │ └── MutationCreateCoachingRequestFunction.res.vtl │ │ ├── schema.graphql │ │ └── transform.conf.json │ ├── auth │ └── nyxodev │ │ ├── nyxodev-cloudformation-template.yml │ │ └── parameters.json │ ├── backend-config.json │ └── function │ ├── createRequestCode │ ├── amplify.state │ ├── createRequestCode-cloudformation-template.json │ ├── function-parameters.json │ ├── parameters.json │ └── src │ │ ├── event.json │ │ ├── index.js │ │ ├── package-lock.json │ │ └── package.json │ ├── nyxoPoints │ ├── amplify.state │ ├── function-parameters.json │ ├── nyxoPoints-cloudformation-template.json │ ├── parameters.json │ └── src │ │ ├── event.json │ │ ├── index.js │ │ ├── package.json │ │ ├── parameters.json │ │ └── yarn.lock │ └── nyxoPreSignup │ ├── amplify.state │ ├── function-parameters.json │ ├── nyxoPreSignup-cloudformation-template.json │ ├── parameters.json │ └── src │ ├── email.html │ ├── event.json │ ├── index.js │ ├── package.json │ └── yarn.lock ├── content ├── blog │ ├── 6-tips-for-better-sleep │ │ ├── better-sleep.jpg │ │ └── index.md │ ├── can-sleep-debt-be-paid-off │ │ ├── credit-card.jpg │ │ └── index.md │ ├── checklist-for-releasing-apps │ │ ├── checklist.jpeg │ │ └── index.md │ ├── consistency-is-key-are-you-unknowingly-suffering-from-social-jet-lag │ │ ├── cover.jpg │ │ └── index.md │ ├── creating-a-clock-face-in-react-native-with-svg │ │ ├── 2-clocks.png │ │ ├── clock.png │ │ ├── clockmarkings.png │ │ ├── cover.jpg │ │ ├── cover.png │ │ └── index.md │ ├── deploy-gatsby-to-netlify │ │ ├── deploy-gatsby.png │ │ ├── index.md │ │ └── netlifyDashboard.png │ ├── estimating-the-sleep-wake-cycle-through-circadian-rhythm │ │ ├── index.md │ │ └── sunset.jpeg │ ├── fixing-virtualizedlists-should-never-be-nested-inside-plain-scrollviews │ │ ├── index.md │ │ └── warning.jpeg │ ├── gastby-netlify-amplify-part-2 │ │ ├── Amplify-part-2.png │ │ ├── auth_sceenshot.png │ │ └── index.md │ ├── gatsby-netlify-amplify-part-1 │ │ ├── Gatsby.png │ │ └── index.md │ ├── gatsby-netlify-amplify-part-3 │ │ ├── Contentful-Gatsby.jpg │ │ └── index.md │ ├── getting-high-and-getting-sleep │ │ ├── cannabis1.jpg │ │ ├── cannabis2.jpg │ │ └── index.md │ ├── heart-rate-variability-hrv-is-the-hype-justified │ │ ├── HRV1.0.png │ │ ├── applewatch2.jpg │ │ ├── hr-monitor.jpg │ │ └── index.md │ ├── how-to-use-publish │ │ ├── dev-cover.png │ │ └── index.md │ ├── how-to-use-sleep-for-your-success │ │ ├── index.md │ │ ├── mountain-winner.jpg │ │ ├── success.jpg │ │ └── woman-jogger.jpg │ ├── key-to-unlocking-creativity-sleep │ │ ├── creativity.jpeg │ │ └── index.md │ ├── miksi-uni-ei-virkista │ │ ├── cover.jpg │ │ └── index.md │ ├── nba-oura-ring │ │ ├── basketball-cover.jpg │ │ └── index.md │ ├── nyxo-kiuas-summer19 │ │ ├── index.md │ │ └── kiuas_summer.jpeg │ ├── nyxo-took-part-in-kiuas-start-accelerator │ │ ├── index.md │ │ └── kiuas_start.jpg │ ├── nyxo.app-is-now-open-source │ │ ├── index.md │ │ └── yosemite.jpg │ ├── short-sleep-can-lead-to-weight-gain │ │ ├── cover.jpeg │ │ └── index.md │ ├── sleep-tracker-buyers-guide-pt1 │ │ ├── activity-tracker1.jpg │ │ ├── index.md │ │ ├── polysomnography.jpg │ │ └── scoreboard.jpg │ ├── sleep-tracker-buyers-guide-pt2 │ │ ├── battery-low.jpg │ │ ├── index.md │ │ ├── sleeping-cat.jpg │ │ └── withings.jpg │ ├── statistical-queries-with-swift-and-healthkit │ │ ├── cover.jpeg │ │ ├── index.md │ │ ├── infolist.png │ │ ├── request.png │ │ ├── signing.png │ │ ├── singleviewapp.png │ │ ├── startproject.png │ │ └── theui.png │ ├── supporting-localizations-at-nyxo │ │ ├── cover.jpeg │ │ └── index.md │ ├── tips-for-using-typescript-with-styled-components │ │ ├── cover.jpeg │ │ ├── example.png │ │ ├── example2.png │ │ ├── example3.png │ │ └── index.md │ ├── towards-better-slumber-with-terveystalo-nyxo │ │ ├── cover.jpeg │ │ ├── index.md │ │ └── terveystalo-partnership.jpeg │ └── what-can-heart-rate-tell-about-your-sleep │ │ ├── applewatch.jpg │ │ ├── hr-u-shape.png │ │ └── index.md ├── data │ └── meta.json ├── pages │ └── for-you.json ├── privacy │ └── privacy.md └── terms │ └── terms.md ├── cypress.json ├── cypress ├── e2e │ └── smoke.js ├── fixtures │ └── example.json ├── plugins │ └── index.js └── support │ ├── commands.js │ └── index.js ├── functions └── submission-created.js ├── gatsby-browser.js ├── gatsby-config.js ├── gatsby-node.js ├── gatsby-ssr.js ├── graphql-types.ts ├── jest.config.js ├── lint-staged.config.js ├── loadershim.js ├── locales ├── de │ └── translation.json ├── en │ └── translation.json ├── es │ └── translation.json ├── fi │ └── translation.json ├── fr │ └── translation.json └── sv │ └── translation.json ├── netlify.toml ├── package.json ├── setup-test-env.ts ├── src ├── @hello-nyxo │ └── gatsby-theme-nyxo-coaching │ │ ├── components │ │ └── Layout │ │ │ └── Layout.tsx │ │ └── pages │ │ └── index.tsx ├── API.ts ├── Helpers │ ├── AsciiHelper.ts │ ├── AuthorHelper.ts │ ├── IconHelper.spec.tsx │ ├── IconHelper.ts │ ├── ViewCountHelper.ts │ ├── i18n-helpers.ts │ ├── related-content.tsx │ └── string-truncater.ts ├── __mocks__ │ ├── file-mock.ts │ └── gatsby.ts ├── auth │ └── AppUser.tsx ├── colors.ts ├── components │ ├── About │ │ └── PersonCard.tsx │ ├── Author │ │ ├── AuthorCard.tsx │ │ ├── AuthorCardLarge.tsx │ │ ├── AuthorFeaturette.tsx │ │ ├── AuthorList.tsx │ │ └── Publication.tsx │ ├── Blog │ │ └── TagFilter.tsx │ ├── BlogPost.tsx │ ├── BlogPreview.tsx │ ├── BookmarkButton │ │ ├── Bookmark.tsx │ │ └── BookmarkButtonSmall.tsx │ ├── ConsumerFeatures │ │ └── ConsumerFeature.tsx │ ├── FeatureGrid │ │ └── FeatureGrid.tsx │ ├── Featured │ │ └── Featured.tsx │ ├── Footer │ │ ├── Footer.tsx │ │ └── InstagramFeaturette.tsx │ ├── GetAppBanner │ │ ├── FloatingPrompt.tsx │ │ └── index.tsx │ ├── GetAppBig.tsx │ ├── Habit │ │ ├── HabitCard.spec.tsx │ │ ├── HabitCard.tsx │ │ ├── HabitHighlights.tsx │ │ └── __snapshots__ │ │ │ └── HabitCard.spec.tsx.snap │ ├── HabitLimited.tsx │ ├── Html │ │ └── HtmlContent.tsx │ ├── Icons.tsx │ ├── LessonHighlights │ │ └── LessonHighlights.tsx │ ├── LessonLimited.tsx │ ├── PageHeader.tsx │ ├── PricingCard │ │ └── PricingCard.tsx │ ├── PricingTable │ │ └── PricingTable.tsx │ ├── Primitives.tsx │ ├── SEO │ │ └── SEO.tsx │ ├── Sharing │ │ └── Sharing.tsx │ ├── SideDrawer │ │ ├── DrawerToggleButton.tsx │ │ └── SideDrawer.tsx │ ├── SideMenu │ │ └── SideMenu.tsx │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ ├── about.spec.tsx.snap │ │ │ ├── blog.spec.tsx.snap │ │ │ ├── footer.spec.tsx.snap │ │ │ ├── getTheApp.spec.tsx.snap │ │ │ ├── header.spec.tsx.snap │ │ │ ├── icons.tsx.snap │ │ │ ├── image.tsx.snap │ │ │ ├── layout.tsx.snap │ │ │ ├── lessons.tsx.snap │ │ │ ├── mobile.tsx.snap │ │ │ ├── pageHeader.tsx.snap │ │ │ ├── questionnaire.tsx.snap │ │ │ ├── seo.tsx.snap │ │ │ ├── sharePage.tsx.snap │ │ │ └── weekCard.tsx.snap │ │ ├── about.spec.tsx │ │ ├── blog.spec.tsx │ │ ├── footer.spec.tsx │ │ ├── getTheApp.spec.tsx │ │ ├── header.spec.tsx │ │ ├── icons.tsx │ │ ├── image.tsx │ │ ├── layout.tsx │ │ ├── lessons.tsx │ │ ├── mobile.tsx │ │ ├── pageHeader.tsx │ │ ├── questionnaire.tsx │ │ ├── seo.tsx │ │ ├── sharePage.tsx │ │ └── weekCard.tsx │ ├── charts │ │ ├── SleepChart.tsx │ │ └── SleepChart │ │ │ ├── XTicks.tsx │ │ │ └── YTicks.tsx │ ├── coaching │ │ └── CoachingCard.tsx │ ├── devices │ │ └── Device.tsx │ ├── header.tsx │ ├── image.tsx │ ├── layout.tsx │ ├── lesson │ │ ├── LargeLessonCard.tsx │ │ ├── LessonCard.tsx │ │ └── LessonsPreview.tsx │ ├── logo.tsx │ ├── mobileHeader.tsx │ ├── newsletter.tsx │ ├── page │ │ └── Header.tsx │ ├── questionaireCard.tsx │ ├── questionnaire │ │ └── Question.tsx │ ├── sharePage.tsx │ ├── tags │ │ └── Tags.tsx │ ├── user │ │ ├── Coaching.tsx │ │ ├── UserHabits.tsx │ │ └── UserInfo.tsx │ └── week │ │ ├── LargeWeekCard.tsx │ │ └── WeekCard.tsx ├── devices.ts ├── graphql │ ├── custom │ │ ├── nyxo-fragments.ts │ │ └── queries.ts │ ├── mutations.ts │ ├── queries.ts │ └── subscriptions.ts ├── hooks │ ├── bookmark-hooks.tsx │ ├── useCoaching.ts │ ├── useSleep.ts │ └── useUser.ts ├── index.d.ts ├── lib │ ├── create-pages.ts │ └── query-blog-posts.ts ├── pages │ ├── 404.tsx │ ├── about.tsx │ ├── author │ │ └── index.tsx │ ├── blog.tsx │ ├── coaching.tsx │ ├── contact.tsx │ ├── for-organizations.tsx │ ├── for-you.tsx │ ├── privacy.tsx │ └── terms.tsx ├── styles │ ├── colors.ts │ └── themes.ts ├── templates │ └── blog-post.tsx └── types.ts ├── static ├── .well-known │ ├── apple-app-site-association │ └── assetLinks.json ├── _redirects ├── images │ ├── Mediuutiset_logo.svg │ ├── app-store-button.svg │ ├── arrow.svg │ ├── blog-cover.jpg │ ├── coaching-cover.jpeg │ ├── cover.png │ ├── data.png │ ├── datasources.png │ ├── email.svg │ ├── facebook.svg │ ├── for-you-cover.jpg │ ├── icon-github.svg │ ├── icon-instagram.svg │ ├── icon-linkedin.svg │ ├── icon-twitter.svg │ ├── icon.jpg │ ├── lessons.png │ ├── linkedin.svg │ ├── logo.svg │ ├── logos │ │ ├── kiuas.svg │ │ ├── logo.jpg │ │ ├── mediuutiset.svg │ │ ├── nsa.svg │ │ ├── talouselama.svg │ │ └── techcrunch.svg │ ├── meta │ │ ├── 404.png │ │ ├── About Nyxo.png │ │ ├── Coaching.png │ │ ├── Contact.png │ │ ├── For organizations.png │ │ ├── For you.png │ │ ├── Index.png │ │ ├── Our Blog.png │ │ ├── Privacy.png │ │ ├── Tags.png │ │ └── Terms of service.png │ ├── newsletter-image.jpeg │ ├── nyxo_phones.png │ ├── organizations-cover.jpeg │ ├── playstore-button.svg │ ├── sun.svg │ ├── sunrise.svg │ ├── sunset.svg │ ├── team │ │ ├── anu.jpg │ │ ├── chinh.jpeg │ │ ├── eeva.jpg │ │ ├── kayla.jpeg │ │ ├── liisa.jpeg │ │ ├── miska.jpeg │ │ ├── perttu.png │ │ └── pietari.png │ ├── team_illustration.png │ ├── twitter.svg │ └── you-cover.jpg ├── logo.png ├── playstore-button.svg └── styles │ └── all.scss ├── tests ├── file-mock.ts ├── gatsby.ts └── jest-preprocess.js ├── translate.js ├── tsconfig.json └── yarn.lock /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "nyxo-website", 3 | "projectOwner": "hello-nyxo", 4 | "repoType": "github", 5 | "repoHost": "https://github.com", 6 | "files": [ 7 | "README.md" 8 | ], 9 | "imageSize": 100, 10 | "commit": true, 11 | "commitConvention": "none", 12 | "contributors": [ 13 | { 14 | "login": "turq84", 15 | "name": "Kayla Gordon", 16 | "avatar_url": "https://avatars3.githubusercontent.com/u/13418428?v=4", 17 | "profile": "https://www.kayla-gordon.com/", 18 | "contributions": [ 19 | "code" 20 | ] 21 | }, 22 | { 23 | "login": "plahteenlahti", 24 | "name": "Perttu", 25 | "avatar_url": "https://avatars0.githubusercontent.com/u/7436554?v=4", 26 | "profile": "https://github.com/plahteenlahti", 27 | "contributions": [ 28 | "code" 29 | ] 30 | }, 31 | { 32 | "login": "pietnurm", 33 | "name": "pietnurm", 34 | "avatar_url": "https://avatars0.githubusercontent.com/u/24267472?v=4", 35 | "profile": "https://github.com/pietnurm", 36 | "contributions": [ 37 | "blog" 38 | ] 39 | }, 40 | { 41 | "login": "eevasii", 42 | "name": "eevasii", 43 | "avatar_url": "https://avatars3.githubusercontent.com/u/37406275?v=4", 44 | "profile": "http://eeva.lol", 45 | "contributions": [ 46 | "blog", 47 | "business", 48 | "bug" 49 | ] 50 | } 51 | ], 52 | "contributorsPerLine": 7, 53 | "skipCi": true 54 | } 55 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | node_modules 38 | node_modules/@aws-amplify 39 | jspm_packages/ 40 | 41 | # Typescript v1 declaration files 42 | typings/ 43 | 44 | # Optional npm cache directory 45 | .npm 46 | 47 | # Optional eslint cache 48 | .eslintcache 49 | 50 | # Optional REPL history 51 | .node_repl_history 52 | 53 | # Output of 'npm pack' 54 | *.tgz 55 | 56 | # dotenv environment variables file 57 | .env 58 | 59 | # gatsby files 60 | .cache/ 61 | public 62 | 63 | # Mac files 64 | .DS_Store 65 | 66 | # Yarn 67 | yarn-error.log 68 | .pnp/ 69 | .pnp.js 70 | # Yarn Integrity file 71 | .yarn-integrity 72 | 73 | # IntelijIDEA 74 | .idea 75 | 76 | # generated functions 77 | .functions 78 | 79 | # amplify files 80 | .amplify 81 | amplify 82 | amplify/\#current-cloud-backend 83 | amplify/.config/local-* 84 | amplify/mock-data 85 | amplify/backend/amplify-meta.json 86 | amplify/backend/awscloudformation 87 | build/ 88 | dist/ 89 | node_modules/ 90 | aws-exports.js 91 | awsconfiguration.json 92 | amplifyconfiguration.json 93 | amplify-gradle-config.json 94 | amplifyxc.config 95 | 96 | # Visual Studio Code 97 | .expo/ 98 | .vscode/ 99 | gatsby-config.js 100 | @types/**/* 101 | @types/generated/contenful.d.ts 102 | contenful.d.ts 103 | src/aws-exports.js 104 | @types/generated/contentful.d.ts 105 | 106 | 107 | # Typescript 108 | graphql-types.ts -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: "@typescript-eslint/parser", 3 | extends: [ 4 | "eslint:recommended", 5 | "plugin:react/recommended", 6 | "plugin:@typescript-eslint/recommended", 7 | "plugin:prettier/recommended", 8 | "plugin:sonarjs/recommended", 9 | "plugin:jest/recommended", 10 | "prettier/react", 11 | "prettier/@typescript-eslint", 12 | "prettier", 13 | ], 14 | settings: { 15 | react: { 16 | version: "detect", 17 | }, 18 | }, 19 | env: { 20 | browser: true, 21 | node: true, 22 | es6: true, 23 | }, 24 | globals: { 25 | cy: false, 26 | Cypress: false, 27 | describe: false, 28 | context: false, 29 | beforeEach: false, 30 | afterEach: false, 31 | it: false, 32 | assert: false, 33 | expect: false, 34 | }, 35 | plugins: ["@typescript-eslint", "react", "sonarjs", "jest"], 36 | parserOptions: { 37 | ecmaFeatures: { 38 | jsx: true, 39 | }, 40 | ecmaVersion: 2018, 41 | sourceType: "module", 42 | }, 43 | rules: { 44 | "@typescript-eslint/camelcase": "off", 45 | "react/prop-types": "off", 46 | "@typescript-eslint/explicit-function-return-type": "off", 47 | "jest/no-disabled-tests": "warn", 48 | "jest/no-focused-tests": "error", 49 | "jest/no-identical-title": "error", 50 | "jest/prefer-to-have-length": "warn", 51 | "jest/valid-expect": "error", 52 | "@typescript-eslint/indent": "off", 53 | "prettier/prettier": [ 54 | "error", 55 | { 56 | endOfLine: "auto", 57 | }, 58 | ], 59 | }, 60 | overrides: [ 61 | { 62 | files: ["*.js"], 63 | rules: { 64 | "@typescript-eslint/no-var-requires": "off", // 65 | "@typescript-eslint/indent": "off", 66 | }, 67 | }, 68 | ], 69 | } 70 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 🐞 3 | about: Something isn't working as expected? Here is the right place to report. 4 | labels: "type: bug" 5 | --- 6 | 7 | 11 | 12 | ## Description 13 | 14 | Describe the issue that you're seeing. 15 | 16 | ### Steps to reproduce 17 | 18 | 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). 19 | 20 | ### Expected result 21 | 22 | What should happen? 23 | 24 | ### Actual result 25 | 26 | What happened. 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation 📝 3 | about: Suggest better docs coverage for a particular tool or process. 4 | labels: "type: documentation" 5 | --- 6 | 7 | 10 | 11 | ## Summary 12 | 13 | What problem(s) did you run into that caused you to request additional documentation? What questions do you think we should answer? What, if any, existing documentation relates to this proposal? 14 | 15 | Some recommended topics to cover: 16 | 17 | - List the topics you think should be here. 18 | - This list does not need to be exhaustive! 19 | 20 | ### Motivation 21 | 22 | Why should we document this and who will benefit from it? 23 | 24 | ## Steps to resolve this issue 25 | 26 | 27 | 28 | ### Draft the doc 29 | 30 | - [ ] Write the doc 31 | - [ ] Add the doc to documentation folder 32 | 33 | ### Open a pull request 34 | 35 | - [ ] Open a pull request with your work including the words "closes #[this issue's number]" in the pull request description 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 💡 3 | about: Suggest a new idea for the project. 4 | labels: "type: feature or enhancement" 5 | --- 6 | 7 | 11 | 12 | ## Summary 13 | 14 | Brief explanation of the feature. 15 | 16 | ### Basic example 17 | 18 | If the proposal involves a new or changed API, include a basic code example. Omit this section if it's not applicable. 19 | 20 | ### Motivation 21 | 22 | Why are we doing this? What use cases does it support? What is the expected outcome? 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 🤔 3 | about: Usage question or discussion about Nyxo. 4 | labels: "type: question or discussion" 5 | --- 6 | 7 | 11 | 12 | ## Summary 13 | 14 | ## Relevant information 15 | 16 | 17 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. 4 | 5 | Fixes # (issue) 6 | 7 | ## Type of change 8 | 9 | Please delete options that are not relevant. 10 | 11 | - [ ] Bug fix (non-breaking change which fixes an issue) 12 | - [ ] New feature (non-breaking change which adds functionality) 13 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 14 | - [ ] This change requires a documentation update 15 | 16 | # How Has This Been Tested? 17 | 18 | Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration 19 | 20 | - [ ] Test A 21 | - [ ] Test B 22 | 23 | 24 | # Checklist: 25 | 26 | - [ ] My code follows the style guidelines of this project 27 | - [ ] I have performed a self-review of my own code 28 | - [ ] I have commented my code, particularly in hard-to-understand areas 29 | - [ ] I have made corresponding changes to the documentation 30 | - [ ] My changes generate no new warnings 31 | - [ ] I have added tests that prove my fix is effective or that my feature works 32 | - [ ] New and existing unit tests pass locally with my changes 33 | - [ ] Any dependent changes have been merged and published in downstream modules 34 | -------------------------------------------------------------------------------- /.github/scripts/decrypt-team-provider.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Decrypt the file 4 | mkdir $HOME/ 5 | # --batch to prevent interactive command 6 | # --yes to assume "yes" for questions 7 | gpg --quiet --batch --yes --decrypt --passphrase="$PASS_PHRASE" \ 8 | --output ./amplify/team-provider-info.json team/team-provider-info.json.gpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # dotenv environment variables file 55 | .env 56 | 57 | # gatsby files 58 | .cache/ 59 | public 60 | 61 | # Mac files 62 | .DS_Store 63 | 64 | # Yarn 65 | yarn-error.log 66 | .pnp/ 67 | .pnp.js 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # IntelijIDEA 72 | .idea 73 | 74 | # generated functions 75 | .functions 76 | 77 | 78 | #amplify 79 | amplify/\#current-cloud-backend 80 | amplify/.config/local-* 81 | amplify/mock-data 82 | amplify/backend/amplify-meta.json 83 | amplify/backend/awscloudformation 84 | build/ 85 | dist/ 86 | aws-exports.js 87 | amplify/team-provider-info.json 88 | amplify/backend/api/nyxodev/build 89 | amplify/backend/api/nyxodev/resolvers 90 | amplify/backend/api/nyxodev/stacks 91 | amplify/backend/hosting 92 | amplify/backend/amplify-meta 93 | awsconfiguration.json 94 | amplifyconfiguration.json 95 | amplify-build-config.json 96 | amplify-gradle-config.json 97 | amplifyxc.config 98 | amplify/backend/function/nyxoPoints/src/amplify/backend/amplify-meta.json 99 | amplify/backend/function/nyxoPoints/src/amplify/#current-cloud-backend/amplify-meta.json 100 | .env* 101 | .secrets -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "team"] 2 | path = team 3 | url = https://github.com/hello-nyxo/team.git 4 | -------------------------------------------------------------------------------- /.graphqlconfig.yml: -------------------------------------------------------------------------------- 1 | projects: 2 | nyxoDev: 3 | schemaPath: amplify/backend/api/nyxoDev/build/schema.graphql 4 | includes: 5 | - src/graphql/**/*.ts 6 | excludes: 7 | - ./amplify/** 8 | extensions: 9 | amplify: 10 | codeGenTarget: typescript 11 | generatedFileName: src/API.ts 12 | docsFilePath: src/graphql 13 | region: eu-central-1 14 | apiId: null 15 | maxDepth: 3 16 | extensions: 17 | amplify: 18 | version: 3 19 | -------------------------------------------------------------------------------- /.huskyrc: -------------------------------------------------------------------------------- 1 | { 2 | "hooks": { 3 | } 4 | } -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "*.{js,jsx,ts,tsx}": ["npm run lint:fix"], 3 | "{*.{json,md}}": ["prettier --write"] 4 | } -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | always-auth=true 2 | registry=https://npm.pkg.github.com/hello-nyxo 3 | //npm.pkg.github.com/hello-nyxo/:_authToken=$NODE_AUTH_TOKEN 4 | # @hello-nyxo:registry=https://npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN 5 | 6 | 7 | # //npm.pkg.github.com 8 | # @hello-nyxo:registry=https://npm.pkg.github.com 9 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | graphql-types.ts -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | endOfLine: "auto", 3 | semi: false, 4 | jsxBracketSameLine: true, 5 | singleQuote: false, 6 | tabWidth: 2, 7 | trailingComma: "es5", 8 | } 9 | -------------------------------------------------------------------------------- /@types/childImageSharp.ts: -------------------------------------------------------------------------------- 1 | import { FluidObject, FixedObject } from "gatsby-image" 2 | 3 | export type GatsbyImage = { 4 | childImageSharp: { 5 | fixed: FixedObject 6 | fluid: FluidObject 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /@types/content/meta.ts: -------------------------------------------------------------------------------- 1 | export type Meta = { 2 | coaching: { 3 | title: string 4 | description: string 5 | } 6 | about: { 7 | title: string 8 | description: string 9 | perks: [ 10 | { 11 | title: string 12 | text: string 13 | }, 14 | { 15 | title: string 16 | text: string 17 | }, 18 | { 19 | title: string 20 | text: string 21 | } 22 | ] 23 | } 24 | authors: { 25 | title: string 26 | description: string 27 | } 28 | "for-you": { 29 | title: string 30 | description: string 31 | } 32 | "for-organizations": { 33 | title: string 34 | description: string 35 | } 36 | privacy: { 37 | title: string 38 | description: string 39 | } 40 | tags: { 41 | title: string 42 | description: string 43 | } 44 | index: { 45 | title: string 46 | description: string 47 | } 48 | blog: { 49 | title: string 50 | description: string 51 | } 52 | terms: { 53 | title: string 54 | description: string 55 | } 56 | contact: { 57 | title: string 58 | description: string 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 gatsbyjs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /amplify/.config/project-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "providers": [ 3 | "awscloudformation" 4 | ], 5 | "projectName": "Nyxo-Cloud", 6 | "version": "3.0", 7 | "frontend": "javascript", 8 | "javascript": { 9 | "framework": "react", 10 | "config": { 11 | "SourceDir": "src", 12 | "DistributionDir": "build", 13 | "BuildCommand": "npm run-script build", 14 | "StartCommand": "npm run-script start" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /amplify/backend/api/nyxoDev/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "AppSyncApiName": "nyxoDev", 3 | "DynamoDBBillingMode": "PAY_PER_REQUEST", 4 | "DynamoDBEnableServerSideEncryption": "false", 5 | "AuthCognitoUserPoolId": { 6 | "Fn::GetAtt": [ 7 | "authnyxodev", 8 | "Outputs.UserPoolId" 9 | ] 10 | } 11 | } -------------------------------------------------------------------------------- /amplify/backend/api/nyxoDev/pipelineFunctions/InvokeRequestCodeLambdaDataSource.req.vtl: -------------------------------------------------------------------------------- 1 | ## pipelineFunctions/InvokeRequestCodeLambdaDataSource.req.vtl 2 | 3 | ## [Start] Invoke AWS Lambda data source: InvokeRequestCodeLambdaDataSource. ** 4 | { 5 | "version": "2018-05-29", 6 | "operation": "Invoke", 7 | "payload": { 8 | "typeName": "$ctx.stash.get("typeName")", 9 | "fieldName": "$ctx.stash.get("fieldName")", 10 | "arguments": $util.toJson($ctx.arguments), 11 | "identity": $util.toJson($ctx.identity), 12 | "source": $util.toJson($ctx.source), 13 | "request": $util.toJson($ctx.request), 14 | "prev": $util.toJson($ctx.prev) 15 | } 16 | } 17 | ## [End] Invoke AWS Lambda data source: InvokeRequestCodeLambdaDataSource. ** 18 | -------------------------------------------------------------------------------- /amplify/backend/api/nyxoDev/pipelineFunctions/InvokeRequestCodeLambdaDataSource.res.vtl: -------------------------------------------------------------------------------- 1 | ## pipelineFunctions/InvokeRequestCodeLambdaDataSource.res.res.vtl 2 | 3 | ## [Start] Handle error or return result. ** 4 | #if( $ctx.error ) 5 | $util.error($ctx.error.message, $ctx.error.type) 6 | #end 7 | $util.toJson($ctx.result) 8 | ## [End] Handle error or return result. ** -------------------------------------------------------------------------------- /amplify/backend/api/nyxoDev/pipelineFunctions/MutationCreateCoachingRequestFunction.req.vtl: -------------------------------------------------------------------------------- 1 | 2 | ## [Start] Replace code in input with actual code 3 | ## Set code from previous pipeline function result 4 | #set( $code = $ctx.prev.result.code ) 5 | ## Set the code field as code if present 6 | $util.qr($context.args.input.put("code", $util.defaultIfNull($code, $context.args.input.code))) 7 | ## [End] Replace code in input with actual code 8 | 9 | ## [Start] Set default values. ** 10 | $util.qr($context.args.input.put("id", $util.defaultIfNull($ctx.args.input.id, $util.autoId()))) 11 | #set( $createdAt = $util.time.nowISO8601() ) 12 | ## Automatically set the createdAt timestamp. ** 13 | $util.qr($context.args.input.put("createdAt", $util.defaultIfNull($ctx.args.input.createdAt, $createdAt))) 14 | ## Automatically set the updatedAt timestamp. ** 15 | $util.qr($context.args.input.put("updatedAt", $util.defaultIfNull($ctx.args.input.updatedAt, $createdAt))) 16 | ## [End] Set default values. ** 17 | ## [Start] Prepare DynamoDB PutItem Request. ** 18 | $util.qr($context.args.input.put("__typename", "Request")) 19 | #set( $condition = { 20 | "expression": "attribute_not_exists(#id)", 21 | "expressionNames": { 22 | "#id": "id" 23 | } 24 | } ) 25 | #if( $context.args.condition ) 26 | #set( $condition.expressionValues = {} ) 27 | #set( $conditionFilterExpressions = $util.parseJson($util.transform.toDynamoDBConditionExpression($context.args.condition)) ) 28 | $util.qr($condition.put("expression", "($condition.expression) AND $conditionFilterExpressions.expression")) 29 | $util.qr($condition.expressionNames.putAll($conditionFilterExpressions.expressionNames)) 30 | $util.qr($condition.expressionValues.putAll($conditionFilterExpressions.expressionValues)) 31 | #end 32 | #if( $condition.expressionValues && $condition.expressionValues.size() == 0 ) 33 | #set( $condition = { 34 | "expression": $condition.expression, 35 | "expressionNames": $condition.expressionNames 36 | } ) 37 | #end 38 | { 39 | "version": "2017-02-28", 40 | "operation": "PutItem", 41 | "key": #if( $modelObjectKey ) $util.toJson($modelObjectKey) #else { 42 | "id": $util.dynamodb.toDynamoDBJson($ctx.args.input.id) 43 | } #end, 44 | "attributeValues": $util.dynamodb.toMapValuesJson($context.args.input), 45 | "condition": $util.toJson($condition) 46 | } 47 | ## [End] Prepare DynamoDB PutItem Request. ** -------------------------------------------------------------------------------- /amplify/backend/api/nyxoDev/pipelineFunctions/MutationCreateCoachingRequestFunction.res.vtl: -------------------------------------------------------------------------------- 1 | ## pipelineFunctions/MutationCreateCoachingRequestFunction.res.vtl 2 | 3 | #if( $ctx.error ) 4 | $util.error($ctx.error.message, $ctx.error.type) 5 | #end 6 | $util.toJson($ctx.result) -------------------------------------------------------------------------------- /amplify/backend/api/nyxoDev/transform.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 4, 3 | "ElasticsearchWarning": true, 4 | "StackMapping": { 5 | "QueryfeedbackContentBySlugResolver": "FeedbackContent", 6 | "QuerycommentsBySlugResolver": "Comments" 7 | } 8 | } -------------------------------------------------------------------------------- /amplify/backend/auth/nyxodev/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "identityPoolName": "nyxodev", 3 | "allowUnauthenticatedIdentities": true, 4 | "resourceNameTruncated": "nyxode9226ddfb", 5 | "userPoolName": "nyxo_dev_userpool", 6 | "autoVerifiedAttributes": ["email"], 7 | "mfaConfiguration": "OFF", 8 | "mfaTypes": ["SMS Text Message"], 9 | "smsAuthenticationMessage": "Your authentication code is {####}", 10 | "smsVerificationMessage": "Your verification code is {####}", 11 | "emailVerificationSubject": "Your verification code", 12 | "emailVerificationMessage": "Your verification code is {####}", 13 | "defaultPasswordPolicy": true, 14 | "passwordPolicyMinLength": "8", 15 | "passwordPolicyCharacters": ["Requires Uppercase", "Requires Symbols"], 16 | "requiredAttributes": ["email"], 17 | "userpoolClientGenerateSecret": true, 18 | "userpoolClientRefreshTokenValidity": "120", 19 | "userpoolClientWriteAttributes": ["email"], 20 | "userpoolClientReadAttributes": ["email", "email_verified"], 21 | "userpoolClientLambdaRole": "nyxode9226ddfb_userpoolclient_lambda_role", 22 | "userpoolClientSetAttributes": true, 23 | "useDefault": "manual", 24 | "authSelections": "identityPoolAndUserPool", 25 | "resourceName": "nyxodev", 26 | "thirdPartyAuth": false, 27 | "usernameAttributes": ["email"], 28 | "triggers": "{}", 29 | "hostedUI": false, 30 | "authRoleArn": { 31 | "Fn::GetAtt": ["AuthRole", "Arn"] 32 | }, 33 | "unauthRoleArn": { 34 | "Fn::GetAtt": ["UnauthRole", "Arn"] 35 | }, 36 | "parentStack": { 37 | "Ref": "AWS::StackId" 38 | }, 39 | "permissions": [], 40 | "dependsOn": [] 41 | } 42 | -------------------------------------------------------------------------------- /amplify/backend/backend-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "auth": { 3 | "nyxodev": { 4 | "service": "Cognito", 5 | "providerPlugin": "awscloudformation", 6 | "dependsOn": [] 7 | } 8 | }, 9 | "api": { 10 | "nyxoDev": { 11 | "service": "AppSync", 12 | "providerPlugin": "awscloudformation", 13 | "output": { 14 | "authConfig": { 15 | "additionalAuthenticationProviders": [ 16 | { 17 | "authenticationType": "AWS_IAM" 18 | } 19 | ], 20 | "defaultAuthentication": { 21 | "authenticationType": "AMAZON_COGNITO_USER_POOLS", 22 | "userPoolConfig": { 23 | "userPoolId": "authnyxodev" 24 | } 25 | } 26 | } 27 | } 28 | } 29 | }, 30 | "hosting": { 31 | "S3AndCloudFront": { 32 | "service": "S3AndCloudFront", 33 | "providerPlugin": "awscloudformation" 34 | } 35 | }, 36 | "function": { 37 | "nyxoPoints": { 38 | "build": true, 39 | "providerPlugin": "awscloudformation", 40 | "service": "Lambda", 41 | "dependsOn": [ 42 | { 43 | "category": "api", 44 | "resourceName": "nyxoDev", 45 | "attributes": [ 46 | "GraphQLAPIIdOutput", 47 | "GraphQLAPIEndpointOutput" 48 | ] 49 | } 50 | ] 51 | }, 52 | "createRequestCode": { 53 | "build": true, 54 | "providerPlugin": "awscloudformation", 55 | "service": "Lambda", 56 | "dependsOn": [] 57 | }, 58 | "nyxoPreSignup": { 59 | "build": true, 60 | "providerPlugin": "awscloudformation", 61 | "service": "Lambda", 62 | "dependsOn": [ 63 | { 64 | "category": "auth", 65 | "resourceName": "nyxodev", 66 | "attributes": [ 67 | "UserPoolId" 68 | ] 69 | } 70 | ] 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /amplify/backend/function/createRequestCode/amplify.state: -------------------------------------------------------------------------------- 1 | { 2 | "pluginId": "amplify-nodejs-function-runtime-provider", 3 | "functionRuntime": "nodejs", 4 | "useLegacyBuild": true, 5 | "defaultEditorFile": "src/index.js" 6 | } -------------------------------------------------------------------------------- /amplify/backend/function/createRequestCode/function-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "lambdaLayers": [] 3 | } -------------------------------------------------------------------------------- /amplify/backend/function/createRequestCode/parameters.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /amplify/backend/function/createRequestCode/src/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "key1": "value1", 3 | "key2": "value2", 4 | "key3": "value3" 5 | } 6 | -------------------------------------------------------------------------------- /amplify/backend/function/createRequestCode/src/index.js: -------------------------------------------------------------------------------- 1 | const Hashids = require("hashids/cjs") 2 | 3 | exports.handler = async (event) => { 4 | const { code: payload } = event.arguments.input 5 | const hash = process.env.hash 6 | const min = process.env.min 7 | const max = process.env.max 8 | const code = createCode(payload || "NX", new Date(), { hash, min, max }) 9 | 10 | return { code } 11 | } 12 | 13 | const createCode = (coachID, date, { hash, min, max }) => { 14 | const hashids = new Hashids( 15 | hash, 16 | 2, 17 | "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" 18 | ) 19 | console.log(hash, min, max) 20 | const key = getKey(parseInt(min), parseInt(max)) 21 | return `${coachID}${hashids.encode(date.getTime())}${hashids.encode(key)}` 22 | } 23 | 24 | const getKey = (min, max) => { 25 | return Math.floor(Math.random() * (max - min)) + min 26 | } 27 | -------------------------------------------------------------------------------- /amplify/backend/function/createRequestCode/src/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "createRequestCode", 3 | "version": "2.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "hashids": { 8 | "version": "2.2.2", 9 | "resolved": "https://registry.npmjs.org/hashids/-/hashids-2.2.2.tgz", 10 | "integrity": "sha512-nqH06JLFeBBCg31jYSArbOs/XddTdnHSul/hb6XbrWg/UlUWFQc9KR21sVLoGKQGKPW1D3zgTgTew0oY7nhrhQ==" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /amplify/backend/function/createRequestCode/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "createRequestCode", 3 | "version": "2.0.0", 4 | "description": "Lambda function generated by Amplify", 5 | "main": "index.js", 6 | "license": "Apache-2.0", 7 | "dependencies": { 8 | "hashids": "^2.2.2" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPoints/amplify.state: -------------------------------------------------------------------------------- 1 | { 2 | "pluginId": "amplify-nodejs-function-runtime-provider", 3 | "functionRuntime": "nodejs", 4 | "useLegacyBuild": true, 5 | "defaultEditorFile": "src/index.js" 6 | } -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPoints/function-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "api": { 4 | "nyxoDev": [ 5 | "create" 6 | ] 7 | } 8 | }, 9 | "lambdaLayers": [] 10 | } -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPoints/parameters.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPoints/src/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "key1": "value1", 3 | "key2": "value2", 4 | "identity": { 5 | "username": "a22113d5-64a4-422e-b290-327f49dd2c4a" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPoints/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nyxoPoints", 3 | "version": "2.0.0", 4 | "description": "Lambda function generated by Amplify", 5 | "main": "index.js", 6 | "license": "Apache-2.0", 7 | "dependencies": { 8 | "aws-sdk": "^2.750.0", 9 | "date-fns": "^2.16.1", 10 | "https": "^1.0.0", 11 | "d3": "^6.2.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPoints/src/parameters.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPreSignup/amplify.state: -------------------------------------------------------------------------------- 1 | { 2 | "pluginId": "amplify-nodejs-function-runtime-provider", 3 | "functionRuntime": "nodejs", 4 | "useLegacyBuild": true, 5 | "defaultEditorFile": "src/index.js" 6 | } -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPreSignup/function-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "auth": { 4 | "nyxodev": [ 5 | "update" 6 | ] 7 | } 8 | }, 9 | "lambdaLayers": [] 10 | } -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPreSignup/parameters.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPreSignup/src/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "key1": "value1", 3 | "key2": "value2", 4 | "key3": "value3" 5 | } 6 | -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPreSignup/src/index.js: -------------------------------------------------------------------------------- 1 | /* Amplify Params - DO NOT EDIT 2 | AUTH_NYXODEV_USERPOOLID 3 | Amplify Params - DO NOT EDIT */ 4 | const Handlebars = require("handlebars") 5 | const fs = require("fs") 6 | var aws = require("aws-sdk") 7 | var ses = new aws.SES({ region: "eu-central-1" }) 8 | 9 | exports.handler = (event, context, callback) => { 10 | const template = fs.readFileSync("./email.html").toString() 11 | 12 | if (event.request.userAttributes.hasOwnProperty("email")) { 13 | event.response.autoConfirmUser = true 14 | // event.response.autoVerifyEmail = true; 15 | 16 | const body = Handlebars.compile(template)({ 17 | email: event.request.userAttributes.email, 18 | }) 19 | 20 | const params = { 21 | Destination: { 22 | ToAddresses: [event.request.userAttributes.email], 23 | }, 24 | Message: { 25 | Body: { 26 | Html: { 27 | Data: body, 28 | }, 29 | }, 30 | 31 | Subject: { Data: "👋 Hello from Nyxo" }, 32 | }, 33 | Source: "Nyxo ", 34 | } 35 | 36 | ses.sendEmail(params, function (err, data) { 37 | if (err) { 38 | console.log(err) 39 | context.fail(err) 40 | } else { 41 | console.log(data) 42 | context.succeed(event) 43 | } 44 | }) 45 | 46 | callback(null, event) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPreSignup/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nyxoPreSignup", 3 | "version": "2.0.0", 4 | "description": "Lambda function generated by Amplify", 5 | "main": "index.js", 6 | "license": "Apache-2.0", 7 | "dependencies": { 8 | "handlebars": "^4.7.6" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /amplify/backend/function/nyxoPreSignup/src/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | handlebars@^4.7.6: 6 | version "4.7.6" 7 | resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" 8 | integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== 9 | dependencies: 10 | minimist "^1.2.5" 11 | neo-async "^2.6.0" 12 | source-map "^0.6.1" 13 | wordwrap "^1.0.0" 14 | optionalDependencies: 15 | uglify-js "^3.1.4" 16 | 17 | minimist@^1.2.5: 18 | version "1.2.5" 19 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" 20 | integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== 21 | 22 | neo-async@^2.6.0: 23 | version "2.6.2" 24 | resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" 25 | integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== 26 | 27 | source-map@^0.6.1: 28 | version "0.6.1" 29 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 30 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 31 | 32 | uglify-js@^3.1.4: 33 | version "3.12.4" 34 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.4.tgz#93de48bb76bb3ec0fc36563f871ba46e2ee5c7ee" 35 | integrity sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A== 36 | 37 | wordwrap@^1.0.0: 38 | version "1.0.0" 39 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" 40 | integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= 41 | -------------------------------------------------------------------------------- /content/blog/6-tips-for-better-sleep/better-sleep.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/6-tips-for-better-sleep/better-sleep.jpg -------------------------------------------------------------------------------- /content/blog/can-sleep-debt-be-paid-off/credit-card.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/can-sleep-debt-be-paid-off/credit-card.jpg -------------------------------------------------------------------------------- /content/blog/checklist-for-releasing-apps/checklist.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/checklist-for-releasing-apps/checklist.jpeg -------------------------------------------------------------------------------- /content/blog/consistency-is-key-are-you-unknowingly-suffering-from-social-jet-lag/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/consistency-is-key-are-you-unknowingly-suffering-from-social-jet-lag/cover.jpg -------------------------------------------------------------------------------- /content/blog/consistency-is-key-are-you-unknowingly-suffering-from-social-jet-lag/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "consistency-is-key-are-you-unknowingly-suffering-from-social-jet-lag" 3 | date: "2019-10-20" 4 | title: Consistency is Key – Are You Unknowingly Suffering from Social Jet Lag? 5 | authorSlug: "eeva-siika-aho" 6 | author: Eeva Siika-aho 7 | tags: ["Sleep"] 8 | thumbnailBlog: "./cover.jpg" 9 | --- 10 | 11 | One of the core aspects of having control over your daytime sleepiness is having a consistent rhythm. It is also very easy to neglect. 12 | 13 | Many of us tend to have an unbalanced rhythm. We often are sleeping too little on the weekdays and then trying to fix the sleep deprivation on weekends. On weekends we might also go to bed later because there isn’t the same requirements to wake up early. In the worst cases, this type of behavior leads to having a sleep-wake–rhythm which differs many hours between the weekdays and weekends. Mondays become especially hard, as our body tries to adjust to an entirely new rhythm each week. It is a very similar phenomenon if you fly to another country and then have jet lag. That’s why we are referring to this particular phenomenon as “social jet lag“. 14 | 15 | Jet lag is born when our inner clock (in our home country’s time zone) does not match the rhythm of the country we have travelled to. This difference often leads to insomnia, headaches, problems with metabolism, and a decrease in both cognitive and physical capabilities. In social jet lag, there is a distinct difference in the rhythm of our inner circadian rhythm and the rhythm of the outside world. However, the difference is often caused by our social life: parties, dinners, gaming, social media and other social gatherings. 16 | 17 | Irregular rhythm is hazardous 18 | The immediate effects of social jet lag are familiar to everyone who has survived through Monday’s workday after an active weekend. However, many of the social jet lag’s effects are individual, partially indirect, and can last many days. The connection between them and the weekend’s irregular rhythm is not always evident. Social jet lag also has many harmful long term effects, such as increased diabetes risk as well as increased risk of heart and vascular diseases. 19 | 20 | Not everything is lost 21 | How are your Monday mornings? Do you sleep distinctively longer into the morning on weekends? By sleeping enough during the week and keeping the rhythm on point during the weekends might have a great affect over your overall wellness and alertness to carry you through the days. 22 | 23 | If you wonder how to get the hang of your inner clock, you can try Nyxo coaching. [Available on App Store and Play Store.](https://nyxo.fi/get-nyxo) 24 | -------------------------------------------------------------------------------- /content/blog/creating-a-clock-face-in-react-native-with-svg/2-clocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/creating-a-clock-face-in-react-native-with-svg/2-clocks.png -------------------------------------------------------------------------------- /content/blog/creating-a-clock-face-in-react-native-with-svg/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/creating-a-clock-face-in-react-native-with-svg/clock.png -------------------------------------------------------------------------------- /content/blog/creating-a-clock-face-in-react-native-with-svg/clockmarkings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/creating-a-clock-face-in-react-native-with-svg/clockmarkings.png -------------------------------------------------------------------------------- /content/blog/creating-a-clock-face-in-react-native-with-svg/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/creating-a-clock-face-in-react-native-with-svg/cover.jpg -------------------------------------------------------------------------------- /content/blog/creating-a-clock-face-in-react-native-with-svg/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/creating-a-clock-face-in-react-native-with-svg/cover.png -------------------------------------------------------------------------------- /content/blog/deploy-gatsby-to-netlify/deploy-gatsby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/deploy-gatsby-to-netlify/deploy-gatsby.png -------------------------------------------------------------------------------- /content/blog/deploy-gatsby-to-netlify/netlifyDashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/deploy-gatsby-to-netlify/netlifyDashboard.png -------------------------------------------------------------------------------- /content/blog/estimating-the-sleep-wake-cycle-through-circadian-rhythm/sunset.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/estimating-the-sleep-wake-cycle-through-circadian-rhythm/sunset.jpeg -------------------------------------------------------------------------------- /content/blog/fixing-virtualizedlists-should-never-be-nested-inside-plain-scrollviews/warning.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/fixing-virtualizedlists-should-never-be-nested-inside-plain-scrollviews/warning.jpeg -------------------------------------------------------------------------------- /content/blog/gastby-netlify-amplify-part-2/Amplify-part-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/gastby-netlify-amplify-part-2/Amplify-part-2.png -------------------------------------------------------------------------------- /content/blog/gastby-netlify-amplify-part-2/auth_sceenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/gastby-netlify-amplify-part-2/auth_sceenshot.png -------------------------------------------------------------------------------- /content/blog/gatsby-netlify-amplify-part-1/Gatsby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/gatsby-netlify-amplify-part-1/Gatsby.png -------------------------------------------------------------------------------- /content/blog/gatsby-netlify-amplify-part-3/Contentful-Gatsby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/gatsby-netlify-amplify-part-3/Contentful-Gatsby.jpg -------------------------------------------------------------------------------- /content/blog/getting-high-and-getting-sleep/cannabis1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/getting-high-and-getting-sleep/cannabis1.jpg -------------------------------------------------------------------------------- /content/blog/getting-high-and-getting-sleep/cannabis2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/getting-high-and-getting-sleep/cannabis2.jpg -------------------------------------------------------------------------------- /content/blog/heart-rate-variability-hrv-is-the-hype-justified/HRV1.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/heart-rate-variability-hrv-is-the-hype-justified/HRV1.0.png -------------------------------------------------------------------------------- /content/blog/heart-rate-variability-hrv-is-the-hype-justified/applewatch2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/heart-rate-variability-hrv-is-the-hype-justified/applewatch2.jpg -------------------------------------------------------------------------------- /content/blog/heart-rate-variability-hrv-is-the-hype-justified/hr-monitor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/heart-rate-variability-hrv-is-the-hype-justified/hr-monitor.jpg -------------------------------------------------------------------------------- /content/blog/how-to-use-publish/dev-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/how-to-use-publish/dev-cover.png -------------------------------------------------------------------------------- /content/blog/how-to-use-sleep-for-your-success/mountain-winner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/how-to-use-sleep-for-your-success/mountain-winner.jpg -------------------------------------------------------------------------------- /content/blog/how-to-use-sleep-for-your-success/success.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/how-to-use-sleep-for-your-success/success.jpg -------------------------------------------------------------------------------- /content/blog/how-to-use-sleep-for-your-success/woman-jogger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/how-to-use-sleep-for-your-success/woman-jogger.jpg -------------------------------------------------------------------------------- /content/blog/key-to-unlocking-creativity-sleep/creativity.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/key-to-unlocking-creativity-sleep/creativity.jpeg -------------------------------------------------------------------------------- /content/blog/miksi-uni-ei-virkista/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/miksi-uni-ei-virkista/cover.jpg -------------------------------------------------------------------------------- /content/blog/nba-oura-ring/basketball-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/nba-oura-ring/basketball-cover.jpg -------------------------------------------------------------------------------- /content/blog/nyxo-kiuas-summer19/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "nyxo-kiuas-summer19" 3 | date: "2019-10-20" 4 | title: Nyxo is part of Kiuas Accelerator Summer 2019! 5 | authorSlug: "eeva-siika-aho" 6 | author: Eeva Siika-aho 7 | tags: ["Company"] 8 | thumbnailBlog: "./kiuas_summer.jpeg" 9 | --- 10 | 11 | Nyxo got accepted to Kiuas Accelerator! The program had a kick-off afternoon and its first BBQ this Wednesday. The summer of 17 startups started with an info session and a casual lunch with the teams, and a workshop around purpose and “why” of the companies, founders and their visions. As a cherry on top, the day got finished off with a BBQ with the Kiuas community. 12 | 13 | “After a fantastic experience at Kiuas’ Start program this spring, applying to the accelerator was a no-brainer for us”, says [Perttu Lähteenlahti](https://lahteenlahti.com), CEO of Nyxo. Nyxo is amongst the youngest companies in the bunch after operating for only six months. Perttu continues: “Even though it’s not a competition, having the other teams there, right beside us, motivates us to work even harder to get our product and sales in better shape than ever.” 14 | 15 | You can meet us at Kiuas BBQ’s at Startup Sauna this summer every other Wednesday (July 17th & 31st) and at Maria 01 on Wed August 14th! More information about the barbeques can be found on Kiuas’ Facebook page. The accelerator finishes with a bang with a Demo Day, organized on August 29th at Tennispalatsi ISENSE. 16 | 17 | (Photo source:[ Kiuas & Mari Liukkonen](https://twitter.com/kiuas_start/status/1146354462442905600)) 18 | -------------------------------------------------------------------------------- /content/blog/nyxo-kiuas-summer19/kiuas_summer.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/nyxo-kiuas-summer19/kiuas_summer.jpeg -------------------------------------------------------------------------------- /content/blog/nyxo-took-part-in-kiuas-start-accelerator/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "nyxo-took-part-in-kiuas-start-accelerator" 3 | date: "2019-10-20" 4 | title: Nyxo Took Part in Kiuas Start Accelerator 5 | authorSlug: "eeva-siika-aho" 6 | author: Eeva Siika-aho 7 | tags: ["Company"] 8 | thumbnailBlog: "./kiuas_start.jpg" 9 | --- 10 | 11 | We had the honor to participate in Kiuas Start, a 3-week program hosted at the beloved Startup Sauna. 12 | 13 | The program 14 | During the program, we took part in several lectures & Q&A’s with more later-stage founders and workshops around several topics. The teams also met with Kiuas mentors, founders, investors and industry experts, in speed mentoring style sessions once a week. The weekends were spent working on our own products and projects in short sprints. The Kiuas team was very helpful and on top of the curriculum of the program. They were more than happy to provide help, connections & mentors outside the hours of the program. 15 | 16 | For us, the best part was definitely meeting all the participants and get to know the teams taking part of the program and to get to learn from them. The spectrum of problems that the teams were solving was huge. We really hope to the see all of them succeed in their endeavours. 17 | 18 | Should I apply? 19 | If you are thinking about applying, please do. Even with the vaguest idea and even if you don’t have a team yet. There were several solo founders at our batch, and one of them even recruited their co-founder during the program. It is all about the attitude, and having a structured environment with weeklies and people you are reporting to on almost daily basis helps you a lot forward, compared to staying at home. It requires a certain level of vulnerability to get out there and to share your ideas and progress, but Kiuas has the softest way of doing so. The mandatory parts of the program were during evenings and weekends, so you can make it work with having a job or school. This is the perfect way to work on your side gig. 20 | 21 | However, there is no secret sauce after you get in 22 | There is still one thing that is worth mentioning at this point. These kind of accelerators are not magic that make you succeed instantly. You have to work to make the program work for you. Even though the organisers are doing everything that they can to provide as much help as possible, you have to be very vocal about your wishes and expectations. And other accelerator organisers, hear me out: the Kiuas team made it very easy for themselves to be of help. They met with all of the teams separately several times and were very open and responsive to feedback, both online and face to face. 23 | 24 | Thank you, Niklas, Mari, and Aaro for trusting us and helping us during the program. Looking forward to seeing the other team’s progress! 25 | 26 | [Read more here.](https://www.kiuas.com/blog/meet-the-kiuas-start-spring-2019-batch) 27 | -------------------------------------------------------------------------------- /content/blog/nyxo-took-part-in-kiuas-start-accelerator/kiuas_start.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/nyxo-took-part-in-kiuas-start-accelerator/kiuas_start.jpg -------------------------------------------------------------------------------- /content/blog/nyxo.app-is-now-open-source/yosemite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/nyxo.app-is-now-open-source/yosemite.jpg -------------------------------------------------------------------------------- /content/blog/short-sleep-can-lead-to-weight-gain/cover.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/short-sleep-can-lead-to-weight-gain/cover.jpeg -------------------------------------------------------------------------------- /content/blog/sleep-tracker-buyers-guide-pt1/activity-tracker1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/sleep-tracker-buyers-guide-pt1/activity-tracker1.jpg -------------------------------------------------------------------------------- /content/blog/sleep-tracker-buyers-guide-pt1/polysomnography.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/sleep-tracker-buyers-guide-pt1/polysomnography.jpg -------------------------------------------------------------------------------- /content/blog/sleep-tracker-buyers-guide-pt1/scoreboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/sleep-tracker-buyers-guide-pt1/scoreboard.jpg -------------------------------------------------------------------------------- /content/blog/sleep-tracker-buyers-guide-pt2/battery-low.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/sleep-tracker-buyers-guide-pt2/battery-low.jpg -------------------------------------------------------------------------------- /content/blog/sleep-tracker-buyers-guide-pt2/sleeping-cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/sleep-tracker-buyers-guide-pt2/sleeping-cat.jpg -------------------------------------------------------------------------------- /content/blog/sleep-tracker-buyers-guide-pt2/withings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/sleep-tracker-buyers-guide-pt2/withings.jpg -------------------------------------------------------------------------------- /content/blog/statistical-queries-with-swift-and-healthkit/cover.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/statistical-queries-with-swift-and-healthkit/cover.jpeg -------------------------------------------------------------------------------- /content/blog/statistical-queries-with-swift-and-healthkit/infolist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/statistical-queries-with-swift-and-healthkit/infolist.png -------------------------------------------------------------------------------- /content/blog/statistical-queries-with-swift-and-healthkit/request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/statistical-queries-with-swift-and-healthkit/request.png -------------------------------------------------------------------------------- /content/blog/statistical-queries-with-swift-and-healthkit/signing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/statistical-queries-with-swift-and-healthkit/signing.png -------------------------------------------------------------------------------- /content/blog/statistical-queries-with-swift-and-healthkit/singleviewapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/statistical-queries-with-swift-and-healthkit/singleviewapp.png -------------------------------------------------------------------------------- /content/blog/statistical-queries-with-swift-and-healthkit/startproject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/statistical-queries-with-swift-and-healthkit/startproject.png -------------------------------------------------------------------------------- /content/blog/statistical-queries-with-swift-and-healthkit/theui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/statistical-queries-with-swift-and-healthkit/theui.png -------------------------------------------------------------------------------- /content/blog/supporting-localizations-at-nyxo/cover.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/supporting-localizations-at-nyxo/cover.jpeg -------------------------------------------------------------------------------- /content/blog/tips-for-using-typescript-with-styled-components/cover.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/tips-for-using-typescript-with-styled-components/cover.jpeg -------------------------------------------------------------------------------- /content/blog/tips-for-using-typescript-with-styled-components/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/tips-for-using-typescript-with-styled-components/example.png -------------------------------------------------------------------------------- /content/blog/tips-for-using-typescript-with-styled-components/example2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/tips-for-using-typescript-with-styled-components/example2.png -------------------------------------------------------------------------------- /content/blog/tips-for-using-typescript-with-styled-components/example3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/tips-for-using-typescript-with-styled-components/example3.png -------------------------------------------------------------------------------- /content/blog/towards-better-slumber-with-terveystalo-nyxo/cover.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/towards-better-slumber-with-terveystalo-nyxo/cover.jpeg -------------------------------------------------------------------------------- /content/blog/towards-better-slumber-with-terveystalo-nyxo/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "towards-better-slumber-with-terveystalo-nyxo" 3 | date: "2019-10-20" 4 | title: Towards Better Slumber with Terveystalo & Nyxo 5 | authorSlug: "eeva-siika-aho" 6 | author: Eeva Siika-aho 7 | tags: ["Company"] 8 | thumbnailBlog: "./cover.jpeg" 9 | --- 10 | 11 | We at Nyxo are proud to announce our partnership with Terveystalo, the leading occupational health care provider in Finland! 12 | 13 | According to the data collected by Terveystalo, having problems with sleep is most common in working ages. The number of diagnosis of sleep disorders is increasing continuously. Having work invading your personal life, consuming alcohol and using electronic devices, amongst other factors, affects your sleep quality. 14 | 15 | Sanna Pussinen, leading occupational nurse from Terveystalo says that sleep problems accompanied by mental health problems are the most predominant factors in being an efficient worker. According to Pussinen, the cost of a sleep-deprived workforce is 60 million euros for employers in Finland. 16 | 17 | ## DAY RHYTHM IS THE BACKBONE OF GOOD SLUMBER 18 | 19 | Sleeping habits and reasons for sleep deprivation are often overlooked when prescribing medicine for catching z’s. Terveystalo is piloting a non-medical, low threshold service to be offered to their occupational health care customers with Nyxo. Nyxo is using the latest sleep research in their products and services. Nyxo is a mobile app, designed to coach the user based on their sleeping data. In this pilot, Nyxo app will be displayed as part of Terveystalo’s digital health plan, Oma Suunnitelma. 20 | 21 | Eeva Siika-aho, co-founder and chief operating officer of Nyxo, says that you should be focusing on what happens during the day instead of focusing on what happens during the night. The backbone of proper sleep is built with routines, habits, and choices you make during the day. For example, with exercise and the lack of it, how you handle stress, how you take breaks during the day, and what activities you do at night before going to bed. 22 | 23 | ## COACHING BUILT BY SLEEP EXPERTS 24 | 25 | The trend of tracking one’s sleep is on the rise. This service offers to take your tracking to the next level by providing you personalized coaching based on your data. The goal is to be of help to the customer before sleep problems take over your whole life. The purpose is to offer the service to private customers as well as employers. 26 | 27 | The coaching is offered through the digital Oma Suunnitelma by Terveystalo. Your health care professional has access to the customers sleep data and they can be in contact through the service. The idea is to offer a service with a low threshold, where the customer can get help when they have problems and concerns with their sleep. The 4-week program is the first push towards a better lifestyle, and the goal is to get better rest. 28 | 29 | More information in the press release (linked below) and by email through hello@nyxo.fi 30 | 31 | The full release by Terveystalo can be found [here (in Finnish)](https://www.terveystalo.com/fi/Sijoittajat/Tiedotteet/?crid=F64B73B709C22CB7). 32 | -------------------------------------------------------------------------------- /content/blog/towards-better-slumber-with-terveystalo-nyxo/terveystalo-partnership.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/towards-better-slumber-with-terveystalo-nyxo/terveystalo-partnership.jpeg -------------------------------------------------------------------------------- /content/blog/what-can-heart-rate-tell-about-your-sleep/applewatch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/what-can-heart-rate-tell-about-your-sleep/applewatch.jpg -------------------------------------------------------------------------------- /content/blog/what-can-heart-rate-tell-about-your-sleep/hr-u-shape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/content/blog/what-can-heart-rate-tell-about-your-sleep/hr-u-shape.png -------------------------------------------------------------------------------- /content/pages/for-you.json: -------------------------------------------------------------------------------- 1 | { 2 | "features": [ 3 | { 4 | "icon": "sun", 5 | "title": "Sleep Diary", 6 | "text": "Keep a detailed sleep diary with notes." 7 | }, 8 | { 9 | "icon": "sun", 10 | "title": "Data Import", 11 | "text": "Bring your sleep data from practically any sleep tracker on the market." 12 | }, 13 | { 14 | "icon": "sun", 15 | "title": "Data Import", 16 | "text": "Bring your sleep data from practically any sleep tracker on the market." 17 | }, 18 | { 19 | "icon": "sun", 20 | "title": "Cloud Sync", 21 | "text": "Sync all of you sleep and coaching records to the Nyxo Cloud, and access them from you browser." 22 | }, 23 | { 24 | "icon": "sun", 25 | "title": "Cloud Sync", 26 | "text": "Sync all of you sleep and coaching records to the Nyxo Cloud, and access them from you browser." 27 | }, 28 | { 29 | "icon": "sun", 30 | "title": "Cloud Sync", 31 | "text": "Sync all of you sleep and coaching records to the Nyxo Cloud, and access them from you browser." 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:8000/", 3 | "integrationFolder": "cypress/e2e" 4 | } 5 | -------------------------------------------------------------------------------- /cypress/e2e/smoke.js: -------------------------------------------------------------------------------- 1 | describe("app", () => { 2 | it("works", () => { 3 | cy.visit("/") 4 | cy.findByText(/contact/i).click() 5 | }) 6 | }) 7 | -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /cypress/plugins/index.js: -------------------------------------------------------------------------------- 1 | /// 2 | // *********************************************************** 3 | // This example plugins/index.js can be used to load plugins 4 | // 5 | // You can change the location of this file or turn off loading 6 | // the plugins file with the 'pluginsFile' configuration option. 7 | // 8 | // You can read more here: 9 | // https://on.cypress.io/plugins-guide 10 | // *********************************************************** 11 | 12 | // This function is called when a project is opened or re-opened (e.g. due to 13 | // the project's config changing) 14 | 15 | /** 16 | * @type {Cypress.PluginConfig} 17 | */ 18 | module.exports = (_on, _config) => { 19 | // `on` is used to hook into various events Cypress emits 20 | // `config` is the resolved Cypress config 21 | } 22 | -------------------------------------------------------------------------------- /cypress/support/commands.js: -------------------------------------------------------------------------------- 1 | import "@testing-library/cypress" 2 | 3 | // got the error: `cy.visit(...).getByText is not a function` 4 | // this is the solution: `import "@testing-library/cypress/add-commands"` 5 | import "@testing-library/cypress/add-commands" 6 | -------------------------------------------------------------------------------- /cypress/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import "./commands" 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /functions/submission-created.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config() 2 | 3 | const { 4 | TWILIO_ACCOUNT_SID, 5 | TWILIO_AUTH_TOKEN, 6 | CONTACT_NUMBERS, 7 | BOT_NUMBER, 8 | BOT_MESSAGE, 9 | } = process.env 10 | 11 | const client = require("twilio")(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) 12 | 13 | exports.handler = function (event, context, callback) { 14 | Promise.all( 15 | // split the string of several messages into single numbers 16 | // send message to each of them 17 | CONTACT_NUMBERS.split(";").map((num) => { 18 | return client.messages.create({ 19 | from: BOT_NUMBER, 20 | to: num, 21 | body: BOT_MESSAGE, 22 | }) 23 | }) 24 | ) 25 | .then(() => callback(null, { statusCode: 200, body: "Created" })) 26 | .catch((e) => { 27 | console.log(e) 28 | callback(e) 29 | }) 30 | } 31 | -------------------------------------------------------------------------------- /gatsby-browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Implement Gatsby's Browser APIs in this file. 3 | * 4 | * See: https://www.gatsbyjs.org/docs/browser-apis/ 5 | */ 6 | 7 | // You can delete this file if you're not using it 8 | 9 | import Auth from "@aws-amplify/auth" 10 | import Amplify from "aws-amplify" 11 | import "prism-theme-night-owl" 12 | import { setUser } from "./src/auth/AppUser" 13 | 14 | require("prismjs/plugins/line-numbers/prism-line-numbers.css") 15 | require("prismjs/plugins/command-line/prism-command-line.css") 16 | const config = require("./src/aws-exports.js").default 17 | 18 | export const onClientEntry = () => { 19 | Amplify.configure(config) 20 | if (!(`IntersectionObserver` in window)) { 21 | import(`intersection-observer`) 22 | } 23 | } 24 | 25 | export const onRouteUpdate = (state, page, pages) => { 26 | Auth.currentAuthenticatedUser() 27 | .then((user) => { 28 | const userInfo = { 29 | ...user.attributes, 30 | username: user.username, 31 | } 32 | setUser(userInfo) 33 | }) 34 | .catch((err) => { 35 | window.localStorage.setItem("gatsbyUser", null) 36 | }) 37 | } 38 | -------------------------------------------------------------------------------- /gatsby-node.js: -------------------------------------------------------------------------------- 1 | require("source-map-support").install() 2 | require("ts-node").register({ files: true }) 3 | 4 | const path = require("path") 5 | 6 | const ChildProcess = require("child_process") 7 | 8 | exports.onPostBuild = () => { 9 | ChildProcess.execSync( 10 | "ps aux | grep jest | grep -v grep | awk '{print $2}' | xargs kill" 11 | ) 12 | } 13 | 14 | exports.createPages = async ({ graphql, actions }) => { 15 | const { createPage } = actions 16 | 17 | const allMarkdown = await graphql(` 18 | { 19 | allBlogPosts: allMarkdownRemark( 20 | filter: { fileAbsolutePath: { regex: "/content/blog/" } } 21 | sort: { fields: [frontmatter___date], order: DESC } 22 | limit: 1000 23 | ) { 24 | nodes { 25 | fields { 26 | slug 27 | } 28 | frontmatter { 29 | title 30 | authorSlug 31 | author 32 | } 33 | } 34 | } 35 | 36 | tagsGroup: allMarkdownRemark( 37 | filter: { fileAbsolutePath: { regex: "/content/blog/" } } 38 | limit: 2000 39 | ) { 40 | group(field: frontmatter___tags) { 41 | fieldValue 42 | } 43 | } 44 | } 45 | `) 46 | if (allMarkdown.errors) { 47 | throw allMarkdown.errors 48 | } 49 | 50 | const posts = allMarkdown.data.allBlogPosts.nodes 51 | 52 | posts.forEach((post, index) => { 53 | const previous = index === posts.length - 1 ? null : posts[index + 1].slug 54 | const next = index === 0 ? null : posts[index - 1].slug 55 | createPage({ 56 | path: post.fields.slug, 57 | component: path.resolve(`./src/templates/blog-post.tsx`), 58 | context: { 59 | next, 60 | previous, 61 | author: post.frontmatter.authorSlug, 62 | slug: post.fields.slug, 63 | }, 64 | }) 65 | }) 66 | } 67 | 68 | exports.onCreateWebpackConfig = ({ actions }) => { 69 | actions.setWebpackConfig({ 70 | resolve: { 71 | alias: { 72 | "~auth": path.resolve(__dirname, "src/auth/"), 73 | "~components": path.resolve(__dirname, "src/components/"), 74 | "~content": path.resolve(__dirname, "content/"), 75 | "~theme": path.resolve( 76 | __dirname, 77 | "src/@hello-nyxo/gatsby-theme-nyxo-coaching/" 78 | ), 79 | "~hooks": path.resolve(__dirname, "src/hooks/"), 80 | "~styles": path.resolve(__dirname, "src/styles/"), 81 | "~graphql": path.resolve(__dirname, "src/graphql/"), 82 | "~helpers": path.resolve(__dirname, "src/Helpers/"), 83 | "~gatsby": path.resolve(__dirname, "src/gatsby/"), 84 | }, 85 | }, 86 | }) 87 | } 88 | -------------------------------------------------------------------------------- /gatsby-ssr.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hello-nyxo/nyxo-website/b4ac31ebd3d65a05359536c51007167ece9090e5/gatsby-ssr.js -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | verbose: true, 3 | transform: { 4 | "^.+\\.[jt]sx?$": "/tests/jest-preprocess.js", 5 | }, 6 | moduleNameMapper: { 7 | ".+\\.(css|styl|less|sass|scss)$": `identity-obj-proxy`, 8 | ".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": `/tests/file-mock.js`, 9 | }, 10 | testPathIgnorePatterns: [`node_modules`, `\\.cache`, `.*/public`], 11 | transformIgnorePatterns: [`node_modules/(?!(gatsby)/)`], 12 | globals: { 13 | __PATH_PREFIX__: ``, 14 | }, 15 | testURL: `http://localhost`, 16 | setupFiles: [`/loadershim.js`], 17 | setupFilesAfterEnv: ["/setup-test-env.ts"], 18 | } 19 | -------------------------------------------------------------------------------- /lint-staged.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | linters: { 3 | "*.js": ["eslint"], 4 | "*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx)": [ 5 | "prettier --write", 6 | "git add", 7 | ], 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /loadershim.js: -------------------------------------------------------------------------------- 1 | global.___loader = { 2 | enqueue: jest.fn(), 3 | } 4 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | functions = ".functions" -------------------------------------------------------------------------------- /setup-test-env.ts: -------------------------------------------------------------------------------- 1 | import "@testing-library/jest-dom/extend-expect" 2 | import "@testing-library/jest-dom" 3 | -------------------------------------------------------------------------------- /src/@hello-nyxo/gatsby-theme-nyxo-coaching/components/Layout/Layout.tsx: -------------------------------------------------------------------------------- 1 | import React, { FC, useEffect } from "react" 2 | import { ThemeProvider } from "styled-components" 3 | import Footer from "~components/Footer/Footer" 4 | import Header from "~components/header" 5 | import { lightTheme } from "~styles/themes" 6 | // import generateAscii from "~helpers/AsciiHelper" 7 | 8 | type Props = { 9 | children: JSX.Element | JSX.Element[] 10 | } 11 | 12 | const Layout: FC = ({ children }) => { 13 | useEffect(() => { 14 | // generateAscii() 15 | }, []) 16 | 17 | return ( 18 | <> 19 | 20 |
21 |
{children}
22 |