diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..91b6a95 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.commitlintrc.ts b/.commitlintrc.ts new file mode 100644 index 0000000..0d99793 --- /dev/null +++ b/.commitlintrc.ts @@ -0,0 +1,56 @@ +import { getWorkspacePackageNames } from './scripts/utils' + +// ------------------------------------------------------------------ + +// -- CUSTOM COMMITLINT CONFIGURATION -- +// This configuration is used to enforce the scope-enum rule. +// The scope-enum rule requires that the scope of a commit message +// must be one of the defined values. +// The defined values are the package names of the workspace. +// The package names are extracted from the package.json files. +// +// This was previously achieved using @commitlint/config-pnpm-scopes +// which provides a custom commitlint configuration. + +// ------------------------------------------------------------------ + +interface Context { + cwd?: string +} + +// ------------------------------------------------------------------ + +/** + * Function to get all projects in the workspace + * @param context The context object + * @returns An array of all projects in the workspace + */ +function getProjects(context?: Context): string[] { + const ctx = context ?? {} + const cwd = ctx.cwd ?? process.cwd() + + return getWorkspacePackageNames(cwd) + .reduce((projects: string[], name) => { + if (name.startsWith('@')) { + const project = name.split('/')[1] + + if (typeof project === 'string') { + projects.push(project) + } + + projects.push(name) + } + + return projects + }, []) + .sort() +} + +// We are exporting a custom commitlint configuration +export default { + extends: ['@commitlint/config-conventional'], + utils: { getProjects }, + rules: { + 'scope-enum': (ctx: Context) => [2, 'always', getProjects(ctx)], + }, +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1166a4a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..b7c5cc9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +# These are supported funding model platforms +github: [prodkt] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..8786bfe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,27 @@ +--- +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. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..2f28cea --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..b89b6ff --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,7 @@ +Fixes # + +## Proposed Changes + +- +- +- diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 0000000..091b4b0 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,24 @@ +name: 'Setup' +description: 'Common setup steps for Actions' + +runs: + using: composite + steps: + - uses: oven-sh/setup-bun@v1 + name: Install bun + + - uses: actions/cache@v4 + name: Setup bun cache + with: + path: ~/.bun/install/cache + key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.bun }}-bun- + + - name: Install dependencies + shell: bash + run: bun install + + - name: Install Playwright Browsers + shell: bash + run: bun playwright install --with-deps diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b12142c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,111 @@ +name: Main CI + +on: + push: + branches: + - main + +env: + # These are needed to enable turborepo's remote task caching + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + +jobs: + spell-and-md-lint: + name: Spellcheck and Markdown Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup + uses: ./.github/actions/setup + + - name: Checks + run: bun turbo lint:md lint:spell + + web: + name: Web CI + runs-on: ubuntu-latest + + environment: Production + + env: + # Database URL + DATABASE_URL: ${{ secrets.DATABASE_URL }} + + # Auth Secret + AUTH_SECRET: ${{ secrets.AUTH_SECRET }} + + # Github OAuth + AUTH_GITHUB_ID: ${{ secrets.AUTH_GITHUB_ID }} + AUTH_GITHUB_SECRET: ${{ secrets.AUTH_GITHUB_SECRET }} + + # Google OAuth + AUTH_GOOGLE_ID: ${{ secrets.AUTH_GOOGLE_ID }} + AUTH_GOOGLE_SECRET: ${{ secrets.AUTH_GOOGLE_SECRET }} + + # Uploadthing + UPLOADTHING_SECRET: ${{ secrets.UPLOADTHING_SECRET }} + UPLOADTHING_APP_ID: ${{ secrets.UPLOADTHING_APP_ID }} + + # Unkey + UNKEY_ROOT_KEY: ${{ secrets.UNKEY_ROOT_KEY }} + UNKEY_NAMESPACE: ${{ secrets.UNKEY_NAMESPACE }} + + # Sentry + NEXT_PUBLIC_SENTRY_DSN: ${{ vars.PUBLIC_SENTRY_DSN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: web + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + + # Posthog + NEXT_PUBLIC_POSTHOG_HOST: ${{ vars.PUBLIC_POSTHOG_HOST }} + NEXT_PUBLIC_POSTHOG_KEY: ${{ secrets.NEXT_PUBLIC_POSTHOG_KEY }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup + uses: ./.github/actions/setup + + - name: Checks + run: bun turbo lint typecheck build test:e2e --filter=@prodkt/web + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: web-playwright-report + path: apps/web/playwright-report/ + retention-days: 30 + + marketing: + name: Marketing CI + runs-on: ubuntu-latest + + environment: Production + + env: + # Sentry + PUBLIC_SENTRY_DSN: ${{ vars.PUBLIC_SENTRY_DSN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: marketing + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup + uses: ./.github/actions/setup + + - name: Checks + run: bun turbo lint typecheck build test:e2e --filter=@prodkt/marketing diff --git a/.github/workflows/pr-cleanup.yml b/.github/workflows/pr-cleanup.yml new file mode 100644 index 0000000..64002ce --- /dev/null +++ b/.github/workflows/pr-cleanup.yml @@ -0,0 +1,20 @@ +name: Clean up after after a PR is closed or merged +run-name: Clean up PR database +on: + pull_request: + types: [closed] + +jobs: + delete-db-branch: + runs-on: ubuntu-latest + steps: + - name: Get branch name + id: branch_name + uses: tj-actions/branch-names@v8 + + - name: Delete Neon Branch + uses: neondatabase/delete-branch-action@v3 + with: + project_id: ${{ secrets.NEON_PROJECT_ID }} + branch: web/pr-${{ github.event.number }}-${{ steps.branch_name.outputs.current_branch }} + api_key: ${{ secrets.NEON_API_KEY }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..0b7714b --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,128 @@ +name: Pull Request CI + +on: [pull_request] + +env: + # This enables turborepo's remote task caching + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + +jobs: + spell-and-md-lint: + name: Spellcheck and Markdown Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup + uses: ./.github/actions/setup + + - name: Checks + run: bun turbo lint:md lint:spell + + web: + name: Web CI + runs-on: ubuntu-latest + + env: + # We need these to create the Neon DB branch for this PR + NEON_DATABASE_USERNAME: ${{ secrets.NEON_DATABASE_USERNAME }} + NEON_API_KEY: ${{ secrets.NEON_API_KEY }} + NEON_PROJECT_ID: ${{ secrets.NEON_PROJECT_ID }} + + # Auth Secret + AUTH_SECRET: ${{ secrets.AUTH_SECRET }} + + # Github OAuth + AUTH_GITHUB_ID: ${{ secrets.AUTH_GITHUB_ID }} + AUTH_GITHUB_SECRET: ${{ secrets.AUTH_GITHUB_SECRET }} + + # Google OAuth + AUTH_GOOGLE_ID: ${{ secrets.AUTH_GOOGLE_ID }} + AUTH_GOOGLE_SECRET: ${{ secrets.AUTH_GOOGLE_SECRET }} + + # Uploadthing + UPLOADTHING_SECRET: ${{ secrets.UPLOADTHING_SECRET }} + UPLOADTHING_APP_ID: ${{ secrets.UPLOADTHING_APP_ID }} + + # Unkey + UNKEY_ROOT_KEY: ${{ secrets.UNKEY_ROOT_KEY }} + UNKEY_NAMESPACE: ${{ secrets.UNKEY_NAMESPACE }} + + # Sentry + NEXT_PUBLIC_SENTRY_DSN: ${{ vars.PUBLIC_SENTRY_DSN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: web + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + + # Posthog + NEXT_PUBLIC_POSTHOG_HOST: ${{ vars.PUBLIC_POSTHOG_HOST }} + NEXT_PUBLIC_POSTHOG_KEY: ${{ secrets.NEXT_PUBLIC_POSTHOG_KEY }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Get branch name + id: branch_name + uses: tj-actions/branch-names@v8 + + - name: Setup + uses: ./.github/actions/setup + + - name: Create Neon DB Branch + id: create-branch + uses: neondatabase/create-branch-action@v4 + with: + project_id: ${{ env.NEON_PROJECT_ID }} + branch_name: web/pr-${{ github.event.number }}-${{ steps.branch_name.outputs.current_branch }} + username: ${{ env.NEON_DATABASE_USERNAME }} + api_key: ${{ env.NEON_API_KEY }} + + - name: Set DATABASE_URL + shell: bash + run: | + echo "DATABASE_URL=${{ steps.create-branch.outputs.db_url }}?sslmode=require" >> $GITHUB_ENV + + - name: Checks + run: bun turbo lint typecheck build test:e2e --filter=@prodkt/web + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: web-playwright-report + path: apps/web/playwright-report/ + retention-days: 30 + + marketing: + name: Marketing CI + runs-on: ubuntu-latest + + env: + # Sentry + PUBLIC_SENTRY_DSN: ${{ vars.PUBLIC_SENTRY_DSN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: marketing + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + + # Posthog + NEXT_PUBLIC_POSTHOG_HOST: ${{ vars.PUBLIC_POSTHOG_HOST }} + NEXT_PUBLIC_POSTHOG_KEY: ${{ secrets.PUBLIC_POSTHOG_KEY }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup + uses: ./.github/actions/setup + + - name: Checks + run: bun turbo lint typecheck build test:e2e --filter=@prodkt/marketing diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1d6ec9f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup + uses: ./.github/actions/setup + + - name: create and publish versions + uses: changesets/action@v1 + with: + commit: 'chore: update versions' + title: 'chore: update versions' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a0cb0b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,158 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* +.vercel +_* +_data-table + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +next-env.d.ts +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# Storybook +storybook-static + +# Astro +.astro + +# DS_Store files +.DS_Store + +# Turborepo +.turbo + +# NX +.nx + +# Playwright +test-results/ +playwright-report/ +blob-report/ +playwright/.cache/ + +# Cspell cache +.cspellcache \ No newline at end of file diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 0000000..52ec98f --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +bun commitlint --edit ${1} diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..00a9d3c --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +bun lint-staged diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg new file mode 100644 index 0000000..e7d5001 --- /dev/null +++ b/.husky/prepare-commit-msg @@ -0,0 +1,2 @@ +# only run this if no git commit message has been provided +[ -z "$2" ] && exec < /dev/tty && bun git-cz --hook || true diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..afd2357 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,8 @@ +{ + "extends": "markdownlint/style/prettier", + "first-line-h1": false, + "no-inline-html": false, + "no-space-in-emphasis": false, + "no-duplicate-heading": false, + "code-block-style": false +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..9b7334e --- /dev/null +++ b/.prettierignore @@ -0,0 +1,11 @@ +bun.lockb +drizzle/ +.prettierignore +.gitignore +*.env.example + +.changeset/ + +packages/ui/src/primitives/form/form.mdx +packages/ui/src/primitives/toast/toast.mdx +packages/ui/src/primitives/carousel/carousel.mdx diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..7b2e17a --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,21 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "astro-build.astro-vscode", + "aaron-bond.better-comments", + "streetsidesoftware.code-spell-checker", + "mikestead.dotenv", + "EditorConfig.EditorConfig", + "dsznajder.es7-react-js-snippets", + "tamasfe.even-better-toml", + "github.vscode-github-actions", + "GitHub.copilot", + "GitHub.copilot-chat", + "GitHub.vscode-pull-request-github", + "DavidAnson.vscode-markdownlint", + "unifiedjs.vscode-mdx", + "christian-kohler.path-intellisense", + "YoavBls.pretty-ts-errors" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9147f1c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,46 @@ +{ + // Editor + "editor.tabSize": 2, + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "prettier.documentSelectors": ["**/*.astro"], + "[astro]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + + // ESLint + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "eslint.rules.customizations": [ + { + "rule": "workspace:*", + "severity": "warn" + } + ], + "eslint.useFlatConfig": true, + "eslint.workingDirectories": [ + { "pattern": "apps/*/" }, + { "pattern": "packages/*/" }, + { "pattern": "packages/config/*/" } + ], + "eslint.validate": [ + "javascript", + "javascriptreact", + "astro", + "typescript", + "typescriptreact" + ], + + // Tailwind + "files.associations": { + "*.css": "tailwindcss" + }, + "tailwindCSS.experimental.classRegex": [ + ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], + ["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] + ], + + // TypeScript + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..25ba9d1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,132 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of + any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[bryan.funk@prodkt.cloud](mailto:bryan.funk@prodkt.cloud). +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..eaed2b4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,100 @@ +# Contributing to Prodkt + +Thank you for considering contributing to Prodkt :tada: + +## How to Contribute + +To contribute to this project, follow these steps: + +1. Fork this repository and clone it to your local machine. +2. Create a new branch for your contribution: `git checkout -b BRANCHNAME` +3. Add your changes to the staging area: `git add [path of files]` +4. Commit your changes: `git commit -m 'Add new feature'` +5. Push to the branch: `git push -u origin BRANCHNAME` +6. Submit a pull request. + +## Quick Guide + +### Prerequisites + +```shell +bun: ">=1.1.12" +``` + +### Setting up your local repo + +Prodkt uses bun workspaces, so you should **always run `bun install` from the top-level project directory**. Running `bun install` in the top-level project root will install dependencies for `Prodkt`, and every package in the repo. + +```shell +git clone && cd ... +bun install +bun turbo build +``` + +### Setting up environment variables + +Checkout the `.env.example` file inside the `apps/web` directory for the environment variables you need to get the project running. You should create an UploadThing and Neon DB accounts and copy the environment variables from their dashboard to a `.env.local` file in `apps/web`. + +You will also need to create a GitHub Oauth token as well as for Google authentication as well. + +### Using GitHub Codespaces for development + +To get started, create a codespace for this repository by clicking this 👇 + +[](https://codespaces.new/prodkt/prodkt) + +Your new codespace will open in a web-based version of Visual Studio Code. All development dependencies will be preinstalled, and the tests will run automatically ensuring you've got a green base from which to start working. + +### Development + +```shell +# Dev +bun turbo dev + +# Build +bun turbo build + +# Typecheck +bun turbo typecheck + +# Lint +bun turbo lint + +# Storybook +bun turbo storybook + +# Start apps in production mode +bun turbo start +``` + +If you're familiar with turborepo / bun workspaces, running stuff around this repo will be easy to figure out. + +### Other useful commands + +```shell +# auto-format the entire project +bun run format +``` + +```shell +# lint the project +bun run lint +``` + +## Code Style Guidelines + +Please follow the existing code style and conventions used in the project. + +## Issue Reporting + +If you encounter any issues with the project or have suggestions for improvements, please open an issue on the GitHub repository. + +## License + +By contributing to this project, you agree that your contributions will be licensed under the [LICENSE](LICENSE). + +--- + +If you have any suggestions or concerns, consider opening a new issue. + +**[Prodkt](https://github.com/prodkt/prodkt/issues)** diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6d8b765 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Bryan Funk + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b706a93 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +