Full Code of TannerGabriel/Blog for AI

master dabc03ab4c75 cached
291 files
239.1 KB
74.2k tokens
207 symbols
1 requests
Download .txt
Showing preview only (302K chars total). Download the full file or copy to clipboard to get everything.
Repository: TannerGabriel/Blog
Branch: master
Commit: dabc03ab4c75
Files: 291
Total size: 239.1 KB

Directory structure:
gitextract_vk9h6cdj/

├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   └── bug_report.md
│   └── workflows/
│       ├── codeql-analysis.yml
│       └── stale.yml
├── .gitignore
├── Camera/
│   ├── .gitignore
│   ├── .idea/
│   │   ├── codeStyles/
│   │   │   ├── Project.xml
│   │   │   └── codeStyleConfig.xml
│   │   ├── encodings.xml
│   │   ├── gradle.xml
│   │   ├── misc.xml
│   │   └── vcs.xml
│   ├── app/
│   │   ├── .gitignore
│   │   ├── build.gradle
│   │   ├── proguard-rules.pro
│   │   └── src/
│   │       ├── androidTest/
│   │       │   └── java/
│   │       │       └── com/
│   │       │           └── example/
│   │       │               └── videorecorder/
│   │       │                   └── ExampleInstrumentedTest.kt
│   │       ├── main/
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java/
│   │       │   │   └── com/
│   │       │   │       └── example/
│   │       │   │           └── videorecorder/
│   │       │   │               └── MainActivity.kt
│   │       │   └── res/
│   │       │       ├── drawable/
│   │       │       │   ├── ic_camera.xml
│   │       │       │   ├── ic_flash.xml
│   │       │       │   ├── ic_launcher_background.xml
│   │       │       │   └── ic_switch_camera.xml
│   │       │       ├── drawable-v24/
│   │       │       │   └── ic_launcher_foreground.xml
│   │       │       ├── layout/
│   │       │       │   └── activity_main.xml
│   │       │       ├── mipmap-anydpi-v26/
│   │       │       │   ├── ic_launcher.xml
│   │       │       │   └── ic_launcher_round.xml
│   │       │       └── values/
│   │       │           ├── colors.xml
│   │       │           ├── strings.xml
│   │       │           └── styles.xml
│   │       └── test/
│   │           └── java/
│   │               └── com/
│   │                   └── example/
│   │                       └── videorecorder/
│   │                           └── ExampleUnitTest.kt
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   └── settings.gradle
├── CameraX/
│   ├── .gitignore
│   ├── .idea/
│   │   ├── codeStyles/
│   │   │   ├── Project.xml
│   │   │   └── codeStyleConfig.xml
│   │   ├── encodings.xml
│   │   ├── gradle.xml
│   │   ├── misc.xml
│   │   ├── runConfigurations.xml
│   │   └── vcs.xml
│   ├── app/
│   │   ├── .gitignore
│   │   ├── build.gradle
│   │   ├── proguard-rules.pro
│   │   └── src/
│   │       ├── androidTest/
│   │       │   └── java/
│   │       │       └── com/
│   │       │           └── example/
│   │       │               └── camerax/
│   │       │                   └── ExampleInstrumentedTest.kt
│   │       ├── main/
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java/
│   │       │   │   └── com/
│   │       │   │       └── example/
│   │       │   │           └── camerax/
│   │       │   │               └── MainActivity.kt
│   │       │   └── res/
│   │       │       ├── drawable/
│   │       │       │   ├── ic_camera.xml
│   │       │       │   ├── ic_flash.xml
│   │       │       │   ├── ic_launcher_background.xml
│   │       │       │   └── ic_switch_camera.xml
│   │       │       ├── drawable-v24/
│   │       │       │   └── ic_launcher_foreground.xml
│   │       │       ├── layout/
│   │       │       │   └── activity_main.xml
│   │       │       ├── mipmap-anydpi-v26/
│   │       │       │   ├── ic_launcher.xml
│   │       │       │   └── ic_launcher_round.xml
│   │       │       └── values/
│   │       │           ├── colors.xml
│   │       │           ├── strings.xml
│   │       │           └── styles.xml
│   │       └── test/
│   │           └── java/
│   │               └── com/
│   │                   └── example/
│   │                       └── camerax/
│   │                           └── ExampleUnitTest.kt
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   └── settings.gradle
├── LICENSE
├── Nest-CRUD/
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.md
│   ├── docker-compose.yaml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.controller.spec.ts
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── app.service.ts
│   │   ├── items/
│   │   │   ├── dto/
│   │   │   │   └── create-item.dto.ts
│   │   │   ├── interfaces/
│   │   │   │   └── item.interface.ts
│   │   │   ├── item.controller.spec.ts
│   │   │   ├── items.controller.ts
│   │   │   ├── items.module.ts
│   │   │   ├── items.service.ts
│   │   │   └── schemas/
│   │   │       └── item.schema.ts
│   │   └── main.ts
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── NestVueChat/
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.md
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.gateway.ts
│   │   ├── app.module.ts
│   │   └── main.ts
│   ├── static/
│   │   ├── index.html
│   │   ├── main.js
│   │   └── styles.css
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── Notifications/
│   ├── .gitignore
│   ├── .idea/
│   │   ├── codeStyles/
│   │   │   ├── Project.xml
│   │   │   └── codeStyleConfig.xml
│   │   ├── encodings.xml
│   │   ├── gradle.xml
│   │   ├── misc.xml
│   │   ├── runConfigurations.xml
│   │   └── vcs.xml
│   ├── app/
│   │   ├── .gitignore
│   │   ├── build.gradle
│   │   ├── proguard-rules.pro
│   │   └── src/
│   │       ├── androidTest/
│   │       │   └── java/
│   │       │       └── com/
│   │       │           └── example/
│   │       │               └── notifications/
│   │       │                   └── ExampleInstrumentedTest.kt
│   │       ├── main/
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java/
│   │       │   │   └── com/
│   │       │   │       └── example/
│   │       │   │           └── notifications/
│   │       │   │               └── MainActivity.kt
│   │       │   └── res/
│   │       │       ├── drawable/
│   │       │       │   ├── ic_launcher_background.xml
│   │       │       │   └── notification_icon.xml
│   │       │       ├── drawable-v24/
│   │       │       │   └── ic_launcher_foreground.xml
│   │       │       ├── layout/
│   │       │       │   ├── activity_main.xml
│   │       │       │   ├── custom_notification_expended_layout.xml
│   │       │       │   └── custom_notification_layout.xml
│   │       │       ├── mipmap-anydpi-v26/
│   │       │       │   ├── ic_launcher.xml
│   │       │       │   └── ic_launcher_round.xml
│   │       │       └── values/
│   │       │           ├── colors.xml
│   │       │           ├── strings.xml
│   │       │           └── styles.xml
│   │       └── test/
│   │           └── java/
│   │               └── com/
│   │                   └── example/
│   │                       └── notifications/
│   │                           └── ExampleUnitTest.kt
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   └── settings.gradle
├── README.md
├── nest-auth/
│   ├── .dockerignore
│   ├── .gitignore
│   ├── .prettierrc
│   ├── Dockerfile
│   ├── README.md
│   ├── docker-compose.yml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── app.service.ts
│   │   ├── auth/
│   │   │   ├── auth.controller.ts
│   │   │   ├── auth.module.ts
│   │   │   ├── auth.service.ts
│   │   │   └── jwt.strategy.ts
│   │   ├── main.ts
│   │   ├── models/
│   │   │   └── user.schema.ts
│   │   ├── types/
│   │   │   ├── payload.ts
│   │   │   └── user.ts
│   │   └── user/
│   │       ├── dto/
│   │       │   ├── create-user.dto.ts
│   │       │   └── login-user.dto.ts
│   │       ├── user.module.ts
│   │       └── user.service.ts
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── nest-file-uploading/
│   ├── .dockerignore
│   ├── .gitignore
│   ├── .prettierrc
│   ├── Dockerfile
│   ├── README.md
│   ├── docker-compose.yml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── main.ts
│   │   └── utils/
│   │       └── file-upload.utils.ts
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── nest-graph-ql/
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.md
│   ├── docker-compose.yaml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── schema.gql
│   ├── src/
│   │   ├── app.controller.spec.ts
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── app.service.ts
│   │   ├── items/
│   │   │   ├── dto/
│   │   │   │   └── create-item.dto.ts
│   │   │   ├── input-items.input.ts
│   │   │   ├── interfaces/
│   │   │   │   └── item.interface.ts
│   │   │   ├── item.schema.ts
│   │   │   ├── items.module.ts
│   │   │   ├── items.resolver.ts
│   │   │   ├── items.service.spec.ts
│   │   │   └── items.service.ts
│   │   └── main.ts
│   ├── test/
│   │   ├── items.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── nestjs-typeorm/
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.md
│   ├── docker-compose.yaml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── app.service.ts
│   │   ├── item/
│   │   │   ├── item.controller.ts
│   │   │   ├── item.dto.ts
│   │   │   ├── item.entity.ts
│   │   │   ├── item.module.ts
│   │   │   └── item.service.ts
│   │   └── main.ts
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── nuxt-ghost/
│   ├── .eslintrc.js
│   ├── .gitignore
│   ├── README.md
│   ├── assets/
│   │   └── README.md
│   ├── components/
│   │   └── README.md
│   ├── jsconfig.json
│   ├── layouts/
│   │   ├── README.md
│   │   └── default.vue
│   ├── middleware/
│   │   └── README.md
│   ├── nuxt.config.js
│   ├── package.json
│   ├── pages/
│   │   ├── README.md
│   │   └── index.vue
│   ├── plugins/
│   │   └── README.md
│   ├── static/
│   │   └── README.md
│   ├── store/
│   │   └── README.md
│   └── utils/
│       └── ghost.js
├── nuxt-supabase-auth/
│   ├── .editorconfig
│   ├── .gitignore
│   ├── README.md
│   ├── assets/
│   │   └── css/
│   │       └── tailwind.css
│   ├── jsconfig.json
│   ├── layouts/
│   │   └── default.vue
│   ├── middleware/
│   │   └── auth.js
│   ├── nuxt.config.js
│   ├── package.json
│   ├── pages/
│   │   ├── index.vue
│   │   ├── login.vue
│   │   └── register.vue
│   ├── plugins/
│   │   └── client.js
│   ├── store/
│   │   └── README.md
│   └── tailwind.config.js
├── prisma-crud/
│   ├── .gitignore
│   ├── README.md
│   ├── package.json
│   ├── prisma/
│   │   ├── datamodel.prisma
│   │   ├── prisma.yml
│   │   └── seed.graphql
│   ├── src/
│   │   ├── generated/
│   │   │   └── prisma-client/
│   │   │       ├── index.ts
│   │   │       └── prisma-schema.ts
│   │   ├── index.ts
│   │   ├── schema.graphql
│   │   └── utils.ts
│   └── tsconfig.json
└── renovate.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: [TannerGabriel]# Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: [e.g. iOS]
 - Browser [e.g. chrome, safari]
 - Version [e.g. 22]

**Smartphone (please complete the following information):**
 - Device: [e.g. iPhone6]
 - OS: [e.g. iOS8.1]
 - Browser [e.g. stock browser, safari]
 - Version [e.g. 22]

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
  push:
    branches: [ master ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ master ]
  schedule:
    - cron: '26 23 * * 2'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'javascript' ]
        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
        # Learn more:
        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v1
      with:
        languages: ${{ matrix.language }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.
        # queries: ./path/to/local/query, your-org/your-repo/queries@main

    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    - name: Autobuild
      uses: github/codeql-action/autobuild@v1

    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 https://git.io/JvXDl

    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
    #    and modify them (or add more) to build your code if your project
    #    uses a compiled language

    #- run: |
    #   make bootstrap
    #   make release

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v1


================================================
FILE: .github/workflows/stale.yml
================================================
name: Mark stale issues and pull requests

on:
  schedule:
  - cron: "0 0 * * *"

jobs:
  stale:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/stale@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        stale-pr-message: 'Stale pull request message'
        stale-issue-label: 'no-issue-activity'
        stale-pr-label: 'no-pr-activity'
        stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'
        days-before-stale: 30
        days-before-close: 5  


================================================
FILE: .gitignore
================================================
# compiled output
/dist
/node_modules

# API Keys
.env

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

================================================
FILE: Camera/.gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild


================================================
FILE: Camera/.idea/codeStyles/Project.xml
================================================
<component name="ProjectCodeStyleConfiguration">
  <code_scheme name="Project" version="173">
    <JetCodeStyleSettings>
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    </JetCodeStyleSettings>
    <codeStyleSettings language="kotlin">
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    </codeStyleSettings>
  </code_scheme>
</component>

================================================
FILE: Camera/.idea/codeStyles/codeStyleConfig.xml
================================================
<component name="ProjectCodeStyleConfiguration">
  <state>
    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
  </state>
</component>

================================================
FILE: Camera/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

================================================
FILE: Camera/.idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/app" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>

================================================
FILE: Camera/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CMakeSettings">
    <configurations>
      <configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
    </configurations>
  </component>
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/build/classes" />
  </component>
  <component name="ProjectType">
    <option name="id" value="Android" />
  </component>
</project>

================================================
FILE: Camera/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="" vcs="Git" />
    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
  </component>
</project>

================================================
FILE: Camera/app/.gitignore
================================================
/build


================================================
FILE: Camera/app/build.gradle
================================================
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.videorecorder"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.core:core-ktx:1.1.0-alpha03'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'

    //Fotoapparat
    implementation 'io.fotoapparat:fotoapparat:2.6.1'

    //Picasso
    implementation 'com.squareup.picasso:picasso:2.71828'

    // Kotlin Android Coroutines
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.0-RC1'
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0-RC1"

    //Material Design
    implementation 'com.google.android.material:material:1.0.0-rc01'

}


================================================
FILE: Camera/app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: Camera/app/src/androidTest/java/com/example/videorecorder/ExampleInstrumentedTest.kt
================================================
package com.example.videorecorder

import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
 * Instrumented test, which will execute on an Android device.
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
    @Test
    fun useAppContext() {
        // Context of the app under test.
        val appContext = InstrumentationRegistry.getTargetContext()
        assertEquals("com.example.videorecorder", appContext.packageName)
    }
}


================================================
FILE: Camera/app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools" package="com.example.videorecorder">

    <uses-feature android:name="android.hardware.camera"
                  android:required="true" />

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

    <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>

================================================
FILE: Camera/app/src/main/java/com/example/videorecorder/MainActivity.kt
================================================
package com.example.videorecorder


import android.Manifest
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Environment
import androidx.annotation.RequiresApi
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import io.fotoapparat.Fotoapparat
import io.fotoapparat.configuration.CameraConfiguration
import io.fotoapparat.log.logcat
import io.fotoapparat.log.loggers
import io.fotoapparat.parameter.ScaleType
import io.fotoapparat.selector.*
import io.fotoapparat.view.CameraView
import kotlinx.android.synthetic.main.activity_main.*
import java.io.File
import kotlinx.coroutines.*



class MainActivity : AppCompatActivity() {

    var fotoapparat: Fotoapparat? = null
    val filename = "test.png"
    val sd = Environment.getExternalStorageDirectory()
    val dest = File(sd, filename)
    var fotoapparatState : FotoapparatState? = null
    var cameraStatus : CameraState? = null
    var flashState: FlashState? = null

    val permissions = arrayOf(android.Manifest.permission.CAMERA, android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.READ_EXTERNAL_STORAGE)

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        createFotoapparat()

        cameraStatus = CameraState.BACK
        flashState = FlashState.OFF
        fotoapparatState = FotoapparatState.OFF

        fab_camera.setOnClickListener {
            print("Taking photo")
            val test = "Test233"
            takePhoto()
        }

        fab_switch_camera.setOnClickListener {
            switchCamera()
        }

        fab_flash.setOnClickListener {
            changeFlashState()
        }
    }

    private fun createFotoapparat(){
        val cameraView = findViewById<CameraView>(R.id.camera_view)

        fotoapparat = Fotoapparat(
            context = this,
            view = cameraView,
            scaleType = ScaleType.CenterCrop,
            lensPosition = back(),
            logger = loggers(
                logcat()
            ),
            cameraErrorCallback = { error ->
                println("Recorder errors: $error")
            }
        )
    }

    private fun changeFlashState() {
        fotoapparat?.updateConfiguration(
            CameraConfiguration(
                flashMode = if(flashState == FlashState.TORCH) off() else torch()
            )
        )

        if(flashState == FlashState.TORCH) flashState = FlashState.OFF
        else flashState = FlashState.TORCH
    }

    private fun switchCamera() {
        fotoapparat?.switchTo(
            lensPosition =  if (cameraStatus == CameraState.BACK) front() else back(),
            cameraConfiguration = CameraConfiguration()
        )

        if(cameraStatus == CameraState.BACK) cameraStatus = CameraState.FRONT
        else cameraStatus = CameraState.BACK
    }

    private fun takePhoto() {
       if (hasNoPermissions()) {

           val permissions = arrayOf(android.Manifest.permission.CAMERA, android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.READ_EXTERNAL_STORAGE)
           ActivityCompat.requestPermissions(this, permissions,0)
       }else{
           println("Has all permissions!")
           fotoapparat
               ?.takePicture()
               ?.saveToFile(dest)
       }
    }

    @RequiresApi(Build.VERSION_CODES.M)
    override fun onStart() {
        super.onStart()

        println("Onstart")

        if (hasNoPermissions()) {
            requestPermission()
        }else{
            fotoapparat?.start()
            fotoapparatState = FotoapparatState.ON
        }
    }

    private fun hasNoPermissions(): Boolean{
        return ContextCompat.checkSelfPermission(this,
            Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,
            Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,
            Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED
    }

    fun requestPermission(){
        ActivityCompat.requestPermissions(this, permissions,0)
    }

    override fun onStop() {
        super.onStop()
        fotoapparat?.stop()
        FotoapparatState.OFF
    }

    override fun onPause() {
        super.onPause()
        println("OnPause")
    }

    override fun onResume() {
        super.onResume()
        println("OnResume")

        println(fotoapparatState)

        if(!hasNoPermissions() && fotoapparatState == FotoapparatState.OFF){
            val intent = Intent(baseContext, MainActivity::class.java)
            startActivity(intent)
            finish()
        }
    }

}

enum class CameraState{
    FRONT, BACK
}

enum class FlashState{
    TORCH, OFF
}

enum class FotoapparatState{
    ON, OFF
}

================================================
FILE: Camera/app/src/main/res/drawable/ic_camera.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
    <path
        android:fillColor="#FF000000"
        android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
</vector>


================================================
FILE: Camera/app/src/main/res/drawable/ic_flash.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M7,2v11h3v9l7,-12h-4l4,-8z"/>
</vector>


================================================
FILE: Camera/app/src/main/res/drawable/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<vector
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:height="108dp"
        android:width="108dp"
        android:viewportHeight="108"
        android:viewportWidth="108">
    <path android:fillColor="#008577"
          android:pathData="M0,0h108v108h-108z"/>
    <path android:fillColor="#00000000" android:pathData="M9,0L9,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,0L19,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M29,0L29,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M39,0L39,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M49,0L49,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M59,0L59,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M69,0L69,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M79,0L79,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M89,0L89,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M99,0L99,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,9L108,9"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,19L108,19"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,29L108,29"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,39L108,39"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,49L108,49"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,59L108,59"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,69L108,69"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,79L108,79"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,89L108,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,99L108,99"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,29L89,29"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,39L89,39"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,49L89,49"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,59L89,59"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,69L89,69"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,79L89,79"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M29,19L29,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M39,19L39,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M49,19L49,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M59,19L59,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M69,19L69,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M79,19L79,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>


================================================
FILE: Camera/app/src/main/res/drawable/ic_switch_camera.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M20,4h-3.17L15,2L9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM15,15.5L15,13L9,13v2.5L5.5,12 9,8.5L9,11h6L15,8.5l3.5,3.5 -3.5,3.5z"/>
</vector>


================================================
FILE: Camera/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:aapt="http://schemas.android.com/aapt"
        android:width="108dp"
        android:height="108dp"
        android:viewportHeight="108"
        android:viewportWidth="108">
    <path
            android:fillType="evenOdd"
            android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
            android:strokeColor="#00000000"
            android:strokeWidth="1">
        <aapt:attr name="android:fillColor">
            <gradient
                    android:endX="78.5885"
                    android:endY="90.9159"
                    android:startX="48.7653"
                    android:startY="61.0927"
                    android:type="linear">
                <item
                        android:color="#44000000"
                        android:offset="0.0"/>
                <item
                        android:color="#00000000"
                        android:offset="1.0"/>
            </gradient>
        </aapt:attr>
    </path>
    <path
            android:fillColor="#FFFFFF"
            android:fillType="nonZero"
            android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
            android:strokeColor="#00000000"
            android:strokeWidth="1"/>
</vector>


================================================
FILE: Camera/app/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
        tools:context=".MainActivity"
        android:background="@android:color/black">

    <io.fotoapparat.view.CameraView
            android:id="@+id/camera_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@id/fab_camera"/>




    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab_camera"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:fabSize="normal"
        android:src="@drawable/ic_camera"
        android:layout_alignParentBottom="true"
        android:layout_margin="32dp"
        android:layout_centerHorizontal="true"
        app:backgroundTint="@android:color/white"/>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/fab_flash"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:fabSize="normal"
            android:src="@drawable/ic_flash"
            android:layout_alignParentBottom="true"
            android:layout_margin="32dp"
            app:backgroundTint="@android:color/white"/>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/fab_switch_camera"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:fabSize="normal"
            android:src="@drawable/ic_switch_camera"
            android:layout_alignParentBottom="true"
            android:layout_margin="32dp"
            android:layout_alignParentRight="true"
            app:backgroundTint="@android:color/white"/>



</RelativeLayout>

================================================
FILE: Camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

================================================
FILE: Camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

================================================
FILE: Camera/app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#008577</color>
    <color name="colorPrimaryDark">#00574B</color>
    <color name="colorAccent">#D81B60</color>
</resources>


================================================
FILE: Camera/app/src/main/res/values/strings.xml
================================================
<resources>
    <string name="app_name">Camera</string>
</resources>


================================================
FILE: Camera/app/src/main/res/values/styles.xml
================================================
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

</resources>


================================================
FILE: Camera/app/src/test/java/com/example/videorecorder/ExampleUnitTest.kt
================================================
package com.example.videorecorder

import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }
}


================================================
FILE: Camera/build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.3.11'
    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0-alpha09'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


================================================
FILE: Camera/gradle/wrapper/gradle-wrapper.properties
================================================
#Mon Dec 31 22:42:36 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1-milestone-1-all.zip


================================================
FILE: Camera/gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official


================================================
FILE: Camera/gradlew
================================================
#!/usr/bin/env sh

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
    echo "$*"
}

die () {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=$((i+1))
    done
    case $i in
        (0) set -- ;;
        (1) set -- "$args0" ;;
        (2) set -- "$args0" "$args1" ;;
        (3) set -- "$args0" "$args1" "$args2" ;;
        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
  cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"


================================================
FILE: Camera/gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: Camera/settings.gradle
================================================
include ':app'


================================================
FILE: CameraX/.gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild


================================================
FILE: CameraX/.idea/codeStyles/Project.xml
================================================
<component name="ProjectCodeStyleConfiguration">
  <code_scheme name="Project" version="173">
    <JetCodeStyleSettings>
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    </JetCodeStyleSettings>
    <codeStyleSettings language="kotlin">
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    </codeStyleSettings>
  </code_scheme>
</component>

================================================
FILE: CameraX/.idea/codeStyles/codeStyleConfig.xml
================================================
<component name="ProjectCodeStyleConfiguration">
  <state>
    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
  </state>
</component>

================================================
FILE: CameraX/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

================================================
FILE: CameraX/.idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/app" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>

================================================
FILE: CameraX/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/build/classes" />
  </component>
  <component name="ProjectType">
    <option name="id" value="Android" />
  </component>
</project>

================================================
FILE: CameraX/.idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="RunConfigurationProducerService">
    <option name="ignoredProducers">
      <set>
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
      </set>
    </option>
  </component>
</project>

================================================
FILE: CameraX/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
  </component>
</project>

================================================
FILE: CameraX/app/.gitignore
================================================
/build


================================================
FILE: CameraX/app/build.gradle
================================================
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.camerax"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    // Kotlin lang
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1'

    // AndroidX libraries
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
    implementation 'androidx.core:core-ktx:1.0.1'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

    //Material Design
    implementation 'com.google.android.material:material:1.1.0-alpha05'

    // CameraX
    def camerax_version = "1.0.0-alpha01"
    implementation "androidx.camera:camera-core:${camerax_version}"
    implementation "androidx.camera:camera-camera2:${camerax_version}"

    // Unit testing
    testImplementation 'androidx.test.ext:junit:1.1.0'
    testImplementation 'androidx.test:rules:1.1.1'
    testImplementation 'androidx.test:runner:1.1.1'
    testImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    testImplementation "org.robolectric:robolectric:4.1"

    // Instrumented testing
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test:rules:1.1.1'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}


================================================
FILE: CameraX/app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: CameraX/app/src/androidTest/java/com/example/camerax/ExampleInstrumentedTest.kt
================================================
package com.example.camerax

import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
 * Instrumented test, which will execute on an Android device.
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
    @Test
    fun useAppContext() {
        // Context of the app under test.
        val appContext = InstrumentationRegistry.getTargetContext()
        assertEquals("com.example.camerax", appContext.packageName)
    }
}


================================================
FILE: CameraX/app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
          package="com.example.camerax">

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme"
            tools:ignore="GoogleAppIndexingWarning">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>

================================================
FILE: CameraX/app/src/main/java/com/example/camerax/MainActivity.kt
================================================
package com.example.camerax

import android.Manifest
import android.content.pm.PackageManager
import android.os.Bundle
import android.os.Environment
import android.util.Log
import android.util.Rational
import android.util.Size
import android.view.TextureView
import androidx.camera.core.*
import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.lifecycle.LifecycleOwner
import kotlinx.android.synthetic.main.activity_main.*
import java.io.File

val permissions = arrayOf(android.Manifest.permission.CAMERA, android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.READ_EXTERNAL_STORAGE)

class MainActivity : AppCompatActivity() {

    private val filename = "test.png"
    private val sd = Environment.getExternalStorageDirectory()
    private val dest = File(sd, filename)
    private var lensFacing = CameraX.LensFacing.BACK
    private var imageCapture: ImageCapture? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        bindCamera()

        // Takes an images and saves it in the local storage
        fab_camera.setOnClickListener {
            imageCapture?.takePicture(dest,
                object : ImageCapture.OnImageSavedListener {
                    override fun onError(error: ImageCapture.UseCaseError,
                                         message: String, exc: Throwable?) {
                        Log.e("Image", error.toString())
                    }
                    override fun onImageSaved(file: File) {
                        Log.v("Image", "Successfully saved image")
                    }
                })
        }

        // Changes the flash mode when the button is clicked
        fab_flash.setOnClickListener {
            val flashMode = imageCapture?.flashMode
            if(flashMode == FlashMode.ON) imageCapture?.flashMode = FlashMode.OFF
            else imageCapture?.flashMode = FlashMode.ON
        }

        // Changes the lens direction if the button is clicked
        fab_switch_camera.setOnClickListener {
            lensFacing = if (CameraX.LensFacing.FRONT == lensFacing) {
                CameraX.LensFacing.BACK
            } else {
                CameraX.LensFacing.FRONT
            }
            bindCamera()
        }
    }

    /**
     * Check if the app has all permissions
     */
    private fun hasNoPermissions(): Boolean{
        return ContextCompat.checkSelfPermission(this,
            Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,
            Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,
            Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED
    }

    /**
     * Request all permissions
     */
    private fun requestPermission(){
        ActivityCompat.requestPermissions(this, permissions,0)
    }

    /**
     * Bind the Camera to the lifecycle
     */
    private fun bindCamera(){
        CameraX.unbindAll()

        // Preview config for the camera
        val previewConfig = PreviewConfig.Builder()
            .setLensFacing(lensFacing)
            .build()

        val preview = Preview(previewConfig)

        // Image capture config which controls the Flash and Lens
        val imageCaptureConfig = ImageCaptureConfig.Builder()
            .setTargetRotation(windowManager.defaultDisplay.rotation)
            .setLensFacing(lensFacing)
            .setFlashMode(FlashMode.ON)
            .build()

        imageCapture = ImageCapture(imageCaptureConfig)

        // The view that displays the preview
        val textureView: TextureView = findViewById(R.id.view_finder)

        // Handles the output data of the camera
        preview.setOnPreviewOutputUpdateListener { previewOutput ->
            // Displays the camera image in our preview view
            textureView.surfaceTexture = previewOutput.surfaceTexture
        }

        // Bind the camera to the lifecycle
        CameraX.bindToLifecycle(this as LifecycleOwner, imageCapture, preview)
    }

    override fun onStart() {
        super.onStart()

        // Check and request permissions
        if (hasNoPermissions()) {
            requestPermission()
        }
    }

}


================================================
FILE: CameraX/app/src/main/res/drawable/ic_camera.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
    <path
        android:fillColor="#FF000000"
        android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
</vector>


================================================
FILE: CameraX/app/src/main/res/drawable/ic_flash.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M7,2v11h3v9l7,-12h-4l4,-8z"/>
</vector>


================================================
FILE: CameraX/app/src/main/res/drawable/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<vector
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:height="108dp"
        android:width="108dp"
        android:viewportHeight="108"
        android:viewportWidth="108">
    <path android:fillColor="#008577"
          android:pathData="M0,0h108v108h-108z"/>
    <path android:fillColor="#00000000" android:pathData="M9,0L9,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,0L19,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M29,0L29,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M39,0L39,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M49,0L49,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M59,0L59,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M69,0L69,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M79,0L79,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M89,0L89,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M99,0L99,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,9L108,9"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,19L108,19"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,29L108,29"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,39L108,39"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,49L108,49"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,59L108,59"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,69L108,69"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,79L108,79"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,89L108,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,99L108,99"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,29L89,29"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,39L89,39"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,49L89,49"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,59L89,59"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,69L89,69"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,79L89,79"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M29,19L29,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M39,19L39,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M49,19L49,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M59,19L59,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M69,19L69,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M79,19L79,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>


================================================
FILE: CameraX/app/src/main/res/drawable/ic_switch_camera.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M20,4h-3.17L15,2L9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM15,15.5L15,13L9,13v2.5L5.5,12 9,8.5L9,11h6L15,8.5l3.5,3.5 -3.5,3.5z"/>
</vector>


================================================
FILE: CameraX/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:aapt="http://schemas.android.com/aapt"
        android:width="108dp"
        android:height="108dp"
        android:viewportHeight="108"
        android:viewportWidth="108">
    <path
            android:fillType="evenOdd"
            android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
            android:strokeColor="#00000000"
            android:strokeWidth="1">
        <aapt:attr name="android:fillColor">
            <gradient
                    android:endX="78.5885"
                    android:endY="90.9159"
                    android:startX="48.7653"
                    android:startY="61.0927"
                    android:type="linear">
                <item
                        android:color="#44000000"
                        android:offset="0.0"/>
                <item
                        android:color="#00000000"
                        android:offset="1.0"/>
            </gradient>
        </aapt:attr>
    </path>
    <path
            android:fillColor="#FFFFFF"
            android:fillType="nonZero"
            android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
            android:strokeColor="#00000000"
            android:strokeWidth="1"/>
</vector>


================================================
FILE: CameraX/app/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity"
        android:orientation="vertical">

    <TextureView
            android:id="@+id/view_finder"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/fab_camera"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:fabSize="normal"
            android:src="@drawable/ic_camera"
            android:layout_alignParentBottom="true"
            android:layout_margin="32dp"
            android:layout_centerHorizontal="true"
            app:backgroundTint="@android:color/white"/>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/fab_flash"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:fabSize="normal"
            android:src="@drawable/ic_flash"
            android:layout_alignParentBottom="true"
            android:layout_margin="32dp"
            app:backgroundTint="@android:color/white"/>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/fab_switch_camera"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:fabSize="normal"
            android:src="@drawable/ic_switch_camera"
            android:layout_alignParentBottom="true"
            android:layout_margin="32dp"
            android:layout_alignParentRight="true"
            app:backgroundTint="@android:color/white"/>

</RelativeLayout>

================================================
FILE: CameraX/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

================================================
FILE: CameraX/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

================================================
FILE: CameraX/app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#008577</color>
    <color name="colorPrimaryDark">#00574B</color>
    <color name="colorAccent">#D81B60</color>
</resources>


================================================
FILE: CameraX/app/src/main/res/values/strings.xml
================================================
<resources>
    <string name="app_name">CameraX</string>
</resources>


================================================
FILE: CameraX/app/src/main/res/values/styles.xml
================================================
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

</resources>


================================================
FILE: CameraX/app/src/test/java/com/example/camerax/ExampleUnitTest.kt
================================================
package com.example.camerax

import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }
}


================================================
FILE: CameraX/build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.3.30'
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


================================================
FILE: CameraX/gradle/wrapper/gradle-wrapper.properties
================================================
#Thu May 09 11:52:47 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip


================================================
FILE: CameraX/gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.useAndroidX=true
android.enableJetifier=true


================================================
FILE: CameraX/gradlew
================================================
#!/usr/bin/env sh

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
    echo "$*"
}

die () {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=$((i+1))
    done
    case $i in
        (0) set -- ;;
        (1) set -- "$args0" ;;
        (2) set -- "$args0" "$args1" ;;
        (3) set -- "$args0" "$args1" "$args2" ;;
        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
  cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"


================================================
FILE: CameraX/gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: CameraX/settings.gradle
================================================
include ':app'


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2019 Tanner Gabriel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Nest-CRUD/.gitignore
================================================
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

================================================
FILE: Nest-CRUD/.prettierrc
================================================
{
  "singleQuote": true,
  "trailingComma": "all"
}

================================================
FILE: Nest-CRUD/README.md
================================================
# Nestjs MongoDB CRUD

Simple MongoDB CRUD example demonstrating the Nestjs application structure as well as how you can work with databases. For an in-depth explanation of the application and the basic Nestjs concepts, you can follow [this article](https://gabrieltanner.org/blog/nestjs-crashcourse).

## Requirements

- [NodeJS](https://nodejs.org/en/)
- MongoDB database

## Getting started

### Installing dependencies

First, you need to install all the needed dependencies.

```bash
$ npm install
```

### Configuring the database

Before starting the application, you will need to create a MongoDB database and edit the connection string in the `app.modules.ts` file to match your database configuration. The repository includes a Docker-Compose file that helps you start MongoDB.

```
docker-compose up
```

The default database configuration in the `app.module.ts` file looks like this:

```
@Module({
  imports: [MongooseModule.forRoot('mongodb://localhost/nest')],
})
```

If you are not running the database on your local machine, replace localhost with the correct IP-Address.

### Starting the application

After installing the dependencies, you can run the application using one of the following commands.

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

================================================
FILE: Nest-CRUD/docker-compose.yaml
================================================
version: '3.7'
services:
  mongodb:
    image: mongo:latest
    ports:
      - 27017:27017
    volumes:
      - mongodb_data:/data/db

volumes:
  mongodb_data:

================================================
FILE: Nest-CRUD/nest-cli.json
================================================
{
  "language": "ts",
  "collection": "@nestjs/schematics",
  "sourceRoot": "src"
}


================================================
FILE: Nest-CRUD/nodemon-debug.json
================================================
{
  "watch": ["src"],
  "ext": "ts",
  "ignore": ["src/**/*.spec.ts"],
  "exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts"
}


================================================
FILE: Nest-CRUD/nodemon.json
================================================
{
  "watch": ["dist"],
  "ext": "js",
  "exec": "node dist/main"
}


================================================
FILE: Nest-CRUD/package.json
================================================
{
  "name": "nest-crud",
  "version": "0.0.1",
  "description": "",
  "author": "",
  "license": "MIT",
  "scripts": {
    "build": "tsc -p tsconfig.build.json",
    "format": "prettier --write \"src/**/*.ts\"",
    "start": "ts-node -r tsconfig-paths/register src/main.ts",
    "start:dev": "concurrently --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ",
    "start:debug": "nodemon --config nodemon-debug.json",
    "prestart:prod": "rimraf dist && npm run build",
    "start:prod": "node dist/main.js",
    "lint": "tslint -p tsconfig.json -c tslint.json",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:cov": "jest --coverage",
    "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
    "test:e2e": "jest --config ./test/jest-e2e.json"
  },
  "dependencies": {
    "@nestjs/common": "8.2.6",
    "@nestjs/core": "8.2.6",
    "@nestjs/mongoose": "9.0.2",
    "@nestjs/platform-express": "8.2.6",
    "mongoose": "6.1.8",
    "reflect-metadata": "0.1.13",
    "rimraf": "3.0.2",
    "rxjs": "7.5.2"
  },
  "devDependencies": {
    "@nestjs/testing": "8.2.6",
    "@types/express": "4.17.13",
    "@types/jest": "27.4.0",
    "@types/node": "17.0.12",
    "@types/supertest": "2.0.11",
    "concurrently": "7.0.0",
    "jest": "27.4.7",
    "nodemon": "2.0.15",
    "prettier": "2.5.1",
    "supertest": "6.2.2",
    "ts-jest": "27.1.3",
    "ts-node": "10.4.0",
    "tsconfig-paths": "3.12.0",
    "tslint": "5.20.1",
    "typescript": "4.5.5",
    "wait-on": "6.0.0"
  },
  "jest": {
    "moduleFileExtensions": [
      "js",
      "json",
      "ts"
    ],
    "rootDir": "src",
    "testRegex": ".spec.ts$",
    "transform": {
      "^.+\\.(t|j)s$": "ts-jest"
    },
    "coverageDirectory": "../coverage",
    "testEnvironment": "node"
  },
  "keywords": [
    "Nestjs",
    "Typescript",
    "CRUD",
    "MongoDB"
  ]
}


================================================
FILE: Nest-CRUD/src/app.controller.spec.ts
================================================
import { Test, TestingModule } from '@nestjs/testing';
import { AppController } from './app.controller';
import { AppService } from './app.service';

describe('AppController', () => {
  let appController: AppController;

  beforeEach(async () => {
    const app: TestingModule = await Test.createTestingModule({
      controllers: [AppController],
      providers: [AppService],
    }).compile();

    appController = app.get<AppController>(AppController);
  });

  describe('root', () => {
    it('should return "Hello World!"', () => {
      expect(appController.getHello()).toBe('Hello World!');
    });
  });
});


================================================
FILE: Nest-CRUD/src/app.controller.ts
================================================
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get()
  getHello(): string {
    return this.appService.getHello();
  }
}


================================================
FILE: Nest-CRUD/src/app.module.ts
================================================
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { MongooseModule } from '@nestjs/mongoose';
import { ItemsModule } from './items/items.module';

@Module({
  imports: [MongooseModule.forRoot('mongodb://localhost/nest'), ItemsModule],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}


================================================
FILE: Nest-CRUD/src/app.service.ts
================================================
import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService {
  getHello(): string {
    return 'Hello World!';
  }
}


================================================
FILE: Nest-CRUD/src/items/dto/create-item.dto.ts
================================================
export class CreateItemDto {
  readonly name: string;
  readonly description: string;
  readonly qty: number;
}


================================================
FILE: Nest-CRUD/src/items/interfaces/item.interface.ts
================================================
import { Document } from 'mongoose';

export interface Item extends Document  {
  id?: string;
  name: string;
  description?: string;
  qty: number;
}


================================================
FILE: Nest-CRUD/src/items/item.controller.spec.ts
================================================


================================================
FILE: Nest-CRUD/src/items/items.controller.ts
================================================
import {
    Controller,
    Get,
    Post,
    Put,
    Delete,
    Body,
    Param,
  } from '@nestjs/common';
import { CreateItemDto } from './dto/create-item.dto';
import { ItemsService } from './items.service';
import { Item } from './interfaces/item.interface';

@Controller('items')
  export class ItemsController {
    constructor(private readonly itemsService: ItemsService) {}

    @Get()
    findAll(): Promise<Item[]> {
      return this.itemsService.findAll();
    }

    @Get(':id')
    findOne(@Param('id') id): Promise<Item> {
      return this.itemsService.findOne(id);
    }

    @Post()
    create(@Body() createItemDto: CreateItemDto): Promise<Item> {
      return this.itemsService.create(createItemDto);
    }

    @Delete(':id')
    delete(@Param('id') id): Promise<Item> {
      return this.itemsService.delete(id);
    }

    @Put(':id')
    update(@Body() updateItemDto: CreateItemDto, @Param('id') id): Promise<Item> {
      return this.itemsService.update(id, updateItemDto);
    }
  }


================================================
FILE: Nest-CRUD/src/items/items.module.ts
================================================

import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { ItemsController } from './items.controller';
import { ItemsService } from './items.service';
import { ItemSchema } from './schemas/item.schema';

@Module({
  imports: [MongooseModule.forFeature([{ name: 'Item', schema: ItemSchema }])],
  controllers: [ItemsController],
  providers: [ItemsService],
})
export class ItemsModule {}


================================================
FILE: Nest-CRUD/src/items/items.service.ts
================================================
import { Injectable } from '@nestjs/common';
import { Item } from './interfaces/item.interface';
import { Model } from 'mongoose';
import { InjectModel } from '@nestjs/mongoose';
import { CreateItemDto } from './dto/create-item.dto';

@Injectable()
export class ItemsService {
  constructor(@InjectModel('Item') private readonly itemModel: Model<Item>) {}

  async findAll(): Promise<Item[]> {
    return await this.itemModel.find();
  }

  async findOne(id: string): Promise<Item> {
    return await this.itemModel.findOne({ _id: id });
  }

  async create(item: CreateItemDto): Promise<Item> {
    const newItem = new this.itemModel(item);
    return await newItem.save();
  }

  async delete(id: string): Promise<Item> {
    return await this.itemModel.findByIdAndRemove(id);
  }

  async update(id: string, item: CreateItemDto): Promise<Item> {
    return await this.itemModel.findByIdAndUpdate(id, item, { new: true });
  }
}


================================================
FILE: Nest-CRUD/src/items/schemas/item.schema.ts
================================================
import * as mongoose from 'mongoose';

export const ItemSchema = new mongoose.Schema({
  name: String,
  qty: Number,
  description: String,
});


================================================
FILE: Nest-CRUD/src/main.ts
================================================
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  await app.listen(4000);
}
bootstrap();


================================================
FILE: Nest-CRUD/test/app.e2e-spec.ts
================================================
import { Test, TestingModule } from '@nestjs/testing';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';

describe('AppController (e2e)', () => {
  let app;

  beforeEach(async () => {
    const moduleFixture: TestingModule = await Test.createTestingModule({
      imports: [AppModule],
    }).compile();

    app = moduleFixture.createNestApplication();
    await app.init();
  });

  it('/ (GET)', () => {
    return request(app.getHttpServer())
      .get('/')
      .expect(200)
      .expect('Hello World!');
  });
});


================================================
FILE: Nest-CRUD/test/jest-e2e.json
================================================
{
  "moduleFileExtensions": ["js", "json", "ts"],
  "rootDir": ".",
  "testEnvironment": "node",
  "testRegex": ".e2e-spec.ts$",
  "transform": {
    "^.+\\.(t|j)s$": "ts-jest"
  }
}


================================================
FILE: Nest-CRUD/tsconfig.build.json
================================================
{
  "extends": "./tsconfig.json",
  "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}


================================================
FILE: Nest-CRUD/tsconfig.json
================================================
{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es6",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true
  },
  "exclude": ["node_modules"]
}


================================================
FILE: Nest-CRUD/tslint.json
================================================
{
  "defaultSeverity": "error",
  "extends": ["tslint:recommended"],
  "jsRules": {
    "no-unused-expression": true
  },
  "rules": {
    "quotemark": [true, "single"],
    "member-access": [false],
    "ordered-imports": [false],
    "max-line-length": [true, 150],
    "member-ordering": [false],
    "interface-name": [false],
    "arrow-parens": false,
    "object-literal-sort-keys": false
  },
  "rulesDirectory": []
}


================================================
FILE: NestVueChat/.gitignore
================================================
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

================================================
FILE: NestVueChat/.prettierrc
================================================
{
  "singleQuote": true,
  "trailingComma": "all"
}

================================================
FILE: NestVueChat/README.md
================================================
# Nestjs file uploading

Nestjs Vue real-time chat, which utilizes Websockets to implement real-time communication in Nestjs. For an in-depth explanation of the application, you can follow [this article](https://gabrieltanner.org/blog/nestjs-realtime-chat).

## Requirements

- [NodeJS](https://nodejs.org/en/)

## Getting started

### Installing dependencies

First, you need to install all the needed dependencies.

```bash
$ npm install
```

### Starting the application

After installing the dependencies, you can run the application using one of the following commands.

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Testing the application

After starting the application, you should see our layout when visiting http://localhost:3000 in your browser. After opening the application in multiple browser windows, you can test the functionality. 

================================================
FILE: NestVueChat/nest-cli.json
================================================
{
  "language": "ts",
  "collection": "@nestjs/schematics",
  "sourceRoot": "src"
}


================================================
FILE: NestVueChat/nodemon-debug.json
================================================
{
  "watch": ["src"],
  "ext": "ts",
  "ignore": ["src/**/*.spec.ts"],
  "exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts"
}


================================================
FILE: NestVueChat/nodemon.json
================================================
{
  "watch": ["dist"],
  "ext": "js",
  "exec": "node dist/main"
}


================================================
FILE: NestVueChat/package.json
================================================
{
  "name": "backend",
  "version": "0.0.1",
  "description": "",
  "author": "",
  "license": "MIT",
  "scripts": {
    "build": "tsc -p tsconfig.build.json",
    "format": "prettier --write \"src/**/*.ts\"",
    "start": "ts-node -r tsconfig-paths/register src/main.ts",
    "start:dev": "concurrently --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ",
    "start:debug": "nodemon --config nodemon-debug.json",
    "prestart:prod": "rimraf dist && npm run build",
    "start:prod": "node dist/main.js",
    "lint": "tslint -p tsconfig.json -c tslint.json",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:cov": "jest --coverage",
    "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
    "test:e2e": "jest --config ./test/jest-e2e.json"
  },
  "dependencies": {
    "@nestjs/common": "8.2.6",
    "@nestjs/core": "8.2.6",
    "@nestjs/platform-express": "8.2.6",
    "@nestjs/platform-socket.io": "8.2.6",
    "@nestjs/websockets": "8.2.6",
    "reflect-metadata": "0.1.13",
    "rimraf": "3.0.2",
    "rxjs": "7.5.2"
  },
  "devDependencies": {
    "@nestjs/testing": "8.2.6",
    "@types/express": "4.17.13",
    "@types/jest": "27.4.0",
    "@types/node": "17.0.12",
    "@types/socket.io": "3.0.1",
    "@types/supertest": "2.0.11",
    "concurrently": "7.0.0",
    "jest": "27.4.7",
    "nodemon": "2.0.15",
    "prettier": "2.5.1",
    "supertest": "6.2.2",
    "ts-jest": "27.1.3",
    "ts-node": "10.4.0",
    "tsconfig-paths": "3.12.0",
    "tslint": "5.20.1",
    "typescript": "4.5.5",
    "wait-on": "6.0.0"
  },
  "jest": {
    "moduleFileExtensions": [
      "js",
      "json",
      "ts"
    ],
    "rootDir": "src",
    "testRegex": ".spec.ts$",
    "transform": {
      "^.+\\.(t|j)s$": "ts-jest"
    },
    "coverageDirectory": "../coverage",
    "testEnvironment": "node"
  },
  "keywords": [
    "Nestjs",
    "Typescript",
    "Chat application",
    "Nestjs Chat",
    "Websockets",
    "Nestjs Websockets"
  ]
}


================================================
FILE: NestVueChat/src/app.gateway.ts
================================================
import {
  SubscribeMessage,
  WebSocketGateway,
  OnGatewayInit,
  WebSocketServer,
  OnGatewayConnection,
  OnGatewayDisconnect,
} from '@nestjs/websockets';
import { Logger } from '@nestjs/common';
import { Socket, Server } from 'socket.io';

@WebSocketGateway({
  cors: {
    origin: '*',
  },
})
export class AppGateway
  implements OnGatewayInit, OnGatewayConnection, OnGatewayDisconnect {
  @WebSocketServer() server: Server;

  private logger: Logger = new Logger('AppGateway');

  @SubscribeMessage('msgToServer')
  handleMessage(client: Socket, payload: string): void {
    this.server.emit('msgToClient', payload);
  }

  afterInit(server: Server) {
    this.logger.log('Init');
  }

  handleDisconnect(client: Socket) {
    this.logger.log(`Client disconnected: ${client.id}`);
  }

  handleConnection(client: Socket, ...args: any[]) {
    this.logger.log(`Client connected: ${client.id}`);
  }
}


================================================
FILE: NestVueChat/src/app.module.ts
================================================
import { Module } from '@nestjs/common';
import { AppGateway } from './app.gateway';

@Module({
  imports: [],
  controllers: [],
  providers: [AppGateway],
})
export class AppModule {}


================================================
FILE: NestVueChat/src/main.ts
================================================
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { NestExpressApplication } from '@nestjs/platform-express';
import { join } from 'path';

async function bootstrap() {
  const app = await NestFactory.create<NestExpressApplication>(AppModule);
  app.useStaticAssets(join(__dirname, '..', 'static'));
  await app.listen(3000);
}
bootstrap();


================================================
FILE: NestVueChat/static/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
    <title>Nestjs SocketIO</title>
    <link rel="stylesheet" href="styles.css">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="https://cdn.socket.io/4.3.2/socket.io.min.js" integrity="sha384-KAZ4DtjNhLChOB/hxXuKqhMLYvx3b5MlT55xPEiNmREKRzeEm+RVPlTnAn0ajQNs" crossorigin="anonymous"></script>
</head>
<body>
    <div id="app" class="container">
            <div class="row">
                <div class="col-md-6 offset-md-3 col-sm-12">
                    <h1 class="text-center">{{ title }}</h1>
                    <br>
                    <div id="status"></div>
                    <div id="chat">
                        <input type="text" v-model="name" id="username" class="form-control" placeholder="Enter name...">
                        <br>
                        <div class="card">
                            <div id="messages" class="card-block">
                                <ul>
                                    <li v-for="message of messages">{{ message.name }}: {{ message.text }}</li>
                                </ul>
                            </div>
                        </div>
                        <br>
                        <textarea id="textarea" class="form-control" v-model="text" placeholder="Enter message..."></textarea>
                        <br>
                        <button id="send" class="btn" @click.prevent="sendMessage">Send</button>
                    </div>
                </div>
            </div>
    </div>

    <script src="main.js"></script>
</body>
</html>

================================================
FILE: NestVueChat/static/main.js
================================================
const app = new Vue({
    el: '#app',
    data: {
        title: 'Nestjs Websockets Chat',
        name: '',
        text: '',
        messages: [],
        socket: null
    },
    methods: {
        sendMessage() {
            if(this.validateInput()) {
                const message = {
                    name: this.name,
                    text: this.text
                }
                this.socket.emit('msgToServer', message)
                this.text = ''
            }
        },
        receivedMessage(message) {
            this.messages.push(message)
        },
        validateInput() {
            return this.name.length > 0 && this.text.length > 0
        }
    },
    created() {
        this.socket = io('http://localhost:3000')
        this.socket.on('msgToClient', (message) => {
            this.receivedMessage(message)
        })
    }
})

================================================
FILE: NestVueChat/static/styles.css
================================================
#messages{
    height:300px;
    overflow-y: scroll;
}

#app {
    margin-top: 2rem;
}

================================================
FILE: NestVueChat/test/app.e2e-spec.ts
================================================
import { Test, TestingModule } from '@nestjs/testing';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';

describe('AppController (e2e)', () => {
  let app;

  beforeEach(async () => {
    const moduleFixture: TestingModule = await Test.createTestingModule({
      imports: [AppModule],
    }).compile();

    app = moduleFixture.createNestApplication();
    await app.init();
  });

  it('/ (GET)', () => {
    return request(app.getHttpServer())
      .get('/')
      .expect(200)
      .expect('Hello World!');
  });
});


================================================
FILE: NestVueChat/test/jest-e2e.json
================================================
{
  "moduleFileExtensions": ["js", "json", "ts"],
  "rootDir": ".",
  "testEnvironment": "node",
  "testRegex": ".e2e-spec.ts$",
  "transform": {
    "^.+\\.(t|j)s$": "ts-jest"
  }
}


================================================
FILE: NestVueChat/tsconfig.build.json
================================================
{
  "extends": "./tsconfig.json",
  "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}


================================================
FILE: NestVueChat/tsconfig.json
================================================
{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es6",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true
  },
  "exclude": ["node_modules"]
}


================================================
FILE: NestVueChat/tslint.json
================================================
{
  "defaultSeverity": "error",
  "extends": ["tslint:recommended"],
  "jsRules": {
    "no-unused-expression": true
  },
  "rules": {
    "quotemark": [true, "single"],
    "member-access": [false],
    "ordered-imports": [false],
    "max-line-length": [true, 150],
    "member-ordering": [false],
    "interface-name": [false],
    "arrow-parens": false,
    "object-literal-sort-keys": false
  },
  "rulesDirectory": []
}


================================================
FILE: Notifications/.gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild


================================================
FILE: Notifications/.idea/codeStyles/Project.xml
================================================
<component name="ProjectCodeStyleConfiguration">
  <code_scheme name="Project" version="173">
    <JetCodeStyleSettings>
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    </JetCodeStyleSettings>
    <codeStyleSettings language="kotlin">
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    </codeStyleSettings>
  </code_scheme>
</component>

================================================
FILE: Notifications/.idea/codeStyles/codeStyleConfig.xml
================================================
<component name="ProjectCodeStyleConfiguration">
  <state>
    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
  </state>
</component>

================================================
FILE: Notifications/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

================================================
FILE: Notifications/.idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/app" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>

================================================
FILE: Notifications/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/build/classes" />
  </component>
  <component name="ProjectType">
    <option name="id" value="Android" />
  </component>
</project>

================================================
FILE: Notifications/.idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="RunConfigurationProducerService">
    <option name="ignoredProducers">
      <set>
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
      </set>
    </option>
  </component>
</project>

================================================
FILE: Notifications/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
  </component>
</project>

================================================
FILE: Notifications/app/.gitignore
================================================
/build


================================================
FILE: Notifications/app/build.gradle
================================================
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.notifications"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation "com.android.support:support-compat:28.0.0"
}


================================================
FILE: Notifications/app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: Notifications/app/src/androidTest/java/com/example/notifications/ExampleInstrumentedTest.kt
================================================
package com.example.notifications

import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
 * Instrumented test, which will execute on an Android device.
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
    @Test
    fun useAppContext() {
        // Context of the app under test.
        val appContext = InstrumentationRegistry.getTargetContext()
        assertEquals("com.example.notifications", appContext.packageName)
    }
}


================================================
FILE: Notifications/app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.notifications">

    <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>

================================================
FILE: Notifications/app/src/main/java/com/example/notifications/MainActivity.kt
================================================
package com.example.notifications

import android.app.Notification.VISIBILITY_PUBLIC
import android.os.Build
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v4.app.NotificationCompat
import android.support.v4.app.NotificationManagerCompat
import kotlinx.android.synthetic.main.activity_main.*
import android.R.attr.name
import android.annotation.SuppressLint
import android.annotation.TargetApi
import android.app.Notification.VISIBILITY_PRIVATE
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.graphics.BitmapFactory
import android.os.HandlerThread
import android.support.annotation.RequiresApi
import android.widget.RemoteViews


class MainActivity : AppCompatActivity() {

    private val CHANNEL_ID = "CHANNEL_ID"

    @SuppressLint("NewApi")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        createNotificationChannel()

        default_notification_btn.setOnClickListener {
            createNormalNotification()
        }

        head_up_notification_btn.setOnClickListener {
            createHeadsUpNotification()
        }

        lock_screen_notification_btn.setOnClickListener {
            createLockScreenNotification()
        }

        notification_badged.setOnClickListener {
            createBadgedNotification()
        }

        notification_click_action_btn.setOnClickListener {
            createNotificationWithClickAction()
        }

        notification_action_button_btn.setOnClickListener {
            createNotificationWithActionButtons()
        }

        expandable_notification.setOnClickListener {
            createExpandableNotification()
        }

        progress_bar_notification.setOnClickListener {
            createProgressBarNotification()
        }

        group_notification.setOnClickListener {
            createGroupNotification()
        }

        custom_notification.setOnClickListener {
            createCustomNotification()
        }
    }

    // Creates a standard notification
    fun createNormalNotification(){
        val builder = NotificationCompat.Builder(this, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setContentTitle("Normal Notification")
            .setContentText("Really great content for this notification")
            .setPriority(NotificationCompat.PRIORITY_DEFAULT)

        createNotification(0, builder)
    }

    // Creates a headup notification
    fun createHeadsUpNotification(){
        val builder = NotificationCompat.Builder(this, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setContentTitle("Heads up notification")
            .setContentText("Really great content for this notification")
            .setPriority(NotificationCompat.PRIORITY_HIGH)

        if (Build.VERSION.SDK_INT >= 21) builder.setVibrate(LongArray(0))

        createNotification(1, builder)
    }

    // Create a notification which will be visible on the lockscreen
    @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
    fun createLockScreenNotification(){
        val publicBuilder = NotificationCompat.Builder(this, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setContentTitle("Alternative notification")
            .setPriority(NotificationCompat.PRIORITY_HIGH)
            .setVisibility(VISIBILITY_PUBLIC)

        val builder = NotificationCompat.Builder(this, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setContentTitle("Lock screen Notification")
            .setContentText("Really great content for this notification")
            .setPriority(NotificationCompat.PRIORITY_DEFAULT)
            .setVisibility(VISIBILITY_PRIVATE)
            .setPublicVersion(publicBuilder.build())

        createNotification(2, builder)
    }

    // Create a notification which shows a badged on newer android versions
    fun createBadgedNotification(){
        val builder = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)
            .setContentTitle("Badged Notification")
            .setContentText("New badged notification")
            .setSmallIcon(R.drawable.notification_icon)
            .setBadgeIconType(NotificationCompat.BADGE_ICON_SMALL)

        createNotification(3, builder)
    }

    // Create a notification with a click event
    fun createNotificationWithClickAction(){
        val intent = Intent(this, MainActivity::class.java).apply {
            flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
        }

        val pendingIntent: PendingIntent = PendingIntent.getActivity(this, 0, intent, 0)

        val builder = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)
            .setContentTitle("Notification with click action")
            .setContentText("New notification with great click action")
            .setSmallIcon(R.drawable.notification_icon)
            .setBadgeIconType(NotificationCompat.BADGE_ICON_SMALL)
            .setContentIntent(pendingIntent)
            .setAutoCancel(true)

        createNotification(4, builder)
    }

    // Create a notification with an action button
    fun createNotificationWithActionButtons(){
        val intent = Intent(this, MainActivity::class.java).apply {
            flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
        }

        val pendingIntent: PendingIntent = PendingIntent.getActivity(this, 0, intent, 0)

        val builder = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)
            .setContentTitle("Notification with click action")
            .setContentText("New notification with great click action")
            .setSmallIcon(R.drawable.notification_icon)
            .setBadgeIconType(NotificationCompat.BADGE_ICON_SMALL)
            .addAction(R.drawable.notification_icon, "Open Activity",
                pendingIntent)

        createNotification(5, builder)
    }

    // Create a notification that can be expanded for more information
    fun createExpandableNotification(){
        val bitmap = BitmapFactory.decodeResource(resources, R.drawable.notification_icon)

        val builder = NotificationCompat.Builder(this, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setContentTitle("Simple expandable notification")
            .setContentText("Simple notification that can be expended ")
            .setLargeIcon(bitmap)
            .setStyle(NotificationCompat.BigPictureStyle()
                .bigPicture(bitmap)
                .bigLargeIcon(null))

        /* Add large text
        .setStyle(NotificationCompat.BigTextStyle()
                .bigText("Some great big text")
         */

        createNotification(6, builder)
    }

    // Create a notification with a simple progress bar
    fun createProgressBarNotification(){
        val builder = NotificationCompat.Builder(this, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setContentTitle("Simple progress bar notification")
            .setContentText("Simple notification with a progress bar ")

        // Progress values
        val PROGRESS_MAX = 100
        val PROGRESS_CURRENT = 0

        NotificationManagerCompat.from(this).apply {
            // Sets the initial progress to 0
            builder.setProgress(PROGRESS_MAX, PROGRESS_CURRENT, false)
            notify(7 , builder.build())

            for(i in 0 until 100){
                builder.setProgress(PROGRESS_MAX, i, false)
                HandlerThread.sleep(100)
            }

            // Updates the notification when the progress is done
            builder.setContentText("Download complete")
                .setProgress(0, 0, false)
            notify(7, builder.build())
        }
    }

    val GROUP_KEY = "com.android.example.KEY"

    // Create a simple group notification
    fun createGroupNotification(){
        val groupBuilderOne = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setContentTitle("Simple group notification")
            .setContentText("Simple notification group")
            .setGroup(GROUP_KEY)

        val groupBuilderTwo = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setContentTitle("Second simple group notification")
            .setContentText("Simple notification group")
            .setGroup(GROUP_KEY)

        // For older versions than 7.0
        val summaryNotification = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)
            .setContentTitle("Notification group summary")
            .setContentText("Notification group summary")
            .setSmallIcon(R.drawable.notification_icon)
            .setGroup(GROUP_KEY)
            .setGroupSummary(true)


        createNotification(8, groupBuilderOne)
        createNotification(9, groupBuilderTwo)
        createNotification(10, summaryNotification)
    }

    fun createCustomNotification(){
        // Get the layouts to use in the custom notification
        val notificationLayout = RemoteViews(packageName, R.layout.custom_notification_layout)
        val notificationLayoutExpanded = RemoteViews(packageName, R.layout.custom_notification_expended_layout)

        notificationLayout.setTextViewText(R.id.notification_title, "Title")
        notificationLayout.setTextViewText(R.id.notification_info, "Expand for more information")

        // Apply the layouts to the notification
        val customNotification = NotificationCompat.Builder(this, CHANNEL_ID)
            .setSmallIcon(R.drawable.notification_icon)
            .setStyle(NotificationCompat.DecoratedCustomViewStyle())
            .setCustomContentView(notificationLayout)
            .setCustomBigContentView(notificationLayoutExpanded)

        createNotification(11, customNotification)
    }

    // Creates the notification and displays it
    fun createNotification(id: Int, builder: NotificationCompat.Builder){
        with(NotificationManagerCompat.from(this)) {
            notify(id, builder.build())
        }
    }

    // Create the notification channel
    private fun createNotificationChannel() {
        // Create the NotificationChannel, but only on API 26+ because
        // the NotificationChannel class is new and not in the support library
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            val name = "Channel"
            val descriptionText = "Simple channel example"
            val importance = NotificationManager.IMPORTANCE_DEFAULT
            val channel = NotificationChannel(CHANNEL_ID, name, importance).apply {
                description = descriptionText
                //setShowBadge(false)
            }
            // Register the channel with the system
            val notificationManager: NotificationManager =
                getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
            notificationManager.createNotificationChannel(channel)
        }
    }

}


================================================
FILE: Notifications/app/src/main/res/drawable/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<vector
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:height="108dp"
        android:width="108dp"
        android:viewportHeight="108"
        android:viewportWidth="108">
    <path android:fillColor="#008577"
          android:pathData="M0,0h108v108h-108z"/>
    <path android:fillColor="#00000000" android:pathData="M9,0L9,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,0L19,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M29,0L29,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M39,0L39,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M49,0L49,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M59,0L59,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M69,0L69,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M79,0L79,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M89,0L89,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M99,0L99,108"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,9L108,9"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,19L108,19"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,29L108,29"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,39L108,39"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,49L108,49"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,59L108,59"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,69L108,69"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,79L108,79"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,89L108,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M0,99L108,99"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,29L89,29"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,39L89,39"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,49L89,49"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,59L89,59"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,69L89,69"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,79L89,79"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M29,19L29,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M39,19L39,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M49,19L49,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M59,19L59,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M69,19L69,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M79,19L79,89"
          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>


================================================
FILE: Notifications/app/src/main/res/drawable/notification_icon.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M6,18c0,0.55 0.45,1 1,1h1v3.5c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5L11,19h2v3.5c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5L16,19h1c0.55,0 1,-0.45 1,-1L18,8L6,8v10zM3.5,8C2.67,8 2,8.67 2,9.5v7c0,0.83 0.67,1.5 1.5,1.5S5,17.33 5,16.5v-7C5,8.67 4.33,8 3.5,8zM20.5,8c-0.83,0 -1.5,0.67 -1.5,1.5v7c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5v-7c0,-0.83 -0.67,-1.5 -1.5,-1.5zM15.53,2.16l1.3,-1.3c0.2,-0.2 0.2,-0.51 0,-0.71 -0.2,-0.2 -0.51,-0.2 -0.71,0l-1.48,1.48C13.85,1.23 12.95,1 12,1c-0.96,0 -1.86,0.23 -2.66,0.63L7.85,0.15c-0.2,-0.2 -0.51,-0.2 -0.71,0 -0.2,0.2 -0.2,0.51 0,0.71l1.31,1.31C6.97,3.26 6,5.01 6,7h12c0,-1.99 -0.97,-3.75 -2.47,-4.84zM10,5L9,5L9,4h1v1zM15,5h-1L14,4h1v1z"/>
</vector>


================================================
FILE: Notifications/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:aapt="http://schemas.android.com/aapt"
        android:width="108dp"
        android:height="108dp"
        android:viewportHeight="108"
        android:viewportWidth="108">
    <path
            android:fillType="evenOdd"
            android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
            android:strokeColor="#00000000"
            android:strokeWidth="1">
        <aapt:attr name="android:fillColor">
            <gradient
                    android:endX="78.5885"
                    android:endY="90.9159"
                    android:startX="48.7653"
                    android:startY="61.0927"
                    android:type="linear">
                <item
                        android:color="#44000000"
                        android:offset="0.0"/>
                <item
                        android:color="#00000000"
                        android:offset="1.0"/>
            </gradient>
        </aapt:attr>
    </path>
    <path
            android:fillColor="#FFFFFF"
            android:fillType="nonZero"
            android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
            android:strokeColor="#00000000"
            android:strokeWidth="1"/>
</vector>


================================================
FILE: Notifications/app/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity"
        >
    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

        <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/default_notification_btn"
                android:layout_marginStart="8dp"
                android:layout_marginRight="8dp"
                android:layout_marginTop="8dp"
                android:text="default notification" android:layout_marginLeft="8dp"/>
        <Button
                android:text="Head up"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/head_up_notification_btn" android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp"
                android:layout_marginLeft="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"/>

        <Button
                android:text="Lockscreen"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/lock_screen_notification_btn" android:layout_marginLeft="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp" android:layout_marginTop="8dp"/>

        <Button
                android:text="Click action"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/notification_click_action_btn" android:layout_marginLeft="8dp"
                android:layout_marginStart="8dp" android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp" android:layout_marginTop="8dp"
        />
        <Button
                android:text="Action Button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/notification_action_button_btn" android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp" android:layout_marginLeft="8dp" android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"/>
        <Button
                android:text="Badged"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/notification_badged" app:layout_constraintEnd_toEndOf="parent"
                android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp" app:layout_constraintStart_toStartOf="parent"
                android:layout_marginLeft="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
        />

        <Button
                android:text="expandable"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/expandable_notification"
                android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp"
                android:layout_marginLeft="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"/>

        <Button
                android:text="progress_bar"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/progress_bar_notification"
                android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp"
                android:layout_marginLeft="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"/>

        <Button
                android:text="group notification"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/group_notification"
                android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp"
                android:layout_marginLeft="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"/>

        <Button
                android:text="Custom notification"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/custom_notification"
                android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp"
                android:layout_marginLeft="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"/>
    </LinearLayout>
</ScrollView>

================================================
FILE: Notifications/app/src/main/res/layout/custom_notification_expended_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="256dp"
              android:orientation="vertical">

    <TextView
            android:id="@+id/notification_expanded_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Expended notification"
            style="@style/TextAppearance.Compat.Notification.Title" />

    <TextView
            android:id="@+id/notification_expanded_info"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Expand notification informations"
            style="@style/TextAppearance.Compat.Notification.Info" />

    <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/ic_launcher_background"/>
</LinearLayout>

================================================
FILE: Notifications/app/src/main/res/layout/custom_notification_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical">

    <TextView
            android:id="@+id/notification_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            style="@style/TextAppearance.Compat.Notification.Title" />

    <TextView
            android:id="@+id/notification_info"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            style="@style/TextAppearance.Compat.Notification.Info" />
</LinearLayout>

================================================
FILE: Notifications/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

================================================
FILE: Notifications/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

================================================
FILE: Notifications/app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#008577</color>
    <color name="colorPrimaryDark">#00574B</color>
    <color name="colorAccent">#D81B60</color>
</resources>


================================================
FILE: Notifications/app/src/main/res/values/strings.xml
================================================
<resources>
    <string name="app_name">Notifications</string>
</resources>


================================================
FILE: Notifications/app/src/main/res/values/styles.xml
================================================
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

</resources>


================================================
FILE: Notifications/app/src/test/java/com/example/notifications/ExampleUnitTest.kt
================================================
package com.example.notifications

import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }
}


================================================
FILE: Notifications/build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.3.21'
    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


================================================
FILE: Notifications/gradle/wrapper/gradle-wrapper.properties
================================================
#Sat Apr 20 11:00:18 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip


================================================
FILE: Notifications/gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official


================================================
FILE: Notifications/gradlew
================================================
#!/usr/bin/env sh

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
    echo "$*"
}

die () {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=$((i+1))
    done
    case $i in
        (0) set -- ;;
        (1) set -- "$args0" ;;
        (2) set -- "$args0" "$args1" ;;
        (3) set -- "$args0" "$args1" "$args2" ;;
        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
  cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"


================================================
FILE: Notifications/gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: Notifications/settings.gradle
================================================
include ':app'


================================================
FILE: README.md
================================================
# Blog

List of all projects in the repository:

- [Nestjs GraphQL Server](nest-graph-ql)
- [Nestjs File uploading](nest-file-uploading)
- [Nestjs MongoDB CRUD](Nest-CRUD)
- [Nestjs Websocket Chat](NestVueChat)
- [Nuxt Ghost Blog](nuxt-ghost)
- [Prisma CRUD](prisma-crud)
- [Android Notifications](Notifications)
- [Android Camera](Camera)
- [Android CameraX](CameraX)
- [Nestjs Typeorm](nestjs-typeorm)
- [Nestjs Authentication](nest-auth)
- [Express Authentication Boilerplate](express-auth-boilerplate)

## Author

Gabriel Tanner

## Support me

<a href="https://www.buymeacoffee.com/gabrieltanner" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details


================================================
FILE: nest-auth/.dockerignore
================================================
/dist
/node_modules

================================================
FILE: nest-auth/.gitignore
================================================
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

================================================
FILE: nest-auth/.prettierrc
================================================
{
  "singleQuote": true,
  "trailingComma": "all"
}

================================================
FILE: nest-auth/Dockerfile
================================================
FROM node:12

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm ci

COPY . .

RUN npm run build

EXPOSE 3000

CMD [ "npm", "start" ]

================================================
FILE: nest-auth/README.md
================================================
<p align="center">
  <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
</p>

[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
[travis-url]: https://travis-ci.org/nestjs/nest
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
[linux-url]: https://travis-ci.org/nestjs/nest
  
  <p align="center">A progressive <a href="http://nodejs.org" target="blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
    <p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
  <a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a>
  <a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
  <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

## Description

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.

## Installation

```bash
$ npm install
```

## Running the app

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Test

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

  Nest is [MIT licensed](LICENSE).


================================================
FILE: nest-auth/docker-compose.yml
================================================
version: '3'

services:
  nodejs:
    build:
      context: ./
      dockerfile: Dockerfile
    container_name: nodejs
    restart: always
    environment:
      - DATABASE_HOST=mongo
      - PORT=3000
    ports:
      - '3000:3000'
    depends_on: [mongo]
  mongo:
    container_name: mongo
    image: mongo
    ports:
      - '27017:27017'
    volumes:
      - mongo_data:/data/db

volumes:
  mongo_data: {}


================================================
FILE: nest-auth/nest-cli.json
================================================
{
  "language": "ts",
  "collection": "@nestjs/schematics",
  "sourceRoot": "src"
}


================================================
FILE: nest-auth/nodemon-debug.json
================================================
{
  "watch": ["src"],
  "ext": "ts",
  "ignore": ["src/**/*.spec.ts"],
  "exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts"
}


================================================
FILE: nest-auth/nodemon.json
================================================
{
  "watch": ["dist"],
  "ext": "js",
  "exec": "node dist/main"
}


================================================
FILE: nest-auth/package.json
================================================
{
  "name": "nest-auth",
  "version": "0.0.1",
  "description": "",
  "author": "",
  "license": "MIT",
  "scripts": {
    "build": "tsc -p tsconfig.build.json",
    "format": "prettier --write \"src/**/*.ts\"",
    "start": "ts-node -r tsconfig-paths/register src/main.ts",
    "start:dev": "concurrently --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ",
    "start:debug": "nodemon --config nodemon-debug.json",
    "prestart:prod": "rimraf dist && npm run build",
    "start:prod": "node dist/main.js",
    "lint": "tslint -p tsconfig.json -c tslint.json",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:cov": "jest --coverage",
    "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
    "test:e2e": "jest --config ./test/jest-e2e.json"
  },
  "dependencies": {
    "@nestjs/common": "8.2.6",
    "@nestjs/core": "8.2.6",
    "@nestjs/mongoose": "9.0.2",
    "@nestjs/passport": "8.1.0",
    "@nestjs/platform-express": "8.2.6",
    "bcrypt": "5.0.1",
    "dotenv": "14.3.2",
    "jsonwebtoken": "8.5.1",
    "mongoose": "6.1.8",
    "passport": "0.5.2",
    "passport-jwt": "4.0.0",
    "reflect-metadata": "0.1.13",
    "rimraf": "3.0.2",
    "rxjs": "7.5.2"
  },
  "devDependencies": {
    "@nestjs/testing": "8.2.6",
    "@types/express": "4.17.13",
    "@types/jest": "27.4.0",
    "@types/jsonwebtoken": "8.5.8",
    "@types/mongoose": "5.11.96",
    "@types/node": "17.0.12",
    "@types/passport-local-mongoose": "6.1.0",
    "@types/supertest": "2.0.11",
    "concurrently": "7.0.0",
    "jest": "27.4.7",
    "nodemon": "2.0.15",
    "prettier": "2.5.1",
    "supertest": "6.2.2",
    "ts-jest": "27.1.3",
    "ts-node": "10.4.0",
    "tsconfig-paths": "3.12.0",
    "tslint": "5.20.1",
    "typescript": "4.5.5",
    "wait-on": "6.0.0"
  },
  "jest": {
    "moduleFileExtensions": [
      "js",
      "json",
      "ts"
    ],
    "rootDir": "src",
    "testRegex": ".spec.ts$",
    "transform": {
      "^.+\\.(t|j)s$": "ts-jest"
    },
    "coverageDirectory": "../coverage",
    "testEnvironment": "node"
  },
  "keywords": [
    "Nestjs",
    "Typescript",
    "Authentification",
    "Passport",
    "JWT"
  ]
}

================================================
FILE: nest-auth/src/app.controller.ts
================================================
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get()
  getHello(): string {
    return this.appService.getHello();
  }
}


================================================
FILE: nest-auth/src/app.module.ts
================================================
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './user/user.module';
import { MongooseModule } from '@nestjs/mongoose';
import { AuthModule } from './auth/auth.module';

@Module({
  imports: [
    UserModule,
    MongooseModule.forRoot(`mongodb://${process.env.DATABASE_HOST}/nestauth`),
    AuthModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}


================================================
FILE: nest-auth/src/app.service.ts
================================================
import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService {
  getHello(): string {
    return 'Hello World!';
  }
}


================================================
FILE: nest-auth/src/auth/auth.controller.ts
================================================
import { Controller, Post, Body, Get, UseGuards } from '@nestjs/common';
import { UserService } from '../user/user.service';
import { AuthService } from './auth.service';
import { LoginUserDto } from '../user/dto/login-user.dto';
import { AuthGuard } from '@nestjs/passport';
import { Payload } from '../types/payload';
import { CreateUserDto } from '../user/dto/create-user.dto';

@Controller('auth')
export class AuthController {
    constructor(private userService: UserService, private authService: AuthService) {}

    @Get()
    @UseGuards(AuthGuard('jwt'))
    tempAuth() {
        return {auth: 'works'};
    }

    @Post('login')
    async login(@Body() userDTO: LoginUserDto) {
        const user = await this.userService.findByLogin(userDTO);
        const payload: Payload = {
            email: user.email,
        };

        const token = await this.authService.signPayload(payload);
        return { user, token };
    }

    @Post('register')
    async register(@Body() userDTO: CreateUserDto) {
        const user = await this.userService.create(userDTO);

        const payload: Payload = {
            email: user.email,
        };

        const token = await this.authService.signPayload(payload);
        return { user, token };
    }
}


================================================
FILE: nest-auth/src/auth/auth.module.ts
================================================
import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { AuthController } from './auth.controller';
import { UserModule } from '../user/user.module';
import { JwtStrategy } from './jwt.strategy';

@Module({
  imports: [UserModule],
  providers: [AuthService, JwtStrategy],
  controllers: [AuthController],
})
export class AuthModule {}


================================================
FILE: nest-auth/src/auth/auth.service.ts
================================================
import { Injectable } from '@nestjs/common';
import { UserService } from '../user/user.service';
import { Payload } from 'src/types/payload';
import { sign } from 'jsonwebtoken';

@Injectable()
export class AuthService {
    constructor(private userService: UserService) {}

    async signPayload(payload: Payload) {
        return sign(payload, 'secretKey', { expiresIn: '12h' });
    }

    async validateUser(payload: Payload) {
        return await this.userService.findByPayload(payload);
    }
}


================================================
FILE: nest-auth/src/auth/jwt.strategy.ts
================================================
import { Injectable, HttpException, HttpStatus } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport';
import { Strategy, ExtractJwt, VerifiedCallback } from 'passport-jwt';
import { AuthService } from './auth.service';
import 'dotenv/config'

@Injectable()
export class JwtStrategy extends PassportStrategy(Strategy) {
    constructor(private authService: AuthService) {
        super({
            jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
            secretOrKey: process.env.SECRET_KEY,
        });
    }

    async validate(payload: any, done: VerifiedCallback) {
        const user = await this.authService.validateUser(payload);
        if (!user) {
            return done(
                new HttpException('Unauthorized access', HttpStatus.UNAUTHORIZED),
                false,
            );
        }

        return done(null, user, payload.iat);
    }
}


================================================
FILE: nest-auth/src/main.ts
================================================
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.enableCors();
  await app.listen(process.env.PORT);
}
bootstrap();


================================================
FILE: nest-auth/src/models/user.schema.ts
================================================
import * as mongoose from 'mongoose';
import * as bcrypt from 'bcrypt';

export const UserSchema = new mongoose.Schema({
    email: {
        type: String,
        unique: true,
        required: true,
    },
    password: {
        type: String,
        required: true,
    },
});

UserSchema.pre('save', async function(next: mongoose.HookNextFunction) {
    try {
        if (!this.isModified('password')) {
        return next();
        }
        // tslint:disable-next-line: no-string-literal
        const hashed = await bcrypt.hash(this['password'], 10);
        // tslint:disable-next-line: no-string-literal
        this['password'] = hashed;
        return next();
    } catch (err) {
        return next(err);
    }
});


================================================
FILE: nest-auth/src/types/payload.ts
================================================
export interface Payload {
    email: string;
    expiresIn?: string;
}


================================================
FILE: nest-auth/src/types/user.ts
================================================
import { Document } from 'mongoose';

export interface User extends Document {
    readonly email: string;
    readonly password: string;
}


================================================
FILE: nest-auth/src/user/dto/create-user.dto.ts
================================================
export class CreateUserDto {
    readonly email: string;
    readonly password: string;
}


================================================
FILE: nest-auth/src/user/dto/login-user.dto.ts
================================================
export class LoginUserDto {
    readonly email: string;
    readonly password: string;
}


================================================
FILE: nest-auth/src/user/user.module.ts
================================================
import { Module } from '@nestjs/common';
import { UserService } from './user.service';
import { UserSchema } from '../models/user.schema';
import { MongooseModule } from '@nestjs/mongoose';

@Module({
  imports: [MongooseModule.forFeature([{name: 'User', schema: UserSchema}])],
  providers: [UserService],
  controllers: [],
  exports: [UserService, MongooseModule.forFeature([{name: 'User', schema: UserSchema}])],
})
export class UserModule {}


================================================
FILE: nest-auth/src/user/user.service.ts
================================================
import { Injectable, Logger, HttpException, HttpStatus } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';
import { User } from '../types/user';
import { CreateUserDto } from '../user/dto/create-user.dto';
import { LoginUserDto } from '../user/dto/login-user.dto';
import * as bcrypt from 'bcrypt';

@Injectable()
export class UserService {
    constructor(@InjectModel('User') private readonly userModel: Model<User>) {}

    sanitizeUser(user: User) {
        const sanitized = user.toObject();
        delete sanitized.password;
        return sanitized;
    }

    async create(userDTO: CreateUserDto) {
        const {email} = userDTO;
        const user = await this.userModel.findOne({email});
        if (user) {
            throw new HttpException('User already exists', HttpStatus.BAD_REQUEST);
        }

        const createdUser = new this.userModel(userDTO);
        await createdUser.save();
        return this.sanitizeUser(createdUser);
    }

    async findByLogin(userDTO: LoginUserDto) {
        const {email, password} = userDTO;
        const user = await this.userModel.findOne({email});
        if (!user) {
            throw new HttpException('Invalid credentials', HttpStatus.UNAUTHORIZED);
        }

        if (await bcrypt.compare(password, user.password)) {
            return this.sanitizeUser(user);
        } else {
            throw new HttpException('Invalid credentials', HttpStatus.UNAUTHORIZED);
        }
    }

    async findByPayload(payload: any) {
        const { email } = payload;
        return await this.userModel.findOne({ email });
    }
}


================================================
FILE: nest-auth/test/app.e2e-spec.ts
================================================
import { Test, TestingModule } from '@nestjs/testing';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';

describe('AppController (e2e)', () => {
  let app;

  beforeEach(async () => {
    const moduleFixture: TestingModule = await Test.createTestingModule({
      imports: [AppModule],
    }).compile();

    app = moduleFixture.createNestApplication();
    await app.init();
  });

  it('/ (GET)', () => {
    return request(app.getHttpServer())
      .get('/')
      .expect(200)
      .expect('Hello World!');
  });
});


================================================
FILE: nest-auth/test/jest-e2e.json
================================================
{
  "moduleFileExtensions": ["js", "json", "ts"],
  "rootDir": ".",
  "testEnvironment": "node",
  "testRegex": ".e2e-spec.ts$",
  "transform": {
    "^.+\\.(t|j)s$": "ts-jest"
  }
}


================================================
FILE: nest-auth/tsconfig.build.json
================================================
{
  "extends": "./tsconfig.json",
  "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}


================================================
FILE: nest-auth/tsconfig.json
================================================
{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es6",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true
  },
  "exclude": ["node_modules"]
}


================================================
FILE: nest-auth/tslint.json
================================================
{
  "defaultSeverity": "error",
  "extends": ["tslint:recommended"],
  "jsRules": {
    "no-unused-expression": true
  },
  "rules": {
    "quotemark": [true, "single"],
    "member-access": [false],
    "ordered-imports": [false],
    "max-line-length": [true, 150],
    "member-ordering": [false],
    "interface-name": [false],
    "arrow-parens": false,
    "object-literal-sort-keys": false
  },
  "rulesDirectory": []
}


================================================
FILE: nest-file-uploading/.dockerignore
================================================
/dist
/node_modules

================================================
FILE: nest-file-uploading/.gitignore
================================================
# compiled output
/dist
/node_modules
/files

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

================================================
FILE: nest-file-uploading/.prettierrc
================================================
{
  "singleQuote": true,
  "trailingComma": "all"
}

================================================
FILE: nest-file-uploading/Dockerfile
================================================
FROM node:12

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm ci

COPY . .

RUN npm run build

EXPOSE 3000

CMD [ "npm", "start" ]

================================================
FILE: nest-file-uploading/README.md
================================================
# Nestjs file uploading

Nestjs file uploading example demonstrating how to upload single and multiple files over an HTTP endpoint. For an in-depth explanation of the application and the basic Nestjs concepts, you can follow [this article](https://gabrieltanner.org/blog/nestjs-file-uploading-using-multer).

## Requirements

- [NodeJS](https://nodejs.org/en/)

## Getting started

### Installing dependencies

First, you need to install all the needed dependencies.

```bash
$ npm install
```

### Starting the application

After installing the dependencies, you can run the application using one of the following commands.

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Sending HTTP request

Once the server has started successfully, you can start sending HTTP requests to the three endpoints:

- GET request - `localhost:3000/:imgpath` - Get an uploaded image
- POST request - `localhost:3000` - Upload a single image
- POST request - `localhost:3000/multiple` - Upload multiple images at a time

================================================
FILE: nest-file-uploading/docker-compose.yml
================================================
version: '3'

services:
  nodejs:
    build:
      context: ./
      dockerfile: Dockerfile
    container_name: nodejs
    restart: always
    ports:
      - '3000:3000'


================================================
FILE: nest-file-uploading/nest-cli.json
================================================
{
  "language": "ts",
  "collection": "@nestjs/schematics",
  "sourceRoot": "src"
}


================================================
FILE: nest-file-uploading/nodemon-debug.json
================================================
{
  "watch": ["src"],
  "ext": "ts",
  "ignore": ["src/**/*.spec.ts"],
  "exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts"
}


================================================
FILE: nest-file-uploading/nodemon.json
================================================
{
  "watch": ["dist"],
  "ext": "js",
  "exec": "node dist/main"
}


================================================
FILE: nest-file-uploading/package.json
================================================
{
  "name": "nest-file-uploading",
  "version": "0.0.1",
  "description": "",
  "author": "",
  "license": "MIT",
  "scripts": {
    "build": "tsc -p tsconfig.build.json",
    "format": "prettier --write \"src/**/*.ts\"",
    "start": "ts-node -r tsconfig-paths/register src/main.ts",
    "start:dev": "concurrently --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ",
    "start:debug": "nodemon --config nodemon-debug.json",
    "prestart:prod": "rimraf dist && npm run build",
    "start:prod": "node dist/main.js",
    "lint": "tslint -p tsconfig.json -c tslint.json",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:cov": "jest --coverage",
    "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
    "test:e2e": "jest --config ./test/jest-e2e.json"
  },
  "dependencies": {
    "@nestjs/common": "8.2.6",
    "@nestjs/core": "8.2.6",
    "@nestjs/platform-express": "8.2.6",
    "reflect-metadata": "0.1.13",
    "rimraf": "3.0.2",
    "rxjs": "7.5.2"
  },
  "devDependencies": {
    "@nestjs/testing": "8.2.6",
    "@types/express": "4.17.13",
    "@types/jest": "27.4.0",
    "@types/node": "17.0.12",
    "@types/supertest": "2.0.11",
    "concurrently": "7.0.0",
    "jest": "27.4.7",
    "nodemon": "2.0.15",
    "prettier": "2.5.1",
    "supertest": "6.2.2",
    "ts-jest": "27.1.3",
    "ts-node": "10.4.0",
    "tsconfig-paths": "3.12.0",
    "tslint": "5.20.1",
    "typescript": "4.5.5",
    "wait-on": "6.0.0"
  },
  "jest": {
    "moduleFileExtensions": [
      "js",
      "json",
      "ts"
    ],
    "rootDir": "src",
    "testRegex": ".spec.ts$",
    "transform": {
      "^.+\\.(t|j)s$": "ts-jest"
    },
    "coverageDirectory": "../coverage",
    "testEnvironment": "node"
  },
  "keywords": [
    "Nestjs",
    "Typescript",
    "File uploading",
    "Node"
  ]
}


================================================
FILE: nest-file-uploading/src/app.controller.ts
================================================
import {
  Controller,
  Get,
  Post,
  UseInterceptors,
  UploadedFile,
  UploadedFiles,
  Res,
  Param,
} from '@nestjs/common';
import { FileInterceptor, FilesInterceptor } from '@nestjs/platform-express';
import { diskStorage } from 'multer';
import { editFileName, imageFileFilter } from './utils/file-upload.utils';

@Controller()
export class AppController {
  @Post()
  @UseInterceptors(
    FileInterceptor('image', {
      storage: diskStorage({
        destination: './files',
        filename: editFileName,
      }),
      fileFilter: imageFileFilter,
    }),
  )
  async uploadedFile(@UploadedFile() file) {
    const response = {
      originalname: file.originalname,
      filename: file.filename,
    };
    return response;
  }

  @Post('multiple')
  @UseInterceptors(
    FilesInterceptor('image', 20, {
      storage: diskStorage({
        destination: './files',
        filename: editFileName,
      }),
      fileFilter: imageFileFilter,
    }),
  )
  async uploadMultipleFiles(@UploadedFiles() files) {
    const response = [];
    files.forEach(file => {
      const fileReponse = {
        originalname: file.originalname,
        filename: file.filename,
      };
      response.push(fileReponse);
    });
    return response;
  }

  @Get(':imgpath')
  seeUploadedFile(@Param('imgpath') image, @Res() res) {
    return res.sendFile(image, { root: './files' });
  }
}


================================================
FILE: nest-file-uploading/src/app.module.ts
================================================
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { MulterModule } from '@nestjs/platform-express';

@Module({
  imports: [MulterModule.register({
    dest: './files',
  })],
  controllers: [AppController],
})
export class AppModule {}


================================================
FILE: nest-file-uploading/src/main.ts
================================================
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  await app.listen(3000);
}
bootstrap();


================================================
FILE: nest-file-uploading/src/utils/file-upload.utils.ts
================================================
import { extname } from 'path';

export const imageFileFilter = (req, file, callback) => {
  if (!file.originalname.match(/\.(jpg|jpeg|png|gif)$/)) {
    return callback(new Error('Only image files are allowed!'), false);
  }
  callback(null, true);
};

export const editFileName = (req, file, callback) => {
  const name = file.originalname.split('.')[0];
  const fileExtName = extname(file.originalname);
  const randomName = Array(4)
    .fill(null)
    .map(() => Math.round(Math.random() * 16).toString(16))
    .join('');
  callback(null, `${name}-${randomName}${fileExtName}`);
};


================================================
FILE: nest-file-uploading/test/app.e2e-spec.ts
================================================
import { Test, TestingModule } from '@nestjs/testing';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';

describe('AppController (e2e)', () => {
  let app;

  beforeEach(async () => {
    const moduleFixture: TestingModule = await Test.createTestingModule({
      imports: [AppModule],
    }).compile();

    app = moduleFixture.createNestApplication();
    await app.init();
  });

  it('/ (GET)', () => {
    return request(app.getHttpServer())
      .get('/')
      .expect(200)
      .expect('Hello World!');
  });
});


================================================
FILE: nest-file-uploading/test/jest-e2e.json
================================================
{
  "moduleFileExtensions": ["js", "json", "ts"],
  "rootDir": ".",
  "testEnvironment": "node",
  "testRegex": ".e2e-spec.ts$",
  "transform": {
    "^.+\\.(t|j)s$": "ts-jest"
  }
}


================================================
FILE: nest-file-uploading/tsconfig.build.json
================================================
{
  "extends": "./tsconfig.json",
  "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}


================================================
FILE: nest-file-uploading/tsconfig.json
================================================
{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es6",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true
  },
  "exclude": ["node_modules"]
}


================================================
FILE: nest-file-uploading/tslint.json
================================================
{
  "defaultSeverity": "error",
  "extends": ["tslint:recommended"],
  "jsRules": {
    "no-unused-expression": true
  },
  "rules": {
    "quotemark": [true, "single"],
    "member-access": [false],
    "ordered-imports": [false],
    "max-line-length": [true, 150],
    "member-ordering": [false],
    "interface-name": [false],
    "arrow-parens": false,
    "object-literal-sort-keys": false
  },
  "rulesDirectory": []
}


================================================
FILE: nest-graph-ql/.gitignore
================================================
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

================================================
FILE: nest-graph-ql/.prettierrc
================================================
{
  "singleQuote": true,
  "trailingComma": "all"
}

================================================
FILE: nest-graph-ql/README.md
================================================
# Nestjs GraphQL

Example demonstrating how to build a GraphQL CRUD application using Nestjs and MongoDB. For an in-depth explanation of the application and the basic Nestjs concepts, you can follow [this article](https://gabrieltanner.org/blog/nestjs-graphqlserver).

## Requirements

- [NodeJS](https://nodejs.org/en/)
- MongoDB database

## Getting started

### Installing dependencies

First, you need to install all the needed dependencies.

```bash
$ npm install
```

### Configuring the database

Before starting the application, you will need to create a MongoDB database and edit the connection string in the `app.modules.ts` file to match your database configuration. The repository includes a Docker-Compose file that helps you start MongoDB.

```
docker-compose up
```

The default database configuration in the `app.module.ts` file looks like this:

```
@Module({
  imports: [MongooseModule.forRoot('mongodb://localhost/nest')],
})
```

If you are not running the database on your local machine, replace localhost with the correct IP-Address.

### Starting the application

After installing the dependencies, you can run the application using one of the following commands.

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Testing the application

After starting the application you can start using it by either opening the GraphQL playground on http://localhost:3000/graphql or sending a request through an HTTP client like [Postman](https://www.postman.com/) or [Insomnia](https://insomnia.rest/).

### Creating an item

```
mutation {
  createItem(input: {title: "item", price: 10, description: "test"}) {
    title
    price
    description
    id
  }
}
```

### Getting all items

```
{
  items {
    title,
    price,
    description,
    id
  }
}
```

### Updating item

```
mutation {
  updateItem(id: "ID", input: {title: "item123", price: 10, description: "test123"}) {
    title
    price
    description
    id
  }
}
```

### Deleting item

```
mutation {
  deleteItem(id: "ID") {
    title
    price
    description
    id
  }
}
```


================================================
FILE: nest-graph-ql/docker-compose.yaml
================================================
version: '3.7'
services:
  mongodb:
    image: mongo:latest
    ports:
      - 27017:27017
    volumes:
      - mongodb_data:/data/db

volumes:
  mongodb_data:

================================================
FILE: nest-graph-ql/nest-cli.json
================================================
{
  "language": "ts",
  "collection": "@nestjs/schematics",
  "sourceRoot": "src"
}


================================================
FILE: nest-graph-ql/nodemon-debug.json
================================================
{
  "watch": ["src"],
  "ext": "ts",
  "ignore": ["src/**/*.spec.ts"],
  "exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts"
}


================================================
FILE: nest-graph-ql/nodemon.json
================================================
{
  "watch": ["dist"],
  "ext": "js",
  "exec": "node dist/main"
}


================================================
FILE: nest-graph-ql/package.json
================================================
{
  "name": "nest-graph-ql",
  "version": "0.0.1",
  "description": "",
  "author": "",
  "license": "MIT",
  "scripts": {
    "build": "tsc -p tsconfig.build.json",
    "format": "prettier --write \"src/**/*.ts\"",
    "start": "ts-node -r tsconfig-paths/register src/main.ts",
    "start:dev": "concurrently --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ",
    "start:debug": "nodemon --config nodemon-debug.json",
    "prestart:prod": "rimraf dist && npm run build",
    "start:prod": "node dist/main.js",
    "lint": "tslint -p tsconfig.json -c tslint.json",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:cov": "jest --coverage",
    "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
    "test:e2e": "jest --config ./test/jest-e2e.json"
  },
  "dependencies": {
    "@nestjs/common": "8.2.6",
    "@nestjs/core": "8.2.6",
    "@nestjs/graphql": "9.1.2",
    "@nestjs/mongoose": "9.0.2",
    "@nestjs/platform-express": "8.2.6",
    "apollo-server-express": "3.6.2",
    "class-transformer": "0.5.1",
    "class-validator": "^0.13.2",
    "graphql": "^15.7.2",
    "graphql-tools": "8.2.0",
    "mongoose": "6.1.8",
    "reflect-metadata": "0.1.13",
    "rimraf": "3.0.2",
    "rxjs": "7.5.2",
    "type-graphql": "1.1.1",
    "y18n": "^5.0.8"
  },
  "devDependencies": {
    "@nestjs/testing": "8.2.6",
    "@types/express": "4.17.13",
    "@types/jest": "27.4.0",
    "@types/node": "17.0.12",
    "@types/supertest": "2.0.11",
    "concurrently": "7.0.0",
    "jest": "27.4.7",
    "nodemon": "2.0.15",
    "prettier": "2.5.1",
    "supertest": "6.2.2",
    "ts-jest": "27.1.3",
    "ts-node": "10.4.0",
    "tsconfig-paths": "3.12.0",
    "tslint": "5.20.1",
    "typescript": "4.5.5",
    "wait-on": "6.0.0"
  },
  "jest": {
    "moduleFileExtensions": [
      "js",
      "json",
      "ts"
    ],
    "rootDir": "src",
    "testRegex": ".spec.ts$",
    "transform": {
      "^.+\\.(t|j)s$": "ts-jest"
    },
    "coverageDirectory": "../coverage",
    "testEnvironment": "node"
  },
  "keywords": [
    "Nestjs",
    "Typescript",
    "GraphQL",
    "Nestjs GraphQL"
  ]
}


================================================
FILE: nest-graph-ql/schema.gql
================================================
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------

type ItemType {
  id: ID!
  title: String!
  price: Int!
  description: String!
}

type Query {
  items: [ItemType!]!
  hello: String!
}

type Mutation {
  createItem(input: ItemInput!): ItemType!
  updateItem(input: ItemInput!, id: String!): ItemType!
  deleteItem(id: String!): ItemType!
}

input ItemInput {
  title: String!
  price: Int!
  description: String!
}


================================================
FILE: nest-graph-ql/src/app.controller.spec.ts
================================================
import { Test, TestingModule } from '@nestjs/testing';
import { AppController } from './app.controller';
import { AppService } from './app.service';

describe('AppController', () => {
  let appController: AppController;

  beforeEach(async () => {
    const app: TestingModule = await Test.createTestingModule({
      controllers: [AppController],
      providers: [AppService],
    }).compile();

    appController = app.get<AppController>(AppController);
  });

  describe('root', () => {
    it('should return "Hello World!"', () => {
      expect(appController.getHello()).toBe('Hello World!');
    });
  });
});


================================================
FILE: nest-graph-ql/src/app.controller.ts
================================================
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get()
  getHello(): string {
    return this.appService.getHello();
  }
}


================================================
FILE: nest-graph-ql/src/app.module.ts
================================================
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { GraphQLModule } from '@nestjs/graphql';
import { ItemsModule } from './items/items.module';
import { MongooseModule } from '@nestjs/mongoose';

@Module({
  imports: [
  GraphQLModule.forRoot({
    autoSchemaFile: 'schema.gql',
  }),
  ItemsModule,
  MongooseModule.forRoot('mongodb://localhost/nestgraphql')],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}


================================================
FILE: nest-graph-ql/src/app.service.ts
================================================
import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService {
  getHello(): string {
    return 'Hello World!';
  }
}


================================================
FILE: nest-graph-ql/src/items/dto/create-item.dto.ts
================================================
import { ObjectType, Field, Int, ID } from '@nestjs/graphql';
import { IsString, IsNotEmpty, IsNumber } from 'class-validator';
@ObjectType()
export class ItemType {
  @Field(() => ID)
  @IsString()
  readonly id?: string;
  @Field()
  @IsString()
  @IsNotEmpty()
  readonly title: string;
  @Field(() => Int)
  @IsNumber()
  readonly price: number;
  @Field()
  @IsString()
  readonly description: string;
}


================================================
FILE: nest-graph-ql/src/items/input-items.input.ts
================================================
import { InputType, Field, Int } from '@nestjs/graphql';

@InputType()
export class ItemInput {
  @Field()
  readonly title: string;
  @Field(() => Int)
  readonly price: number;
  @Field()
  readonly description: string;
}


================================================
FILE: nest-graph-ql/src/items/interfaces/item.interface.ts
================================================
import { Document } from 'mongoose';

export interface Item extends Document {
    readonly title: string;
    readonly price: number;
    readonly description: string;
}


================================================
FILE: nest-graph-ql/src/items/item.schema.ts
================================================
import * as mongoose from 'mongoose';

export const ItemSchema = new mongoose.Schema({
  title: String,
  price: Number,
  description: String,
});


================================================
FILE: nest-graph-ql/src/items/items.module.ts
================================================
import { Module } from '@nestjs/common';
import { ItemsResolver } from './items.resolver';
import { ItemSchema } from './item.schema';
import { MongooseModule } from '@nestjs/mongoose';
import { ItemsService } from './items.service';

@Module({
    imports: [MongooseModule.forFeature([{ name: 'Item', schema: ItemSchema }])],
    providers: [ItemsResolver, ItemsService],
})
export class ItemsModule {}


================================================
FILE: nest-graph-ql/src/items/items.resolver.ts
================================================
import { Resolver, Query, Mutation, Args } from '@nestjs/graphql';
import { ItemsService } from './items.service';
import { ItemType } from './dto/create-item.dto';
import { ItemInput } from './input-items.input';
import { Item } from './interfaces/item.interface'

@Resolver(of => ItemType)
export class ItemsResolver {
  constructor(private readonly itemsService: ItemsService) {}

  @Query(returns  => [ItemType])
  async items(): Promise<ItemType[]> {
    return this.itemsService.findAll();
  }

  @Mutation(returns => ItemType)
  async createItem(@Args('input') input: ItemInput): Promise<ItemType> {
    return this.itemsService.create(input);
  }

  @Mutation(returns => ItemType)
  async updateItem(
    @Args('id') id: string,
    @Args('input') input: ItemInput,
  ) {
    return this.itemsService.update(id, input as Item);
  }

  @Mutation(returns  => ItemType)
  async deleteItem(@Args('id') id: string) {
    return this.itemsService.delete(id);
  }

  @Query(returns => String)
  async hello() {
    return 'hello';
  }
}


================================================
FILE: nest-graph-ql/src/items/items.service.spec.ts
================================================
import { Test, TestingModule } from '@nestjs/testing';
import { ItemsService } from './items.service';

describe('ItemsService', () => {
  let service: ItemsService;

  beforeEach(async () => {
    const module: TestingModule = await Test.createTestingModule({
      providers: [ItemsService],
    }).compile();

    service = module.get<ItemsService>(ItemsService);
  });

  it('should be defined', () => {
    expect(service).toBeDefined();
  });
});


================================================
FILE: nest-graph-ql/src/items/items.service.ts
================================================
import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';
import { ItemType } from './dto/create-item.dto';
import { Item } from './interfaces/item.interface';
import { ItemInput } from './input-items.input'
Download .txt
gitextract_vk9h6cdj/

├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   └── bug_report.md
│   └── workflows/
│       ├── codeql-analysis.yml
│       └── stale.yml
├── .gitignore
├── Camera/
│   ├── .gitignore
│   ├── .idea/
│   │   ├── codeStyles/
│   │   │   ├── Project.xml
│   │   │   └── codeStyleConfig.xml
│   │   ├── encodings.xml
│   │   ├── gradle.xml
│   │   ├── misc.xml
│   │   └── vcs.xml
│   ├── app/
│   │   ├── .gitignore
│   │   ├── build.gradle
│   │   ├── proguard-rules.pro
│   │   └── src/
│   │       ├── androidTest/
│   │       │   └── java/
│   │       │       └── com/
│   │       │           └── example/
│   │       │               └── videorecorder/
│   │       │                   └── ExampleInstrumentedTest.kt
│   │       ├── main/
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java/
│   │       │   │   └── com/
│   │       │   │       └── example/
│   │       │   │           └── videorecorder/
│   │       │   │               └── MainActivity.kt
│   │       │   └── res/
│   │       │       ├── drawable/
│   │       │       │   ├── ic_camera.xml
│   │       │       │   ├── ic_flash.xml
│   │       │       │   ├── ic_launcher_background.xml
│   │       │       │   └── ic_switch_camera.xml
│   │       │       ├── drawable-v24/
│   │       │       │   └── ic_launcher_foreground.xml
│   │       │       ├── layout/
│   │       │       │   └── activity_main.xml
│   │       │       ├── mipmap-anydpi-v26/
│   │       │       │   ├── ic_launcher.xml
│   │       │       │   └── ic_launcher_round.xml
│   │       │       └── values/
│   │       │           ├── colors.xml
│   │       │           ├── strings.xml
│   │       │           └── styles.xml
│   │       └── test/
│   │           └── java/
│   │               └── com/
│   │                   └── example/
│   │                       └── videorecorder/
│   │                           └── ExampleUnitTest.kt
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   └── settings.gradle
├── CameraX/
│   ├── .gitignore
│   ├── .idea/
│   │   ├── codeStyles/
│   │   │   ├── Project.xml
│   │   │   └── codeStyleConfig.xml
│   │   ├── encodings.xml
│   │   ├── gradle.xml
│   │   ├── misc.xml
│   │   ├── runConfigurations.xml
│   │   └── vcs.xml
│   ├── app/
│   │   ├── .gitignore
│   │   ├── build.gradle
│   │   ├── proguard-rules.pro
│   │   └── src/
│   │       ├── androidTest/
│   │       │   └── java/
│   │       │       └── com/
│   │       │           └── example/
│   │       │               └── camerax/
│   │       │                   └── ExampleInstrumentedTest.kt
│   │       ├── main/
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java/
│   │       │   │   └── com/
│   │       │   │       └── example/
│   │       │   │           └── camerax/
│   │       │   │               └── MainActivity.kt
│   │       │   └── res/
│   │       │       ├── drawable/
│   │       │       │   ├── ic_camera.xml
│   │       │       │   ├── ic_flash.xml
│   │       │       │   ├── ic_launcher_background.xml
│   │       │       │   └── ic_switch_camera.xml
│   │       │       ├── drawable-v24/
│   │       │       │   └── ic_launcher_foreground.xml
│   │       │       ├── layout/
│   │       │       │   └── activity_main.xml
│   │       │       ├── mipmap-anydpi-v26/
│   │       │       │   ├── ic_launcher.xml
│   │       │       │   └── ic_launcher_round.xml
│   │       │       └── values/
│   │       │           ├── colors.xml
│   │       │           ├── strings.xml
│   │       │           └── styles.xml
│   │       └── test/
│   │           └── java/
│   │               └── com/
│   │                   └── example/
│   │                       └── camerax/
│   │                           └── ExampleUnitTest.kt
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   └── settings.gradle
├── LICENSE
├── Nest-CRUD/
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.md
│   ├── docker-compose.yaml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.controller.spec.ts
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── app.service.ts
│   │   ├── items/
│   │   │   ├── dto/
│   │   │   │   └── create-item.dto.ts
│   │   │   ├── interfaces/
│   │   │   │   └── item.interface.ts
│   │   │   ├── item.controller.spec.ts
│   │   │   ├── items.controller.ts
│   │   │   ├── items.module.ts
│   │   │   ├── items.service.ts
│   │   │   └── schemas/
│   │   │       └── item.schema.ts
│   │   └── main.ts
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── NestVueChat/
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.md
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.gateway.ts
│   │   ├── app.module.ts
│   │   └── main.ts
│   ├── static/
│   │   ├── index.html
│   │   ├── main.js
│   │   └── styles.css
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── Notifications/
│   ├── .gitignore
│   ├── .idea/
│   │   ├── codeStyles/
│   │   │   ├── Project.xml
│   │   │   └── codeStyleConfig.xml
│   │   ├── encodings.xml
│   │   ├── gradle.xml
│   │   ├── misc.xml
│   │   ├── runConfigurations.xml
│   │   └── vcs.xml
│   ├── app/
│   │   ├── .gitignore
│   │   ├── build.gradle
│   │   ├── proguard-rules.pro
│   │   └── src/
│   │       ├── androidTest/
│   │       │   └── java/
│   │       │       └── com/
│   │       │           └── example/
│   │       │               └── notifications/
│   │       │                   └── ExampleInstrumentedTest.kt
│   │       ├── main/
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java/
│   │       │   │   └── com/
│   │       │   │       └── example/
│   │       │   │           └── notifications/
│   │       │   │               └── MainActivity.kt
│   │       │   └── res/
│   │       │       ├── drawable/
│   │       │       │   ├── ic_launcher_background.xml
│   │       │       │   └── notification_icon.xml
│   │       │       ├── drawable-v24/
│   │       │       │   └── ic_launcher_foreground.xml
│   │       │       ├── layout/
│   │       │       │   ├── activity_main.xml
│   │       │       │   ├── custom_notification_expended_layout.xml
│   │       │       │   └── custom_notification_layout.xml
│   │       │       ├── mipmap-anydpi-v26/
│   │       │       │   ├── ic_launcher.xml
│   │       │       │   └── ic_launcher_round.xml
│   │       │       └── values/
│   │       │           ├── colors.xml
│   │       │           ├── strings.xml
│   │       │           └── styles.xml
│   │       └── test/
│   │           └── java/
│   │               └── com/
│   │                   └── example/
│   │                       └── notifications/
│   │                           └── ExampleUnitTest.kt
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   └── settings.gradle
├── README.md
├── nest-auth/
│   ├── .dockerignore
│   ├── .gitignore
│   ├── .prettierrc
│   ├── Dockerfile
│   ├── README.md
│   ├── docker-compose.yml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── app.service.ts
│   │   ├── auth/
│   │   │   ├── auth.controller.ts
│   │   │   ├── auth.module.ts
│   │   │   ├── auth.service.ts
│   │   │   └── jwt.strategy.ts
│   │   ├── main.ts
│   │   ├── models/
│   │   │   └── user.schema.ts
│   │   ├── types/
│   │   │   ├── payload.ts
│   │   │   └── user.ts
│   │   └── user/
│   │       ├── dto/
│   │       │   ├── create-user.dto.ts
│   │       │   └── login-user.dto.ts
│   │       ├── user.module.ts
│   │       └── user.service.ts
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── nest-file-uploading/
│   ├── .dockerignore
│   ├── .gitignore
│   ├── .prettierrc
│   ├── Dockerfile
│   ├── README.md
│   ├── docker-compose.yml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── main.ts
│   │   └── utils/
│   │       └── file-upload.utils.ts
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── nest-graph-ql/
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.md
│   ├── docker-compose.yaml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── schema.gql
│   ├── src/
│   │   ├── app.controller.spec.ts
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── app.service.ts
│   │   ├── items/
│   │   │   ├── dto/
│   │   │   │   └── create-item.dto.ts
│   │   │   ├── input-items.input.ts
│   │   │   ├── interfaces/
│   │   │   │   └── item.interface.ts
│   │   │   ├── item.schema.ts
│   │   │   ├── items.module.ts
│   │   │   ├── items.resolver.ts
│   │   │   ├── items.service.spec.ts
│   │   │   └── items.service.ts
│   │   └── main.ts
│   ├── test/
│   │   ├── items.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── nestjs-typeorm/
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.md
│   ├── docker-compose.yaml
│   ├── nest-cli.json
│   ├── nodemon-debug.json
│   ├── nodemon.json
│   ├── package.json
│   ├── src/
│   │   ├── app.controller.ts
│   │   ├── app.module.ts
│   │   ├── app.service.ts
│   │   ├── item/
│   │   │   ├── item.controller.ts
│   │   │   ├── item.dto.ts
│   │   │   ├── item.entity.ts
│   │   │   ├── item.module.ts
│   │   │   └── item.service.ts
│   │   └── main.ts
│   ├── test/
│   │   ├── app.e2e-spec.ts
│   │   └── jest-e2e.json
│   ├── tsconfig.build.json
│   ├── tsconfig.json
│   └── tslint.json
├── nuxt-ghost/
│   ├── .eslintrc.js
│   ├── .gitignore
│   ├── README.md
│   ├── assets/
│   │   └── README.md
│   ├── components/
│   │   └── README.md
│   ├── jsconfig.json
│   ├── layouts/
│   │   ├── README.md
│   │   └── default.vue
│   ├── middleware/
│   │   └── README.md
│   ├── nuxt.config.js
│   ├── package.json
│   ├── pages/
│   │   ├── README.md
│   │   └── index.vue
│   ├── plugins/
│   │   └── README.md
│   ├── static/
│   │   └── README.md
│   ├── store/
│   │   └── README.md
│   └── utils/
│       └── ghost.js
├── nuxt-supabase-auth/
│   ├── .editorconfig
│   ├── .gitignore
│   ├── README.md
│   ├── assets/
│   │   └── css/
│   │       └── tailwind.css
│   ├── jsconfig.json
│   ├── layouts/
│   │   └── default.vue
│   ├── middleware/
│   │   └── auth.js
│   ├── nuxt.config.js
│   ├── package.json
│   ├── pages/
│   │   ├── index.vue
│   │   ├── login.vue
│   │   └── register.vue
│   ├── plugins/
│   │   └── client.js
│   ├── store/
│   │   └── README.md
│   └── tailwind.config.js
├── prisma-crud/
│   ├── .gitignore
│   ├── README.md
│   ├── package.json
│   ├── prisma/
│   │   ├── datamodel.prisma
│   │   ├── prisma.yml
│   │   └── seed.graphql
│   ├── src/
│   │   ├── generated/
│   │   │   └── prisma-client/
│   │   │       ├── index.ts
│   │   │       └── prisma-schema.ts
│   │   ├── index.ts
│   │   ├── schema.graphql
│   │   └── utils.ts
│   └── tsconfig.json
└── renovate.json
Download .txt
SYMBOL INDEX (207 symbols across 54 files)

FILE: Nest-CRUD/src/app.controller.ts
  class AppController (line 5) | class AppController {
    method constructor (line 6) | constructor(private readonly appService: AppService) {}
    method getHello (line 9) | getHello(): string {

FILE: Nest-CRUD/src/app.module.ts
  class AppModule (line 12) | class AppModule {}

FILE: Nest-CRUD/src/app.service.ts
  class AppService (line 4) | class AppService {
    method getHello (line 5) | getHello(): string {

FILE: Nest-CRUD/src/items/dto/create-item.dto.ts
  class CreateItemDto (line 1) | class CreateItemDto {

FILE: Nest-CRUD/src/items/interfaces/item.interface.ts
  type Item (line 3) | interface Item extends Document  {

FILE: Nest-CRUD/src/items/items.controller.ts
  class ItemsController (line 15) | class ItemsController {
    method constructor (line 16) | constructor(private readonly itemsService: ItemsService) {}
    method findAll (line 19) | findAll(): Promise<Item[]> {
    method findOne (line 24) | findOne(@Param('id') id): Promise<Item> {
    method create (line 29) | create(@Body() createItemDto: CreateItemDto): Promise<Item> {
    method delete (line 34) | delete(@Param('id') id): Promise<Item> {
    method update (line 39) | update(@Body() updateItemDto: CreateItemDto, @Param('id') id): Promise...

FILE: Nest-CRUD/src/items/items.module.ts
  class ItemsModule (line 13) | class ItemsModule {}

FILE: Nest-CRUD/src/items/items.service.ts
  class ItemsService (line 8) | class ItemsService {
    method constructor (line 9) | constructor(@InjectModel('Item') private readonly itemModel: Model<Ite...
    method findAll (line 11) | async findAll(): Promise<Item[]> {
    method findOne (line 15) | async findOne(id: string): Promise<Item> {
    method create (line 19) | async create(item: CreateItemDto): Promise<Item> {
    method delete (line 24) | async delete(id: string): Promise<Item> {
    method update (line 28) | async update(id: string, item: CreateItemDto): Promise<Item> {

FILE: Nest-CRUD/src/main.ts
  function bootstrap (line 4) | async function bootstrap() {

FILE: NestVueChat/src/app.gateway.ts
  class AppGateway (line 17) | class AppGateway
    method handleMessage (line 24) | handleMessage(client: Socket, payload: string): void {
    method afterInit (line 28) | afterInit(server: Server) {
    method handleDisconnect (line 32) | handleDisconnect(client: Socket) {
    method handleConnection (line 36) | handleConnection(client: Socket, ...args: any[]) {

FILE: NestVueChat/src/app.module.ts
  class AppModule (line 9) | class AppModule {}

FILE: NestVueChat/src/main.ts
  function bootstrap (line 6) | async function bootstrap() {

FILE: NestVueChat/static/main.js
  method sendMessage (line 11) | sendMessage() {
  method receivedMessage (line 21) | receivedMessage(message) {
  method validateInput (line 24) | validateInput() {
  method created (line 28) | created() {

FILE: nest-auth/src/app.controller.ts
  class AppController (line 5) | class AppController {
    method constructor (line 6) | constructor(private readonly appService: AppService) {}
    method getHello (line 9) | getHello(): string {

FILE: nest-auth/src/app.module.ts
  class AppModule (line 17) | class AppModule {}

FILE: nest-auth/src/app.service.ts
  class AppService (line 4) | class AppService {
    method getHello (line 5) | getHello(): string {

FILE: nest-auth/src/auth/auth.controller.ts
  class AuthController (line 10) | class AuthController {
    method constructor (line 11) | constructor(private userService: UserService, private authService: Aut...
    method tempAuth (line 15) | tempAuth() {
    method login (line 20) | async login(@Body() userDTO: LoginUserDto) {
    method register (line 31) | async register(@Body() userDTO: CreateUserDto) {

FILE: nest-auth/src/auth/auth.module.ts
  class AuthModule (line 12) | class AuthModule {}

FILE: nest-auth/src/auth/auth.service.ts
  class AuthService (line 7) | class AuthService {
    method constructor (line 8) | constructor(private userService: UserService) {}
    method signPayload (line 10) | async signPayload(payload: Payload) {
    method validateUser (line 14) | async validateUser(payload: Payload) {

FILE: nest-auth/src/auth/jwt.strategy.ts
  class JwtStrategy (line 8) | class JwtStrategy extends PassportStrategy(Strategy) {
    method constructor (line 9) | constructor(private authService: AuthService) {
    method validate (line 16) | async validate(payload: any, done: VerifiedCallback) {

FILE: nest-auth/src/main.ts
  function bootstrap (line 4) | async function bootstrap() {

FILE: nest-auth/src/types/payload.ts
  type Payload (line 1) | interface Payload {

FILE: nest-auth/src/types/user.ts
  type User (line 3) | interface User extends Document {

FILE: nest-auth/src/user/dto/create-user.dto.ts
  class CreateUserDto (line 1) | class CreateUserDto {

FILE: nest-auth/src/user/dto/login-user.dto.ts
  class LoginUserDto (line 1) | class LoginUserDto {

FILE: nest-auth/src/user/user.module.ts
  class UserModule (line 12) | class UserModule {}

FILE: nest-auth/src/user/user.service.ts
  class UserService (line 10) | class UserService {
    method constructor (line 11) | constructor(@InjectModel('User') private readonly userModel: Model<Use...
    method sanitizeUser (line 13) | sanitizeUser(user: User) {
    method create (line 19) | async create(userDTO: CreateUserDto) {
    method findByLogin (line 31) | async findByLogin(userDTO: LoginUserDto) {
    method findByPayload (line 45) | async findByPayload(payload: any) {

FILE: nest-file-uploading/src/app.controller.ts
  class AppController (line 16) | class AppController {
    method uploadedFile (line 27) | async uploadedFile(@UploadedFile() file) {
    method uploadMultipleFiles (line 45) | async uploadMultipleFiles(@UploadedFiles() files) {
    method seeUploadedFile (line 58) | seeUploadedFile(@Param('imgpath') image, @Res() res) {

FILE: nest-file-uploading/src/app.module.ts
  class AppModule (line 11) | class AppModule {}

FILE: nest-file-uploading/src/main.ts
  function bootstrap (line 4) | async function bootstrap() {

FILE: nest-graph-ql/src/app.controller.ts
  class AppController (line 5) | class AppController {
    method constructor (line 6) | constructor(private readonly appService: AppService) {}
    method getHello (line 9) | getHello(): string {

FILE: nest-graph-ql/src/app.module.ts
  class AppModule (line 18) | class AppModule {}

FILE: nest-graph-ql/src/app.service.ts
  class AppService (line 4) | class AppService {
    method getHello (line 5) | getHello(): string {

FILE: nest-graph-ql/src/items/dto/create-item.dto.ts
  class ItemType (line 4) | class ItemType {

FILE: nest-graph-ql/src/items/input-items.input.ts
  class ItemInput (line 4) | class ItemInput {

FILE: nest-graph-ql/src/items/interfaces/item.interface.ts
  type Item (line 3) | interface Item extends Document {

FILE: nest-graph-ql/src/items/items.module.ts
  class ItemsModule (line 11) | class ItemsModule {}

FILE: nest-graph-ql/src/items/items.resolver.ts
  class ItemsResolver (line 8) | class ItemsResolver {
    method constructor (line 9) | constructor(private readonly itemsService: ItemsService) {}
    method items (line 12) | async items(): Promise<ItemType[]> {
    method createItem (line 17) | async createItem(@Args('input') input: ItemInput): Promise<ItemType> {
    method updateItem (line 22) | async updateItem(
    method deleteItem (line 30) | async deleteItem(@Args('id') id: string) {
    method hello (line 35) | async hello() {

FILE: nest-graph-ql/src/items/items.service.ts
  class ItemsService (line 9) | class ItemsService {
    method constructor (line 10) | constructor(@InjectModel('Item') private itemModel: Model<Item>) {}
    method create (line 12) | async create(createItemDto: ItemInput): Promise<ItemType> {
    method findAll (line 17) | async findAll(): Promise<ItemType[]> {
    method findOne (line 21) | async findOne(id: string): Promise<ItemType> {
    method delete (line 25) | async delete(id: string): Promise<ItemType> {
    method update (line 29) | async update(id: string, item: Item): Promise<ItemType> {

FILE: nest-graph-ql/src/main.ts
  function bootstrap (line 5) | async function bootstrap() {

FILE: nestjs-typeorm/src/app.controller.ts
  class AppController (line 5) | class AppController {
    method constructor (line 6) | constructor(private readonly appService: AppService) {}
    method getHello (line 9) | getHello(): string {

FILE: nestjs-typeorm/src/app.module.ts
  class AppModule (line 19) | class AppModule {}

FILE: nestjs-typeorm/src/app.service.ts
  class AppService (line 4) | class AppService {
    method getHello (line 5) | getHello(): string {

FILE: nestjs-typeorm/src/item/item.controller.ts
  class ItemController (line 7) | class ItemController {
    method constructor (line 8) | constructor(private itemService: ItemService) {}
    method findAllItems (line 11) | async findAllItems(): Promise<Item[]> {
    method findById (line 16) | async findById(@Param('id') id: number): Promise<Item> {
    method createItem (line 21) | async createItem(@Body() item: Item) {
    method updateItem (line 26) | async updateItem(@Param('id') id: string, @Body() item: ItemDto) {
    method deleteItem (line 31) | async deleteItem(@Param('id') id: string) {

FILE: nestjs-typeorm/src/item/item.dto.ts
  class ItemDto (line 1) | class ItemDto {

FILE: nestjs-typeorm/src/item/item.entity.ts
  class Item (line 4) | class Item {

FILE: nestjs-typeorm/src/item/item.module.ts
  class ItemModule (line 12) | class ItemModule {}

FILE: nestjs-typeorm/src/item/item.service.ts
  class ItemService (line 8) | class ItemService {
    method constructor (line 9) | constructor(@InjectRepository(Item) private readonly itemRepository: R...
    method findAll (line 11) | async findAll(): Promise<Item[]> {
    method findById (line 15) | async findById(id: number): Promise<Item> {
    method createItem (line 19) | async createItem(item: Item) {
    method update (line 23) | async update(id: string, newItem: ItemDto) {
    method delete (line 29) | async delete(id: string) {

FILE: nestjs-typeorm/src/main.ts
  function bootstrap (line 4) | async function bootstrap() {

FILE: nuxt-ghost/nuxt.config.js
  method extend (line 57) | extend(config, ctx) {}

FILE: nuxt-supabase-auth/nuxt.config.js
  method scrollBehavior (line 55) | scrollBehavior(to) {

FILE: prisma-crud/src/generated/prisma-client/index.ts
  type AtLeastOne (line 13) | type AtLeastOne<T, U = { [K in keyof T]: Pick<T, K> }> = Partial<T> &
  type Maybe (line 16) | type Maybe<T> = T | undefined | null;
  type Exists (line 18) | interface Exists {
  type Node (line 23) | interface Node {}
  type FragmentableArray (line 25) | type FragmentableArray<T> = Promise<Array<T>> & Fragmentable;
  type Fragmentable (line 27) | interface Fragmentable {
  type Prisma (line 31) | interface Prisma {
  type Subscription (line 126) | interface Subscription {
  type ClientConstructor (line 135) | interface ClientConstructor<T> {
  type PostOrderByInput (line 143) | type PostOrderByInput =
  type UserOrderByInput (line 153) | type UserOrderByInput =
  type MutationType (line 161) | type MutationType = "CREATED" | "UPDATED" | "DELETED";
  type UserCreateInput (line 163) | interface UserCreateInput {
  type PostWhereUniqueInput (line 169) | type PostWhereUniqueInput = AtLeastOne<{
  type PostUpdateInput (line 173) | interface PostUpdateInput {
  type PostWhereInput (line 179) | interface PostWhereInput {
  type PostSubscriptionWhereInput (line 229) | interface PostSubscriptionWhereInput {
  type UserWhereInput (line 240) | interface UserWhereInput {
  type PostCreateInput (line 288) | interface PostCreateInput {
  type UserWhereUniqueInput (line 295) | type UserWhereUniqueInput = AtLeastOne<{
  type UserUpdateManyMutationInput (line 300) | interface UserUpdateManyMutationInput {
  type PostUpdateManyMutationInput (line 305) | interface PostUpdateManyMutationInput {
  type UserSubscriptionWhereInput (line 311) | interface UserSubscriptionWhereInput {
  type UserUpdateInput (line 322) | interface UserUpdateInput {
  type NodeNode (line 327) | interface NodeNode {
  type UserEdge (line 331) | interface UserEdge {
  type UserEdgePromise (line 336) | interface UserEdgePromise extends Promise<UserEdge>, Fragmentable {
  type UserEdgeSubscription (line 341) | interface UserEdgeSubscription
  type PostConnection (line 348) | interface PostConnection {
  type PostConnectionPromise (line 353) | interface PostConnectionPromise
  type PostConnectionSubscription (line 361) | interface PostConnectionSubscription
  type UserPreviousValues (line 369) | interface UserPreviousValues {
  type UserPreviousValuesPromise (line 375) | interface UserPreviousValuesPromise
  type UserPreviousValuesSubscription (line 383) | interface UserPreviousValuesSubscription
  type PageInfo (line 391) | interface PageInfo {
  type PageInfoPromise (line 398) | interface PageInfoPromise extends Promise<PageInfo>, Fragmentable {
  type PageInfoSubscription (line 405) | interface PageInfoSubscription
  type PostSubscriptionPayload (line 414) | interface PostSubscriptionPayload {
  type PostSubscriptionPayloadPromise (line 421) | interface PostSubscriptionPayloadPromise
  type PostSubscriptionPayloadSubscription (line 430) | interface PostSubscriptionPayloadSubscription
  type UserConnection (line 439) | interface UserConnection {
  type UserConnectionPromise (line 444) | interface UserConnectionPromise
  type UserConnectionSubscription (line 452) | interface UserConnectionSubscription
  type PostPreviousValues (line 460) | interface PostPreviousValues {
  type PostPreviousValuesPromise (line 467) | interface PostPreviousValuesPromise
  type PostPreviousValuesSubscription (line 476) | interface PostPreviousValuesSubscription
  type Post (line 485) | interface Post {
  type PostPromise (line 492) | interface PostPromise extends Promise<Post>, Fragmentable {
  type PostSubscription (line 499) | interface PostSubscription
  type PostNullablePromise (line 508) | interface PostNullablePromise
  type User (line 517) | interface User {
  type UserPromise (line 523) | interface UserPromise extends Promise<User>, Fragmentable {
  type UserSubscription (line 529) | interface UserSubscription
  type UserNullablePromise (line 537) | interface UserNullablePromise
  type AggregateUser (line 545) | interface AggregateUser {
  type AggregateUserPromise (line 549) | interface AggregateUserPromise
  type AggregateUserSubscription (line 555) | interface AggregateUserSubscription
  type AggregatePost (line 561) | interface AggregatePost {
  type AggregatePostPromise (line 565) | interface AggregatePostPromise
  type AggregatePostSubscription (line 571) | interface AggregatePostSubscription
  type UserSubscriptionPayload (line 577) | interface UserSubscriptionPayload {
  type UserSubscriptionPayloadPromise (line 584) | interface UserSubscriptionPayloadPromise
  type UserSubscriptionPayloadSubscription (line 593) | interface UserSubscriptionPayloadSubscription
  type BatchPayload (line 602) | interface BatchPayload {
  type BatchPayloadPromise (line 606) | interface BatchPayloadPromise
  type BatchPayloadSubscription (line 612) | interface BatchPayloadSubscription
  type PostEdge (line 618) | interface PostEdge {
  type PostEdgePromise (line 623) | interface PostEdgePromise extends Promise<PostEdge>, Fragmentable {
  type PostEdgeSubscription (line 628) | interface PostEdgeSubscription
  type Int (line 638) | type Int = number;
  type ID_Input (line 643) | type ID_Input = string | number;
  type ID_Output (line 644) | type ID_Output = string;
  type Long (line 646) | type Long = string;
  type String (line 651) | type String = string;
  type Boolean (line 656) | type Boolean = boolean;

FILE: prisma-crud/src/index.ts
  method feed (line 7) | feed(parent, args, context: Context) {
  method drafts (line 10) | drafts(parent, args, context: Context) {
  method post (line 13) | post(parent, { id }, context: Context) {
  method users (line 16) | users(parent, args, context: Context) {
  method createUser (line 21) | createUser(parent, { email, password }, context: Context) {
  method createDraft (line 24) | createDraft(parent, { title, content }, context: Context) {
  method deletePost (line 27) | deletePost(parent, { id }, context: Context) {
  method publish (line 30) | publish(parent, { id }, context: Context) {

FILE: prisma-crud/src/utils.ts
  type Context (line 3) | interface Context {
Condensed preview — 291 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (278K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 726,
    "preview": "# These are supported funding model platforms\n\ngithub: [TannerGabriel]# Replace with up to 4 GitHub Sponsors-enabled use"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 834,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "chars": 2441,
    "preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
  },
  {
    "path": ".github/workflows/stale.yml",
    "chars": 595,
    "preview": "name: Mark stale issues and pull requests\n\non:\n  schedule:\n  - cron: \"0 0 * * *\"\n\njobs:\n  stale:\n\n    runs-on: ubuntu-la"
  },
  {
    "path": ".gitignore",
    "chars": 392,
    "preview": "# compiled output\n/dist\n/node_modules\n\n# API Keys\n.env\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*"
  },
  {
    "path": "Camera/.gitignore",
    "chars": 203,
    "preview": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor."
  },
  {
    "path": "Camera/.idea/codeStyles/Project.xml",
    "chars": 381,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <JetCodeStyleSettings>"
  },
  {
    "path": "Camera/.idea/codeStyles/codeStyleConfig.xml",
    "chars": 142,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n  <state>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n "
  },
  {
    "path": "Camera/.idea/encodings.xml",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\" addBOMForNewFiles=\"with NO BOM"
  },
  {
    "path": "Camera/.idea/gradle.xml",
    "chars": 626,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linke"
  },
  {
    "path": "Camera/.idea/misc.xml",
    "chars": 515,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CMakeSettings\">\n    <configurations>\n   "
  },
  {
    "path": "Camera/.idea/vcs.xml",
    "chars": 222,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping dire"
  },
  {
    "path": "Camera/app/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "Camera/app/build.gradle",
    "chars": 1538,
    "preview": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandr"
  },
  {
    "path": "Camera/app/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "Camera/app/src/androidTest/java/com/example/videorecorder/ExampleInstrumentedTest.kt",
    "chars": 638,
    "preview": "package com.example.videorecorder\n\nimport androidx.test.InstrumentationRegistry\nimport androidx.test.runner.AndroidJUnit"
  },
  {
    "path": "Camera/app/src/main/AndroidManifest.xml",
    "chars": 1097,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          xm"
  },
  {
    "path": "Camera/app/src/main/java/com/example/videorecorder/MainActivity.kt",
    "chars": 5041,
    "preview": "package com.example.videorecorder\n\n\nimport android.Manifest\nimport android.content.Intent\nimport android.content.pm.Pack"
  },
  {
    "path": "Camera/app/src/main/res/drawable/ic_camera.xml",
    "chars": 605,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "Camera/app/src/main/res/drawable/ic_flash.xml",
    "chars": 316,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "Camera/app/src/main/res/drawable/ic_launcher_background.xml",
    "chars": 4887,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      "
  },
  {
    "path": "Camera/app/src/main/res/drawable/ic_switch_camera.xml",
    "chars": 475,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "Camera/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "chars": 1969,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:aapt=\"http://schemas.android.com/aapt\"\n"
  },
  {
    "path": "Camera/app/src/main/res/layout/activity_main.xml",
    "chars": 2062,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n        xmlns:android=\"http://schemas.android.com/apk/res/android"
  },
  {
    "path": "Camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "chars": 270,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "Camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "chars": 270,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "Camera/app/src/main/res/values/colors.xml",
    "chars": 208,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"color"
  },
  {
    "path": "Camera/app/src/main/res/values/strings.xml",
    "chars": 69,
    "preview": "<resources>\n    <string name=\"app_name\">Camera</string>\n</resources>\n"
  },
  {
    "path": "Camera/app/src/main/res/values/styles.xml",
    "chars": 381,
    "preview": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">"
  },
  {
    "path": "Camera/app/src/test/java/com/example/videorecorder/ExampleUnitTest.kt",
    "chars": 350,
    "preview": "package com.example.videorecorder\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, whi"
  },
  {
    "path": "Camera/build.gradle",
    "chars": 669,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    e"
  },
  {
    "path": "Camera/gradle/wrapper/gradle-wrapper.properties",
    "chars": 242,
    "preview": "#Mon Dec 31 22:42:36 CET 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
  },
  {
    "path": "Camera/gradle.properties",
    "chars": 1163,
    "preview": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will ov"
  },
  {
    "path": "Camera/gradlew",
    "chars": 5296,
    "preview": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up"
  },
  {
    "path": "Camera/gradlew.bat",
    "chars": 2176,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
  },
  {
    "path": "Camera/settings.gradle",
    "chars": 15,
    "preview": "include ':app'\n"
  },
  {
    "path": "CameraX/.gitignore",
    "chars": 203,
    "preview": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor."
  },
  {
    "path": "CameraX/.idea/codeStyles/Project.xml",
    "chars": 381,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <JetCodeStyleSettings>"
  },
  {
    "path": "CameraX/.idea/codeStyles/codeStyleConfig.xml",
    "chars": 142,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n  <state>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n "
  },
  {
    "path": "CameraX/.idea/encodings.xml",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\" addBOMForNewFiles=\"with NO BOM"
  },
  {
    "path": "CameraX/.idea/gradle.xml",
    "chars": 626,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linke"
  },
  {
    "path": "CameraX/.idea/misc.xml",
    "chars": 357,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectRootManager\" version=\"2\" language"
  },
  {
    "path": "CameraX/.idea/runConfigurations.xml",
    "chars": 564,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <o"
  },
  {
    "path": "CameraX/.idea/vcs.xml",
    "chars": 183,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping dire"
  },
  {
    "path": "CameraX/app/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "CameraX/app/build.gradle",
    "chars": 1874,
    "preview": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandr"
  },
  {
    "path": "CameraX/app/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "CameraX/app/src/androidTest/java/com/example/camerax/ExampleInstrumentedTest.kt",
    "chars": 640,
    "preview": "package com.example.camerax\n\nimport android.support.test.InstrumentationRegistry\nimport android.support.test.runner.Andr"
  },
  {
    "path": "CameraX/app/src/main/AndroidManifest.xml",
    "chars": 1065,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" xmlns:tools="
  },
  {
    "path": "CameraX/app/src/main/java/com/example/camerax/MainActivity.kt",
    "chars": 4446,
    "preview": "package com.example.camerax\n\nimport android.Manifest\nimport android.content.pm.PackageManager\nimport android.os.Bundle\ni"
  },
  {
    "path": "CameraX/app/src/main/res/drawable/ic_camera.xml",
    "chars": 605,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "CameraX/app/src/main/res/drawable/ic_flash.xml",
    "chars": 316,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "CameraX/app/src/main/res/drawable/ic_launcher_background.xml",
    "chars": 4887,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      "
  },
  {
    "path": "CameraX/app/src/main/res/drawable/ic_switch_camera.xml",
    "chars": 475,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "CameraX/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "chars": 1969,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:aapt=\"http://schemas.android.com/aapt\"\n"
  },
  {
    "path": "CameraX/app/src/main/res/layout/activity_main.xml",
    "chars": 2022,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n        xmlns:android=\"http://schemas.android.com/apk/res/android"
  },
  {
    "path": "CameraX/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "chars": 270,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "CameraX/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "chars": 270,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "CameraX/app/src/main/res/values/colors.xml",
    "chars": 208,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"color"
  },
  {
    "path": "CameraX/app/src/main/res/values/strings.xml",
    "chars": 70,
    "preview": "<resources>\n    <string name=\"app_name\">CameraX</string>\n</resources>\n"
  },
  {
    "path": "CameraX/app/src/main/res/values/styles.xml",
    "chars": 383,
    "preview": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
  },
  {
    "path": "CameraX/app/src/test/java/com/example/camerax/ExampleUnitTest.kt",
    "chars": 344,
    "preview": "package com.example.camerax\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which wil"
  },
  {
    "path": "CameraX/build.gradle",
    "chars": 652,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    e"
  },
  {
    "path": "CameraX/gradle/wrapper/gradle-wrapper.properties",
    "chars": 233,
    "preview": "#Thu May 09 11:52:47 CEST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER"
  },
  {
    "path": "CameraX/gradle.properties",
    "chars": 870,
    "preview": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will ov"
  },
  {
    "path": "CameraX/gradlew",
    "chars": 5296,
    "preview": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up"
  },
  {
    "path": "CameraX/gradlew.bat",
    "chars": 2176,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
  },
  {
    "path": "CameraX/settings.gradle",
    "chars": 15,
    "preview": "include ':app'\n"
  },
  {
    "path": "LICENSE",
    "chars": 1071,
    "preview": "MIT License\n\nCopyright (c) 2019 Tanner Gabriel\n\nPermission is hereby granted, free of charge, to any person obtaining a "
  },
  {
    "path": "Nest-CRUD/.gitignore",
    "chars": 375,
    "preview": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*"
  },
  {
    "path": "Nest-CRUD/.prettierrc",
    "chars": 51,
    "preview": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "Nest-CRUD/README.md",
    "chars": 1337,
    "preview": "# Nestjs MongoDB CRUD\n\nSimple MongoDB CRUD example demonstrating the Nestjs application structure as well as how you can"
  },
  {
    "path": "Nest-CRUD/docker-compose.yaml",
    "chars": 159,
    "preview": "version: '3.7'\nservices:\n  mongodb:\n    image: mongo:latest\n    ports:\n      - 27017:27017\n    volumes:\n      - mongodb_"
  },
  {
    "path": "Nest-CRUD/nest-cli.json",
    "chars": 84,
    "preview": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "Nest-CRUD/nodemon-debug.json",
    "chars": 163,
    "preview": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register"
  },
  {
    "path": "Nest-CRUD/nodemon.json",
    "chars": 67,
    "preview": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "Nest-CRUD/package.json",
    "chars": 1949,
    "preview": "{\n  \"name\": \"nest-crud\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n "
  },
  {
    "path": "Nest-CRUD/src/app.controller.spec.ts",
    "chars": 617,
    "preview": "import { Test, TestingModule } from '@nestjs/testing';\nimport { AppController } from './app.controller';\nimport { AppSer"
  },
  {
    "path": "Nest-CRUD/src/app.controller.ts",
    "chars": 274,
    "preview": "import { Controller, Get } from '@nestjs/common';\nimport { AppService } from './app.service';\n\n@Controller()\nexport clas"
  },
  {
    "path": "Nest-CRUD/src/app.module.ts",
    "chars": 415,
    "preview": "import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from '."
  },
  {
    "path": "Nest-CRUD/src/app.service.ts",
    "chars": 142,
    "preview": "import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n  getHello(): string {\n    return "
  },
  {
    "path": "Nest-CRUD/src/items/dto/create-item.dto.ts",
    "chars": 112,
    "preview": "export class CreateItemDto {\n  readonly name: string;\n  readonly description: string;\n  readonly qty: number;\n}\n"
  },
  {
    "path": "Nest-CRUD/src/items/interfaces/item.interface.ts",
    "chars": 152,
    "preview": "import { Document } from 'mongoose';\n\nexport interface Item extends Document  {\n  id?: string;\n  name: string;\n  descrip"
  },
  {
    "path": "Nest-CRUD/src/items/item.controller.spec.ts",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "Nest-CRUD/src/items/items.controller.ts",
    "chars": 1014,
    "preview": "import {\n    Controller,\n    Get,\n    Post,\n    Put,\n    Delete,\n    Body,\n    Param,\n  } from '@nestjs/common';\nimport "
  },
  {
    "path": "Nest-CRUD/src/items/items.module.ts",
    "chars": 432,
    "preview": "\nimport { Module } from '@nestjs/common';\nimport { MongooseModule } from '@nestjs/mongoose';\nimport { ItemsController } "
  },
  {
    "path": "Nest-CRUD/src/items/items.service.ts",
    "chars": 931,
    "preview": "import { Injectable } from '@nestjs/common';\nimport { Item } from './interfaces/item.interface';\nimport { Model } from '"
  },
  {
    "path": "Nest-CRUD/src/items/schemas/item.schema.ts",
    "chars": 145,
    "preview": "import * as mongoose from 'mongoose';\n\nexport const ItemSchema = new mongoose.Schema({\n  name: String,\n  qty: Number,\n  "
  },
  {
    "path": "Nest-CRUD/src/main.ts",
    "chars": 208,
    "preview": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  co"
  },
  {
    "path": "Nest-CRUD/test/app.e2e-spec.ts",
    "chars": 561,
    "preview": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from '"
  },
  {
    "path": "Nest-CRUD/test/jest-e2e.json",
    "chars": 183,
    "preview": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-sp"
  },
  {
    "path": "Nest-CRUD/tsconfig.build.json",
    "chars": 97,
    "preview": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "Nest-CRUD/tsconfig.json",
    "chars": 325,
    "preview": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecorat"
  },
  {
    "path": "Nest-CRUD/tslint.json",
    "chars": 426,
    "preview": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  }"
  },
  {
    "path": "NestVueChat/.gitignore",
    "chars": 375,
    "preview": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*"
  },
  {
    "path": "NestVueChat/.prettierrc",
    "chars": 51,
    "preview": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "NestVueChat/README.md",
    "chars": 923,
    "preview": "# Nestjs file uploading\n\nNestjs Vue real-time chat, which utilizes Websockets to implement real-time communication in Ne"
  },
  {
    "path": "NestVueChat/nest-cli.json",
    "chars": 84,
    "preview": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "NestVueChat/nodemon-debug.json",
    "chars": 163,
    "preview": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register"
  },
  {
    "path": "NestVueChat/nodemon.json",
    "chars": 67,
    "preview": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "NestVueChat/package.json",
    "chars": 2059,
    "preview": "{\n  \"name\": \"backend\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n   "
  },
  {
    "path": "NestVueChat/src/app.gateway.ts",
    "chars": 909,
    "preview": "import {\n  SubscribeMessage,\n  WebSocketGateway,\n  OnGatewayInit,\n  WebSocketServer,\n  OnGatewayConnection,\n  OnGatewayD"
  },
  {
    "path": "NestVueChat/src/app.module.ts",
    "chars": 186,
    "preview": "import { Module } from '@nestjs/common';\nimport { AppGateway } from './app.gateway';\n\n@Module({\n  imports: [],\n  control"
  },
  {
    "path": "NestVueChat/src/main.ts",
    "chars": 384,
    "preview": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\nimport { NestExpressApplication } "
  },
  {
    "path": "NestVueChat/static/index.html",
    "chars": 1993,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width"
  },
  {
    "path": "NestVueChat/static/main.js",
    "chars": 866,
    "preview": "const app = new Vue({\n    el: '#app',\n    data: {\n        title: 'Nestjs Websockets Chat',\n        name: '',\n        tex"
  },
  {
    "path": "NestVueChat/static/styles.css",
    "chars": 86,
    "preview": "#messages{\n    height:300px;\n    overflow-y: scroll;\n}\n\n#app {\n    margin-top: 2rem;\n}"
  },
  {
    "path": "NestVueChat/test/app.e2e-spec.ts",
    "chars": 561,
    "preview": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from '"
  },
  {
    "path": "NestVueChat/test/jest-e2e.json",
    "chars": 183,
    "preview": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-sp"
  },
  {
    "path": "NestVueChat/tsconfig.build.json",
    "chars": 97,
    "preview": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "NestVueChat/tsconfig.json",
    "chars": 325,
    "preview": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecorat"
  },
  {
    "path": "NestVueChat/tslint.json",
    "chars": 426,
    "preview": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  }"
  },
  {
    "path": "Notifications/.gitignore",
    "chars": 203,
    "preview": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor."
  },
  {
    "path": "Notifications/.idea/codeStyles/Project.xml",
    "chars": 381,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <JetCodeStyleSettings>"
  },
  {
    "path": "Notifications/.idea/codeStyles/codeStyleConfig.xml",
    "chars": 142,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n  <state>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n "
  },
  {
    "path": "Notifications/.idea/encodings.xml",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\" addBOMForNewFiles=\"with NO BOM"
  },
  {
    "path": "Notifications/.idea/gradle.xml",
    "chars": 626,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linke"
  },
  {
    "path": "Notifications/.idea/misc.xml",
    "chars": 357,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectRootManager\" version=\"2\" language"
  },
  {
    "path": "Notifications/.idea/runConfigurations.xml",
    "chars": 564,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <o"
  },
  {
    "path": "Notifications/.idea/vcs.xml",
    "chars": 183,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping dire"
  },
  {
    "path": "Notifications/app/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "Notifications/app/build.gradle",
    "chars": 1153,
    "preview": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandr"
  },
  {
    "path": "Notifications/app/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "Notifications/app/src/androidTest/java/com/example/notifications/ExampleInstrumentedTest.kt",
    "chars": 652,
    "preview": "package com.example.notifications\n\nimport android.support.test.InstrumentationRegistry\nimport android.support.test.runne"
  },
  {
    "path": "Notifications/app/src/main/AndroidManifest.xml",
    "chars": 747,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          pa"
  },
  {
    "path": "Notifications/app/src/main/java/com/example/notifications/MainActivity.kt",
    "chars": 11318,
    "preview": "package com.example.notifications\n\nimport android.app.Notification.VISIBILITY_PUBLIC\nimport android.os.Build\nimport andr"
  },
  {
    "path": "Notifications/app/src/main/res/drawable/ic_launcher_background.xml",
    "chars": 4887,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      "
  },
  {
    "path": "Notifications/app/src/main/res/drawable/notification_icon.xml",
    "chars": 970,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "Notifications/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "chars": 1969,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:aapt=\"http://schemas.android.com/aapt\"\n"
  },
  {
    "path": "Notifications/app/src/main/res/layout/activity_main.xml",
    "chars": 5102,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  "
  },
  {
    "path": "Notifications/app/src/main/res/layout/custom_notification_expended_layout.xml",
    "chars": 1030,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        "
  },
  {
    "path": "Notifications/app/src/main/res/layout/custom_notification_layout.xml",
    "chars": 736,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        "
  },
  {
    "path": "Notifications/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "chars": 270,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "Notifications/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "chars": 270,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "Notifications/app/src/main/res/values/colors.xml",
    "chars": 208,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"color"
  },
  {
    "path": "Notifications/app/src/main/res/values/strings.xml",
    "chars": 76,
    "preview": "<resources>\n    <string name=\"app_name\">Notifications</string>\n</resources>\n"
  },
  {
    "path": "Notifications/app/src/main/res/values/styles.xml",
    "chars": 383,
    "preview": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
  },
  {
    "path": "Notifications/app/src/test/java/com/example/notifications/ExampleUnitTest.kt",
    "chars": 350,
    "preview": "package com.example.notifications\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, whi"
  },
  {
    "path": "Notifications/build.gradle",
    "chars": 661,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    e"
  },
  {
    "path": "Notifications/gradle/wrapper/gradle-wrapper.properties",
    "chars": 233,
    "preview": "#Sat Apr 20 11:00:18 CEST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER"
  },
  {
    "path": "Notifications/gradle.properties",
    "chars": 817,
    "preview": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will ov"
  },
  {
    "path": "Notifications/gradlew",
    "chars": 5296,
    "preview": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up"
  },
  {
    "path": "Notifications/gradlew.bat",
    "chars": 2176,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
  },
  {
    "path": "Notifications/settings.gradle",
    "chars": 15,
    "preview": "include ':app'\n"
  },
  {
    "path": "README.md",
    "chars": 1028,
    "preview": "# Blog\n\nList of all projects in the repository:\n\n- [Nestjs GraphQL Server](nest-graph-ql)\n- [Nestjs File uploading](nest"
  },
  {
    "path": "nest-auth/.dockerignore",
    "chars": 19,
    "preview": "/dist\n/node_modules"
  },
  {
    "path": "nest-auth/.gitignore",
    "chars": 375,
    "preview": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*"
  },
  {
    "path": "nest-auth/.prettierrc",
    "chars": 51,
    "preview": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "nest-auth/Dockerfile",
    "chars": 135,
    "preview": "FROM node:12\n\nWORKDIR /usr/src/app\n\nCOPY package*.json ./\n\nRUN npm ci\n\nCOPY . .\n\nRUN npm run build\n\nEXPOSE 3000\n\nCMD [ \""
  },
  {
    "path": "nest-auth/README.md",
    "chars": 3369,
    "preview": "<p align=\"center\">\n  <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\""
  },
  {
    "path": "nest-auth/docker-compose.yml",
    "chars": 410,
    "preview": "version: '3'\n\nservices:\n  nodejs:\n    build:\n      context: ./\n      dockerfile: Dockerfile\n    container_name: nodejs\n "
  },
  {
    "path": "nest-auth/nest-cli.json",
    "chars": 84,
    "preview": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "nest-auth/nodemon-debug.json",
    "chars": 163,
    "preview": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register"
  },
  {
    "path": "nest-auth/nodemon.json",
    "chars": 67,
    "preview": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "nest-auth/package.json",
    "chars": 2252,
    "preview": "{\n  \"name\": \"nest-auth\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n "
  },
  {
    "path": "nest-auth/src/app.controller.ts",
    "chars": 274,
    "preview": "import { Controller, Get } from '@nestjs/common';\nimport { AppService } from './app.service';\n\n@Controller()\nexport clas"
  },
  {
    "path": "nest-auth/src/app.module.ts",
    "chars": 512,
    "preview": "import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from '."
  },
  {
    "path": "nest-auth/src/app.service.ts",
    "chars": 142,
    "preview": "import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n  getHello(): string {\n    return "
  },
  {
    "path": "nest-auth/src/auth/auth.controller.ts",
    "chars": 1260,
    "preview": "import { Controller, Post, Body, Get, UseGuards } from '@nestjs/common';\nimport { UserService } from '../user/user.servi"
  },
  {
    "path": "nest-auth/src/auth/auth.module.ts",
    "chars": 375,
    "preview": "import { Module } from '@nestjs/common';\nimport { AuthService } from './auth.service';\nimport { AuthController } from '."
  },
  {
    "path": "nest-auth/src/auth/auth.service.ts",
    "chars": 502,
    "preview": "import { Injectable } from '@nestjs/common';\nimport { UserService } from '../user/user.service';\nimport { Payload } from"
  },
  {
    "path": "nest-auth/src/auth/jwt.strategy.ts",
    "chars": 906,
    "preview": "import { Injectable, HttpException, HttpStatus } from '@nestjs/common';\nimport { PassportStrategy } from '@nestjs/passpo"
  },
  {
    "path": "nest-auth/src/main.ts",
    "chars": 240,
    "preview": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  co"
  },
  {
    "path": "nest-auth/src/models/user.schema.ts",
    "chars": 731,
    "preview": "import * as mongoose from 'mongoose';\nimport * as bcrypt from 'bcrypt';\n\nexport const UserSchema = new mongoose.Schema({"
  },
  {
    "path": "nest-auth/src/types/payload.ts",
    "chars": 72,
    "preview": "export interface Payload {\n    email: string;\n    expiresIn?: string;\n}\n"
  },
  {
    "path": "nest-auth/src/types/user.ts",
    "chars": 140,
    "preview": "import { Document } from 'mongoose';\n\nexport interface User extends Document {\n    readonly email: string;\n    readonly "
  },
  {
    "path": "nest-auth/src/user/dto/create-user.dto.ts",
    "chars": 90,
    "preview": "export class CreateUserDto {\n    readonly email: string;\n    readonly password: string;\n}\n"
  },
  {
    "path": "nest-auth/src/user/dto/login-user.dto.ts",
    "chars": 89,
    "preview": "export class LoginUserDto {\n    readonly email: string;\n    readonly password: string;\n}\n"
  },
  {
    "path": "nest-auth/src/user/user.module.ts",
    "chars": 447,
    "preview": "import { Module } from '@nestjs/common';\nimport { UserService } from './user.service';\nimport { UserSchema } from '../mo"
  },
  {
    "path": "nest-auth/src/user/user.service.ts",
    "chars": 1646,
    "preview": "import { Injectable, Logger, HttpException, HttpStatus } from '@nestjs/common';\nimport { InjectModel } from '@nestjs/mon"
  },
  {
    "path": "nest-auth/test/app.e2e-spec.ts",
    "chars": 561,
    "preview": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from '"
  },
  {
    "path": "nest-auth/test/jest-e2e.json",
    "chars": 183,
    "preview": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-sp"
  },
  {
    "path": "nest-auth/tsconfig.build.json",
    "chars": 97,
    "preview": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "nest-auth/tsconfig.json",
    "chars": 325,
    "preview": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecorat"
  },
  {
    "path": "nest-auth/tslint.json",
    "chars": 426,
    "preview": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  }"
  },
  {
    "path": "nest-file-uploading/.dockerignore",
    "chars": 19,
    "preview": "/dist\n/node_modules"
  },
  {
    "path": "nest-file-uploading/.gitignore",
    "chars": 382,
    "preview": "# compiled output\n/dist\n/node_modules\n/files\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-deb"
  },
  {
    "path": "nest-file-uploading/.prettierrc",
    "chars": 51,
    "preview": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "nest-file-uploading/Dockerfile",
    "chars": 135,
    "preview": "FROM node:12\n\nWORKDIR /usr/src/app\n\nCOPY package*.json ./\n\nRUN npm ci\n\nCOPY . .\n\nRUN npm run build\n\nEXPOSE 3000\n\nCMD [ \""
  },
  {
    "path": "nest-file-uploading/README.md",
    "chars": 1072,
    "preview": "# Nestjs file uploading\n\nNestjs file uploading example demonstrating how to upload single and multiple files over an HTT"
  },
  {
    "path": "nest-file-uploading/docker-compose.yml",
    "chars": 170,
    "preview": "version: '3'\n\nservices:\n  nodejs:\n    build:\n      context: ./\n      dockerfile: Dockerfile\n    container_name: nodejs\n "
  },
  {
    "path": "nest-file-uploading/nest-cli.json",
    "chars": 84,
    "preview": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "nest-file-uploading/nodemon-debug.json",
    "chars": 163,
    "preview": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register"
  },
  {
    "path": "nest-file-uploading/nodemon.json",
    "chars": 67,
    "preview": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "nest-file-uploading/package.json",
    "chars": 1908,
    "preview": "{\n  \"name\": \"nest-file-uploading\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scr"
  },
  {
    "path": "nest-file-uploading/src/app.controller.ts",
    "chars": 1395,
    "preview": "import {\n  Controller,\n  Get,\n  Post,\n  UseInterceptors,\n  UploadedFile,\n  UploadedFiles,\n  Res,\n  Param,\n} from '@nestj"
  },
  {
    "path": "nest-file-uploading/src/app.module.ts",
    "chars": 284,
    "preview": "import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { MulterModule } from "
  },
  {
    "path": "nest-file-uploading/src/main.ts",
    "chars": 208,
    "preview": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  co"
  },
  {
    "path": "nest-file-uploading/src/utils/file-upload.utils.ts",
    "chars": 588,
    "preview": "import { extname } from 'path';\n\nexport const imageFileFilter = (req, file, callback) => {\n  if (!file.originalname.matc"
  },
  {
    "path": "nest-file-uploading/test/app.e2e-spec.ts",
    "chars": 561,
    "preview": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from '"
  },
  {
    "path": "nest-file-uploading/test/jest-e2e.json",
    "chars": 183,
    "preview": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-sp"
  },
  {
    "path": "nest-file-uploading/tsconfig.build.json",
    "chars": 97,
    "preview": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "nest-file-uploading/tsconfig.json",
    "chars": 325,
    "preview": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecorat"
  },
  {
    "path": "nest-file-uploading/tslint.json",
    "chars": 426,
    "preview": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  }"
  },
  {
    "path": "nest-graph-ql/.gitignore",
    "chars": 375,
    "preview": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*"
  },
  {
    "path": "nest-graph-ql/.prettierrc",
    "chars": 51,
    "preview": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "nest-graph-ql/README.md",
    "chars": 2131,
    "preview": "# Nestjs GraphQL\n\nExample demonstrating how to build a GraphQL CRUD application using Nestjs and MongoDB. For an in-dept"
  },
  {
    "path": "nest-graph-ql/docker-compose.yaml",
    "chars": 159,
    "preview": "version: '3.7'\nservices:\n  mongodb:\n    image: mongo:latest\n    ports:\n      - 27017:27017\n    volumes:\n      - mongodb_"
  },
  {
    "path": "nest-graph-ql/nest-cli.json",
    "chars": 84,
    "preview": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "nest-graph-ql/nodemon-debug.json",
    "chars": 163,
    "preview": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register"
  }
]

// ... and 91 more files (download for full content)

About this extraction

This page contains the full source code of the TannerGabriel/Blog GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 291 files (239.1 KB), approximately 74.2k tokens, and a symbol index with 207 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!