├── .dockerignore ├── .eslintrc.json ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── PULL_REQUEST_TEMPLATE.md ├── SECURITY.md ├── labeler.yml ├── release.yml └── workflows │ ├── builds.yml │ ├── pull_requests.yml │ ├── push.yml │ └── style.yml ├── .gitignore ├── .prettierignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── Dockerfile.prod ├── LICENSE ├── Makefile ├── README.md ├── app └── globals.css ├── components.json ├── components ├── ChatwootWidget.tsx ├── Dashboard.tsx ├── Footer.tsx ├── LeftPanel.tsx ├── Navbar.tsx ├── ReorderableList.tsx ├── ui │ ├── alert-dialog.tsx │ ├── button.tsx │ ├── card.tsx │ ├── command.tsx │ ├── dialog.tsx │ ├── icons.tsx │ ├── input.tsx │ ├── label.tsx │ ├── popover.tsx │ ├── table.tsx │ ├── textarea.tsx │ ├── toast.tsx │ ├── toaster.tsx │ └── use-toast.ts └── utils.tsx ├── docker-compose.yml ├── globals.d.ts ├── lib └── utils.ts ├── next-env.d.ts ├── next.config.js ├── package.json ├── pages ├── _app.tsx ├── _document.tsx └── index.tsx ├── postcss.config.js ├── public ├── favicon.ico └── quack.png ├── styles ├── Footer.module.css ├── LeftPanel.module.css ├── Navbar.module.css └── globals.css ├── tailwind.config.js ├── tsconfig.json └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | .vscode 4 | .gitignore 5 | README.md 6 | .dockerignore 7 | .git 8 | .github 9 | docker-compose.yml 10 | Makefile 11 | traefik.toml 12 | LICENSE 13 | CONTRIBUTING.md 14 | CODE_OF_CONDUCT.md 15 | .prettierignore 16 | .env 17 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "ecmaVersion": 2018, 5 | "sourceType": "module" 6 | }, 7 | "env": { 8 | "node": true 9 | }, 10 | "extends": [ 11 | "eslint:recommended", 12 | "next", 13 | "plugin:@typescript-eslint/recommended", 14 | "plugin:prettier/recommended", 15 | "plugin:import/recommended", 16 | "plugin:import/typescript" 17 | ], 18 | "plugins": ["@typescript-eslint", "prettier", "import"], 19 | "settings": { 20 | "typescript": { 21 | "project": "./tsconfig.json" 22 | } 23 | }, 24 | "rules": { 25 | "sort-imports": [ 26 | "error", 27 | { 28 | "ignoreCase": false, 29 | "ignoreDeclarationSort": true, // don"t want to sort import lines, use eslint-plugin-import instead 30 | "ignoreMemberSort": false, 31 | "memberSyntaxSortOrder": ["none", "all", "multiple", "single"], 32 | "allowSeparatedGroups": true 33 | } 34 | ], 35 | // turn on errors for missing imports 36 | "import/no-unresolved": "error", 37 | // 'import/no-named-as-default-member': 'off', 38 | "import/order": [ 39 | "error", 40 | { 41 | "groups": [ 42 | "builtin", // Built-in imports (come from NodeJS native) go first 43 | "external", // <- External imports 44 | "internal", // <- Absolute imports 45 | ["sibling", "parent"], // <- Relative imports, the sibling and parent types they can be mingled together 46 | "index", // <- index imports 47 | "unknown" // <- unknown 48 | ], 49 | "newlines-between": "always", 50 | "alphabetize": { 51 | /* sort in ascending order. Options: ["ignore", "asc", "desc"] */ 52 | "order": "asc", 53 | /* ignore case. Options: [true, false] */ 54 | "caseInsensitive": true 55 | } 56 | } 57 | ], 58 | "@typescript-eslint/no-explicit-any": "off", 59 | "@typescript-eslint/no-unused-vars": "off", 60 | "@typescript-eslint/ban-ts-comment": "off", 61 | "react-hooks/exhaustive-deps": "off" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # This is a comment. 2 | # Each line is a file pattern followed by one or more owners. 3 | 4 | # These owners will be the default owners for everything in 5 | # the repo. Unless a later match takes precedence, 6 | # @global-owner1 and @global-owner2 will be requested for 7 | # review when someone opens a pull request. 8 | * @frgfm 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: 🐛 Bug report 2 | description: Create a report to help us improve the library 3 | labels: "type: bug" 4 | assignees: frgfm 5 | 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: > 10 | #### Before reporting a bug, please check that the issue hasn't already been addressed in [the existing and past issues](https://github.com/quack-ai/platform/issues?q=is%3Aissue). 11 | - type: textarea 12 | attributes: 13 | label: Bug description 14 | description: | 15 | A clear and concise description of what the bug is. 16 | 17 | Please explain the result you observed and the behavior you were expecting. 18 | placeholder: | 19 | A clear and concise description of what the bug is. 20 | validations: 21 | required: true 22 | 23 | - type: textarea 24 | attributes: 25 | label: Code snippet to reproduce the bug 26 | description: | 27 | Sample code to reproduce the problem. 28 | 29 | Please wrap your code snippet with ```` ```triple quotes blocks``` ```` for readability. 30 | placeholder: | 31 | ```python 32 | Sample code to reproduce the problem 33 | ``` 34 | validations: 35 | required: true 36 | - type: textarea 37 | attributes: 38 | label: Error traceback 39 | description: | 40 | The error message you received running the code snippet, with the full traceback. 41 | 42 | Please wrap your error message with ```` ```triple quotes blocks``` ```` for readability. 43 | placeholder: | 44 | ``` 45 | The error message you got, with the full traceback. 46 | ``` 47 | validations: 48 | required: true 49 | - type: textarea 50 | attributes: 51 | label: Environment 52 | description: | 53 | Please run the following command and paste the output below. 54 | ```sh 55 | wget https://raw.githubusercontent.com/quack-ai/platform/main/.github/collect_env.py 56 | # For security purposes, please check the contents of collect_env.py before running it. 57 | python collect_env.py 58 | ``` 59 | validations: 60 | required: true 61 | - type: markdown 62 | attributes: 63 | value: > 64 | Thanks for helping us improve the library! 65 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Usage questions 4 | url: https://github.com/quack-ai/platform/discussions 5 | about: Ask questions and discuss with other Quack community members 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: 🚀 Feature request 2 | description: Submit a proposal/request for a new feature for the maintainer platform 3 | labels: "type: new feature" 4 | assignees: frgfm 5 | 6 | body: 7 | - type: textarea 8 | attributes: 9 | label: 🚀 Feature 10 | description: > 11 | A clear and concise description of the feature proposal 12 | validations: 13 | required: true 14 | - type: textarea 15 | attributes: 16 | label: Motivation & pitch 17 | description: > 18 | Please outline the motivation for the proposal. Is your feature request related to a specific problem? e.g., *"I'm working on X and would like Y to be possible"*. If this is related to another GitHub issue, please link here too. 19 | validations: 20 | required: true 21 | - type: textarea 22 | attributes: 23 | label: Alternatives 24 | description: > 25 | A description of any alternative solutions or features you've considered, if any. 26 | - type: textarea 27 | attributes: 28 | label: Additional context 29 | description: > 30 | Add any other context or screenshots about the feature request. 31 | - type: markdown 32 | attributes: 33 | value: > 34 | Thanks for contributing 🎉 35 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # What does this PR do? 2 | 3 | 9 | 10 | 11 | 12 | Closes # (issue) 13 | 14 | ## Before submitting 15 | 16 | - [ ] Was this discussed/approved in a Github [issue](https://github.com/quack-ai/platform/issues?q=is%3Aissue) or a [discussion](https://github.com/quack-ai/platform/discussions)? Please add a link to it if that's the case. 17 | - [ ] You have read the [maintainer guidelines](https://github.com/quack-ai/platform/blob/main/CONTRIBUTING.md#submitting-a-pull-request) and followed them in this PR. 18 | - [ ] Did you make sure to update the documentation with your changes? Here are the 19 | [documentation guidelines](https://github.com/quack-ai/platform/tree/main/docs). 20 | - [ ] Did you write any new necessary tests? 21 | -------------------------------------------------------------------------------- /.github/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting security issues 2 | 3 | If you believe you have found a security vulnerability in the platform, we encourage you to let us know right away. We will investigate all legitimate reports and do our best to quickly fix the problem. 4 | 5 | Please report security issues using https://github.com/quack-ai/platform/security/advisories/new 6 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | "ext: app": 2 | - app/* 3 | 4 | "ext: lib": 5 | - lib/* 6 | 7 | "ext: public": 8 | - public/* 9 | 10 | "ext: styles": 11 | - styles/* 12 | 13 | "module: pages": 14 | - pages/* 15 | 16 | "module: components": 17 | - components/* 18 | 19 | "topic: build": 20 | - package.json 21 | - yarn.lock 22 | - "*.config.js" 23 | - tsconfig.json 24 | 25 | "topic: ci": 26 | - .github/* 27 | 28 | "topic: docker": 29 | - docker-compose.yml 30 | - docker-compose.test.yml 31 | - Dockerfile 32 | - traefik.yml 33 | - .dockerignore 34 | 35 | "topic: docs": 36 | - README.md 37 | - CONTRIBUTING.md 38 | - CODE_OF_CONDUCT.md 39 | 40 | "topic: style": 41 | - .eslintrc.json 42 | - .prettierignore 43 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | changelog: 2 | exclude: 3 | labels: 4 | - ignore-for-release 5 | categories: 6 | - title: Breaking Changes 🛠 7 | labels: 8 | - "type: breaking change" 9 | # NEW FEATURES 10 | - title: New Features 🚀 11 | labels: 12 | - "type: new feature" 13 | # BUG FIXES 14 | - title: Bug Fixes 🐛 15 | labels: 16 | - "type: bug" 17 | # IMPROVEMENTS 18 | - title: Improvements 19 | labels: 20 | - "type: enhancement" 21 | # MISC 22 | - title: Miscellaneous 23 | labels: 24 | - "type: misc" 25 | -------------------------------------------------------------------------------- /.github/workflows/builds.yml: -------------------------------------------------------------------------------- 1 | name: builds 2 | 3 | on: 4 | push: 5 | branches: main 6 | pull_request: 7 | branches: main 8 | 9 | jobs: 10 | docker: 11 | runs-on: ${{ matrix.os }} 12 | strategy: 13 | matrix: 14 | os: [ubuntu-latest] 15 | steps: 16 | - uses: actions/checkout@v3 17 | - name: Build & run docker 18 | env: 19 | NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} 20 | NEXT_PUBLIC_REDIRECT_URI: ${{ secrets.NEXT_PUBLIC_REDIRECT_URI }} 21 | run: docker compose up -d --build 22 | - name: Docker sanity check 23 | run: sleep 20 && nc -vz localhost 3000 24 | - name: Debug 25 | run: docker compose logs 26 | - name: Ping server 27 | run: curl http://localhost:3000 28 | -------------------------------------------------------------------------------- /.github/workflows/pull_requests.yml: -------------------------------------------------------------------------------- 1 | name: pull_requests 2 | 3 | on: 4 | pull_request: 5 | branches: main 6 | 7 | jobs: 8 | triage: 9 | permissions: 10 | contents: read 11 | pull-requests: write 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/labeler@v4 15 | with: 16 | repo-token: "${{ secrets.GITHUB_TOKEN }}" 17 | -------------------------------------------------------------------------------- /.github/workflows/push.yml: -------------------------------------------------------------------------------- 1 | name: push 2 | on: 3 | push: 4 | branches: main 5 | 6 | jobs: 7 | dockerhub: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - name: Build docker 12 | env: 13 | NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} 14 | NEXT_PUBLIC_REDIRECT_URI: ${{ secrets.NEXT_PUBLIC_REDIRECT_URI }} 15 | NEXT_PUBLIC_CHATWOOT_ENDPOINT: ${{ secrets.NEXT_PUBLIC_CHATWOOT_ENDPOINT }} 16 | NEXT_PUBLIC_CHATWOOT_TOKEN: ${{ secrets.NEXT_PUBLIC_CHATWOOT_TOKEN }} 17 | run: docker build . -t quackai/platform:latest 18 | - name: Login to DockerHub 19 | uses: docker/login-action@v3 20 | with: 21 | username: quackai 22 | password: ${{ secrets.DOCKERHUB_PW }} 23 | - name: Push to hub 24 | run: docker push quackai/platform:latest 25 | 26 | check-docker: 27 | needs: dockerhub 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Run the latest image 31 | run: | 32 | docker pull quackai/platform:latest 33 | docker inspect -f '{{ .Created }}' quackai/platform:latest 34 | -------------------------------------------------------------------------------- /.github/workflows/style.yml: -------------------------------------------------------------------------------- 1 | name: style 2 | 3 | on: 4 | push: 5 | branches: main 6 | pull_request: 7 | branches: main 8 | 9 | jobs: 10 | prettier: 11 | runs-on: ${{ matrix.os }} 12 | strategy: 13 | matrix: 14 | os: [ubuntu-latest] 15 | node: [18] 16 | steps: 17 | - uses: actions/checkout@v2 18 | - uses: actions/setup-node@v3 19 | with: 20 | node-version: ${{ matrix.node }} 21 | - name: Run prettier 22 | run: | 23 | yarn install --dev --exact --frozen-lockfile 24 | yarn format:check 25 | eslint: 26 | runs-on: ${{ matrix.os }} 27 | strategy: 28 | matrix: 29 | os: [ubuntu-latest] 30 | node: [18] 31 | steps: 32 | - uses: actions/checkout@v2 33 | - uses: actions/setup-node@v3 34 | with: 35 | node-version: ${{ matrix.node }} 36 | - name: Run eslint 37 | run: | 38 | yarn install --dev --exact --frozen-lockfile 39 | yarn lint:check 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | 132 | # VSCode 133 | *.vsix 134 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .next 2 | node_modules 3 | .storyboook 4 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | - Demonstrating empathy and kindness toward other people 21 | - Being respectful of differing opinions, viewpoints, and experiences 22 | - Giving and gracefully accepting constructive feedback 23 | - Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | - Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | - The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | - Trolling, insulting or derogatory comments, and personal or political attacks 33 | - Public or private harassment 34 | - Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | - Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | support@quack-ai.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to platform 2 | 3 | Everything you need to know to contribute efficiently to the project! 4 | 5 | Whatever the way you wish to contribute to the project, please respect the [code of conduct](CODE_OF_CONDUCT.md). 6 | 7 | ## Codebase structure 8 | 9 | - [`src/`](https://github.com/quack-ai/platform/blob/main/src/) - The actual platform codebase 10 | - [`./traefik.yml`](https://github.com/quack-ai/platform/blob/main/traefik.yml) - Configuration file for the reverse proxy 11 | 12 | ## Continuous Integration 13 | 14 | This project uses the following integrations to ensure proper codebase maintenance: 15 | 16 | - [Github Worklow](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow) - run jobs for package build and coverage 17 | - [Codacy](https://www.codacy.com/) - analyzes commits for code quality 18 | - [Codecov](https://codecov.io/) - reports back coverage results 19 | - [Traefik](https://traefik.io/) - the reverse proxy and load balancer 20 | 21 | As a contributor, you will only have to ensure coverage of your code by adding appropriate unit testing of your code. 22 | 23 | ## Feedback 24 | 25 | ### Feature requests & bug report 26 | 27 | Whether you encountered a problem, or you have a feature suggestion, your input has value and can be used by contributors to reference it in their developments. For this purpose, we advise you to use Github [issues](https://github.com/quack-ai/platform/issues). 28 | 29 | First, check whether the topic wasn't already covered in an open / closed issue. If not, feel free to open a new one! When doing so, use issue templates whenever possible and provide enough information for other contributors to jump in. 30 | 31 | ### Questions 32 | 33 | If you are wondering how to do something with Contribution API, or a more general question, you should consider checking out Github [discussions](https://github.com/quack-ai/platform/discussions). See it as a Q&A forum, or the project-specific StackOverflow! 34 | 35 | ## Submitting a Pull Request 36 | 37 | ### Preparing your local branch 38 | 39 | 1 - Fork this [repository](https://github.com/quack-ai/platform) by clicking on the "Fork" button at the top right of the page. This will create a copy of the project under your GitHub account (cf. [Fork a repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo)). 40 | 41 | 2 - [Clone your fork](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) to your local disk and set the upstream to this repo 42 | 43 | ```shell 44 | git clone git@github.com:/platform.git 45 | cd platform 46 | git remote add upstream https://github.com/quack-ai/platform.git 47 | ``` 48 | 49 | 3 - You should not work on the `main` branch, so let's create a new one 50 | 51 | ```shell 52 | git checkout -b a-short-description 53 | ``` 54 | 55 | ### Developing your feature 56 | 57 | #### Commits 58 | 59 | - **Code**: ensure to provide docstrings to your Python code. In doing so, please follow [Google-style](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) so it can ease the process of documentation later. 60 | - **Commit message**: please follow [Udacity guide](http://udacity.github.io/git-styleguide/) 61 | 62 | #### Unit tests 63 | 64 | In order to run the same unit tests as the CI workflows, you can run unittests locally: 65 | 66 | ```shell 67 | make test 68 | ``` 69 | 70 | #### Code quality 71 | 72 | To run all quality checks together 73 | 74 | ```shell 75 | make quality 76 | ``` 77 | 78 | The previous command won't modify anything in your codebase. Some fixes (import ordering and code formatting) can be done automatically using the following command: 79 | 80 | ```shell 81 | make style 82 | ``` 83 | 84 | ### Submit your modifications 85 | 86 | Push your last modifications to your remote branch 87 | 88 | ```shell 89 | git push -u origin a-short-description 90 | ``` 91 | 92 | Then [open a Pull Request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) from your fork's branch. Follow the instructions of the Pull Request template and then click on "Create a pull request". 93 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine3.15 2 | 3 | WORKDIR /app 4 | 5 | COPY package.json yarn.lock ./ 6 | 7 | RUN yarn install --frozen-lockfile \ 8 | && yarn cache clean 9 | 10 | COPY . . 11 | 12 | CMD yarn dev 13 | EXPOSE 3000 14 | -------------------------------------------------------------------------------- /Dockerfile.prod: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine3.15 as builder 2 | 3 | WORKDIR /app 4 | 5 | COPY package.json yarn.lock ./ 6 | 7 | RUN yarn install --frozen-lockfile && yarn cache clean 8 | 9 | COPY . . 10 | 11 | RUN yarn build 12 | 13 | FROM node:18-alpine3.15 as runner 14 | 15 | WORKDIR /app 16 | 17 | COPY --from=builder /app/yarn.lock . 18 | COPY --from=builder /app/package.json . 19 | COPY --from=builder /app/next.config.js ./ 20 | COPY --from=builder /app/public ./public 21 | COPY --from=builder /app/.next/standalone ./ 22 | COPY --from=builder /app/.next/static ./.next/static 23 | 24 | CMD node server.js 25 | EXPOSE 3000 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # this target runs checks on all files 2 | quality: 3 | yarn lint:check 4 | yarn format:check 5 | yarn lint 6 | 7 | # this target runs checks on all files and potentially modifies some of them 8 | style: 9 | yarn lint:fix 10 | yarn format:fix 11 | yarn lint --fix 12 | 13 | # Build the docker 14 | build: 15 | docker build . -t quackai/platform:latest 16 | 17 | prod: 18 | docker build -f Dockerfile.prod . -t quackai/platform:node18-alpine3.15 19 | 20 | # Run the docker 21 | run: 22 | docker compose up -d --build 23 | 24 | # Run the docker 25 | stop: 26 | docker compose down 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 |

5 | Quack platform - Guideline management 6 |

7 |

8 | VSCode extension ・ 9 | Backend API ・ 10 | Frontend dashboard ・ 11 | Documentation 12 |

13 |

14 | 15 |

16 | 17 | CI Status 18 | 19 | 20 | eslint 21 | 22 | 23 | prettier 24 | 25 | 26 | codacy 27 | 28 |

29 | 30 |

31 | 32 | Docker image 33 | 34 | 35 | React 36 | 37 | Deploy with Vercel 38 | 39 | license 40 | 41 |

42 | 43 |

44 | 47 | 48 | 49 | 50 | 51 | Twitter 52 | 53 |

54 | 55 | This platform is meant for maintainers to curate the guidelines for their contributors. 56 | 57 | ## Quick Tour 58 | 59 | ### Running/stopping the service 60 | 61 | You can run the API containers using this command: 62 | 63 | ```shell 64 | make run 65 | ``` 66 | 67 | You can now navigate to [`http://localhost:3000`](http://localhost:3000) to interact with the [Next JS](https://nextjs.org/) app. 68 | 69 | ![screenshot](https://github.com/quack-ai/platform/releases/download/v0.0.1/next-platform.png) 70 | 71 | In order to stop the service, run: 72 | 73 | ```shell 74 | make stop 75 | ``` 76 | 77 | ## Installation 78 | 79 | ### Prerequisites 80 | 81 | - [Docker](https://docs.docker.com/engine/install/) 82 | - [Docker compose](https://docs.docker.com/compose/) 83 | - [Make](https://www.gnu.org/software/make/) (optional) 84 | 85 | The project was designed so that everything runs with Docker orchestration (standalone virtual environment), so you won't need to install any additional libraries. 86 | 87 | ## Configuration 88 | 89 | In order to run the project, you will need to specific some information, which can be done using a `.env` file. 90 | This file will have to hold the following information: 91 | 92 | - `NEXT_PUBLIC_API_URL`: the endpoint of the Quack API you're using 93 | - `NEXT_PUBLIC_REDIRECT_URI`: the URL the OAuth app redirects to 94 | 95 | Optionally, the following information can be added: 96 | 97 | - `NEXT_PUBLIC_POSTHOG_KEY`: the project key of your [PostHog](https://posthog.com/) service, for product analytics 98 | 99 | So your `.env` file should look like something similar to: 100 | 101 | ``` 102 | NEXT_PUBLIC_API_URL=http://your-quack-api-host.com/api/v1 103 | NEXT_PUBLIC_REDIRECT_URI=http://localhost:3000/ 104 | NEXT_PUBLIC_POSTHOG_KEY=phc_my_api_key 105 | ``` 106 | 107 | The file should be placed at the root folder of your local copy of the project. 108 | 109 | ## Roadmap 110 | 111 | The ultimate goal for this platform is to offer a smooth maintenance experience for any project. 112 | The development efforts will be focused on achieving the following milestones: 113 | 114 | - ✏️ Get the possibility to add/edit/delete/reorder guidelines for your projects 115 | - 👁️‍🗨️ Automatically parse & interpret guidelines from repository content, issues and PRs 116 | - 📢 Have conditional guidelines and fork guideline flows from other public projects 117 | 118 | ## Telemetry 119 | 120 | ### Why we collect information 121 | 122 | Quack is dedicated to transform the contribution workflow of developers. Developer tools are among the most difficult types of product to build and we need to better understand where to allocate/reduce our efforts over time. 123 | 124 | Since we want to keep providing free options for our services in the future, and since we don't want to rely on advertising, we humbly ask you to share limited usage data so that we can improve the products and services that we offer. 125 | 126 | ### What we collect 127 | 128 | For each event, here is the largest amount of data we collect: 129 | 130 | - Event identifiers: the event type (e.g.`fetch-guidelines`) and potentially the scope (e.g. the repository) 131 | - User information: depending on the telemetry setting, either your GitHub username or an anonymized UUID specific to you (created when you first activate the extension). 132 | 133 | And since the extension is open source, you can navigate the codebase to verify the above information if you feel like it ;) 134 | 135 | ### What you can do about it 136 | 137 | This data collection is done using [Posthog](https://posthog.com/) and can be: 138 | 139 | - 😟 anonymized: by default we'll identify your actions with your GitHub username. We'll keep an option to prevent that identification, as we understand it's important for developers to have this choice. 140 | - 😭 disabled: like in most VSCode extensions, you have the ability to disable telemetry completely. 141 | 142 | ## Copying & distribution 143 | 144 | Copyright (C) 2023, Quack AI. 145 | 146 | This program is licensed under the Apache License 2.0. 147 | See LICENSE or go to for full license details. 148 | 149 | ## Contributing 150 | 151 | Feeling like improving the interface? Or perhaps submitting a new feature idea? Any sort of contribution is greatly appreciated! 152 | 153 | You can find a short guide in [`CONTRIBUTING`](CONTRIBUTING.md) to help grow this project! And if you're interested, you can join us on [![](https://img.shields.io/badge/Discord-join-continue.svg?labelColor=191937&color=6F6FF7&logo=discord)](https://discord.gg/E9rY3bVCWd) 154 | -------------------------------------------------------------------------------- /app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer base { 6 | :root { 7 | --background: 0 0% 100%; 8 | --foreground: 222.2 84% 4.9%; 9 | 10 | --muted: 210 40% 96.1%; 11 | --muted-foreground: 215.4 16.3% 46.9%; 12 | 13 | --popover: 0 0% 100%; 14 | --popover-foreground: 222.2 84% 4.9%; 15 | 16 | --card: 0 0% 100%; 17 | --card-foreground: 222.2 84% 4.9%; 18 | 19 | --border: 214.3 31.8% 91.4%; 20 | --input: 214.3 31.8% 91.4%; 21 | 22 | --primary: 222.2 47.4% 11.2%; 23 | --primary-foreground: 210 40% 98%; 24 | 25 | --secondary: 210 40% 96.1%; 26 | --secondary-foreground: 222.2 47.4% 11.2%; 27 | 28 | --accent: 210 40% 96.1%; 29 | --accent-foreground: 222.2 47.4% 11.2%; 30 | 31 | --destructive: 0 84.2% 60.2%; 32 | --destructive-foreground: 210 40% 98%; 33 | 34 | --ring: 215 20.2% 65.1%; 35 | 36 | --radius: 0.5rem; 37 | } 38 | 39 | .dark { 40 | --background: 222.2 84% 4.9%; 41 | --foreground: 210 40% 98%; 42 | 43 | --muted: 217.2 32.6% 17.5%; 44 | --muted-foreground: 215 20.2% 65.1%; 45 | 46 | --popover: 222.2 84% 4.9%; 47 | --popover-foreground: 210 40% 98%; 48 | 49 | --card: 222.2 84% 4.9%; 50 | --card-foreground: 210 40% 98%; 51 | 52 | --border: 217.2 32.6% 17.5%; 53 | --input: 217.2 32.6% 17.5%; 54 | 55 | --primary: 210 40% 98%; 56 | --primary-foreground: 222.2 47.4% 11.2%; 57 | 58 | --secondary: 217.2 32.6% 17.5%; 59 | --secondary-foreground: 210 40% 98%; 60 | 61 | --accent: 217.2 32.6% 17.5%; 62 | --accent-foreground: 210 40% 98%; 63 | 64 | --destructive: 0 62.8% 30.6%; 65 | --destructive-foreground: 0 85.7% 97.3%; 66 | 67 | --ring: 217.2 32.6% 17.5%; 68 | } 69 | } 70 | 71 | @layer base { 72 | * { 73 | @apply border-border; 74 | } 75 | body { 76 | @apply bg-background text-foreground; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "styles/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "../../lib/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /components/ChatwootWidget.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export class ChatwootWidget extends React.Component { 4 | componentDidMount() { 5 | // Add Chatwoot Settings 6 | window.chatwootSettings = { 7 | hideMessageBubble: false, 8 | position: "right", // This can be left or right 9 | locale: "en", // Language to be set 10 | type: "standard", // [standard, expanded_bubble] 11 | }; 12 | 13 | // Paste the script from inbox settings except the