diff --git a/.dockerignore b/.dockerignore index 43a6c8491a6..c81956666bb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -14,7 +14,7 @@ playwright.config.js .gitpod.Dockerfile SECURITY.md README.md -docker-compose.yml +compose.yml mongo-compose.yml LICENSE CONTRIBUTING.md diff --git a/.env.docker b/.env.docker index e598cc012b4..223c89cd8e5 100644 --- a/.env.docker +++ b/.env.docker @@ -8,3 +8,5 @@ NEXTAUTH_SECRET="" LINKFREE_API_SECRET="development" GITHUB_API_TOKEN="" +RANDOM_USERS="eddiejaoude,SaraJaoude" +ADMIN_USERS="eddiejaoude,SaraJaoude" diff --git a/.env.example b/.env.example index 9a656549431..ab3668ba114 100644 --- a/.env.example +++ b/.env.example @@ -10,3 +10,4 @@ NEXTAUTH_URL="http://localhost:3000" LINKFREE_API_SECRET="development" GITHUB_API_TOKEN="" RANDOM_USERS="eddiejaoude,sarajaoude" +ADMIN_USERS="eddiejaoude,SaraJaoude,_test-admin-user" diff --git a/.github/config/labeler.yml b/.github/config/labeler.yml new file mode 100644 index 00000000000..485c8a27257 --- /dev/null +++ b/.github/config/labeler.yml @@ -0,0 +1,20 @@ +'â chore: profile': + - 'data/**' + +tests: + - 'tests/**' + +storybook: + - 'stories/**' + +dependencies: + - 'package.*' + +'CI/CD': + - '.github/**' + +'đ docs': + - 'pages/docs/**' + +'models': + - 'models/**' diff --git a/.github/config/reviewpad.yml b/.github/config/reviewpad.yml deleted file mode 100644 index 0a23d5e6f18..00000000000 --- a/.github/config/reviewpad.yml +++ /dev/null @@ -1,102 +0,0 @@ -api-version: reviewpad.com/v3.x - -labels: - small: - description: "Pull request with less than 10 changed lines" - color: "294b69" - medium: - description: "Pull request with changed lines between 10 and 30" - color: "a8c3f7" - large: - description: "Pull request with more than 30 changed lines" - color: "8a2138" - -rules: - - name: check-for-file-name - description: Checks for the correct author - spec: $hasFileName($sprintf("data/%v.json", [$author()])) - - - name: modifies-only-one-file - spec: $fileCount() == 1 - - - name: check-for-profile-addition - spec: $rule("check-for-file-name") && $rule("modifies-only-one-file") - - - name: check-for-linked-issues - spec: $hasLinkedIssues() == false - - - name: check-for-status-block - spec: $rule("check-for-profile-addition") == false && $rule("check-for-linked-issues") - -workflows: - - name: label-pull-request-with-size - always-run: true - if: - - rule: $size() <= 10 - extra-actions: - - $addLabel("small") - - $removeLabels(["medium", "large"]) - - rule: $size() > 10 && $size() <= 30 - extra-actions: - - $addLabel("medium") - - $removeLabels(["small", "large"]) - - rule: $size() > 30 - extra-actions: - - $addLabel("large") - - $removeLabels(["small", "medium"]) - - - name: first-time-contributor - always-run: true - if: - - rule: $pullRequestCountBy($author(), "all") == 1 - extra-actions: - - '$commentOnce($sprintf("Welcome @%v! Thank you so much for your first pull request!", [$author()]))' - - - rule: $pullRequestCountBy($author(), "all") == 10 - extra-actions: - - $addLabel("kudos") - - $info("Kudos for your 10th pull request! You are awesome") - - - name: waiting-for-reviewers - always-run: true - if: - - rule: $reviewers() == [] - extra-actions: - - '$info("A maintainer will review your pull request soon!")' - - '$addLabel("waiting-for-reviewers")' - - - name: add-label-for-chore-profile-addition - always-run: true - if: - - rule: $hasFilePattern("data/**") - then: - - '$addLabel("â chore: profile")' - - - name: chore-profile-addition - description: Automates profile addition - always-run: true - if: - - rule: check-for-profile-addition - then: - - '$addLabel("LGTM")' - - - name: add-label-for-tests - always-run: true - if: - - rule: $hasFilePattern("tests/**") - then: - - '$addLabel("tests")' - - - name: add-label-for-storybook - always-run: true - if: - - rule: $hasFilePattern("stories/**") - then: - - '$addLabel("storybook")' - - # - name: label-pull-request-with-block-status - # always-run: true - # if: - # - rule: check-for-status-block - # then: - # - '$addLabel("đ§ status: blocked")' diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000..ba8256548be --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + # only security updates, ignore schedule + # https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates + open-pull-requests-limit: 0 + schedule: + interval: "monthly" + # set commit message to work with Angular conventional commit style + commit-message: + prefix: "fix(deps)" + prefix-development: "chore(deps)" \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf8d3859245..680092fbb4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,8 +44,8 @@ jobs: strategy: fail-fast: false matrix: - shardIndex: [1, 2, 3] - shardTotal: [3] + shardIndex: [1, 2, 3, 4, 5] + shardTotal: [5] steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000000..36eb553277b --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,83 @@ +# 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: [ "main" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + paths-ignore: + - '**/*.md' + - '**/*.json' + +jobs: + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + 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. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # âšī¸ Command-line programs to run using the OS shell. + # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 00000000000..a0f3be90dc5 --- /dev/null +++ b/.github/workflows/labels.yml @@ -0,0 +1,89 @@ +name: Label PRs + +on: + - pull_request_target + +permissions: + contents: read + pull-requests: write + +jobs: + label: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 # Uploads repository content to the runner to ensure config file available + with: + sparse-checkout: | + .github/config/labeler.yml + sparse-checkout-cone-mode: false + - uses: actions/labeler@v4 + with: + configuration-path: .github/config/labeler.yml + repo-token: ${{ secrets.GITHUB_TOKEN }} + dot: true + sync-labels: true + + issue-linked: + runs-on: ubuntu-latest + + steps: + - uses: octokit/graphql-action@v2.x + id: get_linked_issue + with: + query: | + query issue($owner:String!,$repo:String!,$pr:Int!) { + repository(owner:$owner,name:$repo) { + pullRequest(number: $pr) { + closingIssuesReferences (first: 1) { + nodes { + number + assignees(first: 1) { + nodes { + login + } + } + } + } + } + } + } + variables: | + owner: ${{ github.repository_owner }} + repo: ${{ github.event.repository.name }} + pr: ${{ github.event.pull_request.number}} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Count linked issues + id: count_nodes + env: + GH_DETAILS: ${{ steps.get_linked_issue.outputs.data }} + run: | + GH_COUNT=$(echo "$GH_DETAILS" | jq '.repository.pullRequest.closingIssuesReferences.nodes | length') + echo "count=$GH_COUNT" >> "$GITHUB_OUTPUT" + echo "count=$GH_COUNT" + - name: Check assignee count + id: assignee_ct + if: steps.count_nodes.outputs.count > 0 + env: + GH_DETAILS: ${{ steps.get_linked_issue.outputs.data }} + run: | + GH_ASSIGNCT=$(echo "$GH_DETAILS" | jq '.repository.pullRequest.closingIssuesReferences.nodes[0].assignees.nodes | length') + echo "count=$GH_ASSIGNCT" >> "$GITHUB_OUTPUT" + echo "count=$GH_ASSIGNCT" + - name: Check assignee + id: assignee + if: steps.count_nodes.outputs.count > 0 && steps.assignee_ct.outputs.count > 0 + env: + GH_DETAILS: ${{ steps.get_linked_issue.outputs.data }} + run: | + GH_ASSIGN=$(echo "$GH_DETAILS" | jq -r '.repository.pullRequest.closingIssuesReferences.nodes[0].assignees.nodes[0].login') + echo "name=$GH_ASSIGN" >> "$GITHUB_OUTPUT" + echo "name=$GH_ASSIGN" + echo "${{ github.actor }}" + - name: Add issue-linked label + if: steps.count_nodes.outputs.count > 0 && steps.assignee_ct.outputs.count > 0 && github.actor == steps.assignee.outputs.name + run: | + gh pr edit ${{ github.event.pull_request.number}} --add-label 'issue linked' --repo $GITHUB_REPOSITORY + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-ghcr.yml b/.github/workflows/publish-ghcr.yml index 92829cc29d6..895838d6d9c 100644 --- a/.github/workflows/publish-ghcr.yml +++ b/.github/workflows/publish-ghcr.yml @@ -47,9 +47,11 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - - name: Setup Env - run: echo "LINKFREE_MONGO_CONNECTION_STRING=${{ secrets.LINKFREE_MONGO_CONNECTION_STRING }}" > /tmp/.env - - name: push to Github Container Registry + - name: Copy Environment Variables + run: cp .env.example /tmp/.env + - name: Add Mongo Connection String + run: echo "LINKFREE_MONGO_CONNECTION_STRING=${{ secrets.LINKFREE_MONGO_CONNECTION_STRING }}" >> /tmp/.env + - name: Build and push to GHCR uses: docker/build-push-action@v3 with: context: . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a62e52affd..c72b3660fd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,11 +45,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} version-file: "./package.json,./package-lock.json,./config/app.json" git-branch: "release-from-${{ github.sha }}" - skip-on-empty: false skip-git-pull: true # create PR using GitHub CLI - name: create PR with release info + if: steps.changelog.outputs.skipped == 'false' id: create-pr run: gh pr create --base main --head release-from-${{ github.sha }} --title 'Merge new release into main' --body 'Created by Github action' env: @@ -57,6 +57,7 @@ jobs: # merge PR using GitHub CLI - name: merge PR with release info + if: steps.changelog.outputs.skipped == 'false' id: merge-pr run: gh pr merge --admin --merge --subject 'Merge release info' --delete-branch env: @@ -68,6 +69,6 @@ jobs: uses: ncipollo/release-action@v1 with: token: ${{ secrets.CHANGELOG_RELEASE }} - tag : ${{ steps.changelog.outputs.tag }} + tag: ${{ steps.changelog.outputs.tag }} name: ${{ steps.changelog.outputs.tag }} body: ${{ steps.changelog.outputs.clean_changelog }} diff --git a/.github/workflows/reviewpad.yml b/.github/workflows/reviewpad.yml deleted file mode 100644 index 86e591c95a8..00000000000 --- a/.github/workflows/reviewpad.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures Reviewpad action to run on Issues and Pull Requests! đĻ -name: Reviewpad - -on: - issues: - issue_comment: - pull_request_target: - -# These permissions are necessary to automate pull requests from forks. -permissions: - pull-requests: write - issues: write - -jobs: - reviewpad_job: - runs-on: ubuntu-latest - name: Reviewpad - # Don't run reviewpad on automated PRs - if: | - github.event_name != 'pull_request_target' || - (github.event.pull_request.title != 'Merge new release into main' && - github.event.pull_request.title != 'Merge testimonial into main' && - github.event.pull_request.title != 'Merge formatting into main') - steps: - - name: Reviewpad - uses: reviewpad/action@v3.x - with: - # Uncomment next line to use your own configuration file đĒ - file: .github/config/reviewpad.yml diff --git a/.github/workflows/testimonial.yml b/.github/workflows/testimonial.yml index 79387d6aed4..cfe0b7a455d 100644 --- a/.github/workflows/testimonial.yml +++ b/.github/workflows/testimonial.yml @@ -80,4 +80,4 @@ jobs: uses: YiiGuxing/close-issue@v2.1.0 with: comment: | - Testimonial added for @${{ steps.issue-parser.outputs.issueparser_name }}. Thank you for your contribution! @${{ steps.issue-parser.outputs.issueparser_name }} if you wish to add it your LinkFree profile please follow the instructions in the docs https://linkfree.eddiehub.io/docs/how-to-guides/testimonials + Testimonial added for @${{ steps.issue-parser.outputs.issueparser_name }}. Thank you for your contribution! @${{ steps.issue-parser.outputs.issueparser_name }} if you wish to add it your LinkFree profile please follow the instructions in the docs for json https://linkfree.io/docs/how-to-guides/testimonials-json or for forms https://linkfree.io/docs/how-to-guides/testimonials-forms diff --git a/.github/workflows/vercel-pr-preview.yml b/.github/workflows/vercel-pr-preview.yml new file mode 100644 index 00000000000..9ba1bfa7bed --- /dev/null +++ b/.github/workflows/vercel-pr-preview.yml @@ -0,0 +1,41 @@ +name: Deploy PR to Preview +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + workflow_dispatch: + pull_request: + branches-ignore: + - revert-logger + paths: + - "**.js" + +jobs: + deploy: + runs-on: ubuntu-latest + outputs: + url: ${{ steps.deploy-preview.outputs.url }} + steps: + - uses: actions/checkout@v3 + - name: install Vercel CLI + run: npm install --global vercel@latest + - name: pull Vercel environment information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + - name: build project artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + - name: deploy preview + id: deploy-preview + run: | + du --inodes -d 5 .vercel/output + ls -l .vercel/output/functions + preview_url="$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" + echo "url=$preview_url" >> $GITHUB_OUTPUT + echo "deployed to $preview_url" + + load-data: + runs-on: ubuntu-latest + needs: deploy + steps: + - name: load json files + run: curl -f ${{ needs.deploy.outputs.url }}/api/system/reload?secret=${{ secrets.LINKFREE_API_SECRET_PREVIEW }} diff --git a/.github/workflows/vercel-preview.yml b/.github/workflows/vercel-preview.yml index 052d3f3b79b..92de4968a3a 100644 --- a/.github/workflows/vercel-preview.yml +++ b/.github/workflows/vercel-preview.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: push: branches: - - revert-logger + - date-input jobs: deploy: @@ -21,10 +21,16 @@ jobs: run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: deploy preview + assign beta domain run: | - du --inodes -d 5 .vercel/output - ls -l .vercel/output/functions + OUTPUT=$(du --inodes -d 5 .vercel/output) + echo "$OUTPUT" + LAST=$(echo "$OUTPUT" | tail -n 1) + PERCENTAGE=$(echo "$LAST" | awk 'BEGIN {maxtotal=15000} { printf "%.2f%%", ($1/maxtotal*100) }') + echo "Vercel file usage percentage" >> $GITHUB_STEP_SUMMARY + echo "$PERCENTAGE" >> $GITHUB_STEP_SUMMARY + du -h -d 3 .vercel/output/functions/en vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > domain.txt vercel alias --scope ${{ secrets.VERCEL_TEAM_ID }} --token ${{ secrets.VERCEL_TOKEN }} set `cat domain.txt` linkfree-preview.vercel.app + load-data: runs-on: ubuntu-latest needs: deploy diff --git a/.github/workflows/vercel.yml b/.github/workflows/vercel.yml index 28b8b0b1cc0..a89b957bc26 100644 --- a/.github/workflows/vercel.yml +++ b/.github/workflows/vercel.yml @@ -12,6 +12,7 @@ on: - main paths: - "data/**" + - "pages/docs/**" jobs: deploy: @@ -27,7 +28,12 @@ jobs: run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - name: deploy project artifacts to Vercel run: | - du --inodes -d 5 .vercel/output + OUTPUT=$(du --inodes -d 5 .vercel/output) + echo "$OUTPUT" + LAST=$(echo "$OUTPUT" | tail -n 1) + PERCENTAGE=$(echo "$LAST" | awk 'BEGIN {maxtotal=15000} { printf "%.2f%%", ($1/maxtotal*100) }') + echo "Vercel file usage percentage" >> $GITHUB_STEP_SUMMARY + echo "$PERCENTAGE" >> $GITHUB_STEP_SUMMARY vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} load-data: diff --git a/.gitpod.yml b/.gitpod.yml index d8c1c6af4bd..35e558a5137 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -12,6 +12,7 @@ tasks: gp env PLAYWRIGHT_BROWSERS_PATH=0 eval $(gp env -e) gp ports await 27017 + nvm install 18 npm run dev github: diff --git a/CHANGELOG.md b/CHANGELOG.md index 149b72af5d7..284674899b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,50 +1,45 @@ -## [1.149.3](https://github.com/EddieHubCommunity/LinkFree/compare/v1.149.2...v1.149.3) (2023-07-02) +## [1.178.8](https://github.com/EddieHubCommunity/LinkFree/compare/v1.178.7...v1.178.8) (2023-08-23) ### Bug Fixes -* link and linkstats relationship ([#7913](https://github.com/EddieHubCommunity/LinkFree/issues/7913)) ([1d33148](https://github.com/EddieHubCommunity/LinkFree/commit/1d33148c7626df7f0ed70de0dbd2c93fb7ef21bc)) +* docs side nav for mobiles ([#8177](https://github.com/EddieHubCommunity/LinkFree/issues/8177)) ([3ab0b01](https://github.com/EddieHubCommunity/LinkFree/commit/3ab0b01ab9db601059bcef47bb5feebf9eca9237)) -## [1.149.2](https://github.com/EddieHubCommunity/LinkFree/compare/v1.149.1...v1.149.2) (2023-07-01) +## [1.178.7](https://github.com/EddieHubCommunity/LinkFree/compare/v1.178.6...v1.178.7) (2023-08-22) ### Bug Fixes -* profiles with no events ([#7906](https://github.com/EddieHubCommunity/LinkFree/issues/7906)) ([4a289b8](https://github.com/EddieHubCommunity/LinkFree/commit/4a289b8cf8b58af8aecf8ff76af6d24e68da4b03)) +* community resources to config array ([#8577](https://github.com/EddieHubCommunity/LinkFree/issues/8577)) ([ae545e8](https://github.com/EddieHubCommunity/LinkFree/commit/ae545e8a58a2547656a6cd2c029232e9d9e4f0f1)) -## [1.149.1](https://github.com/EddieHubCommunity/LinkFree/compare/v1.149.0...v1.149.1) (2023-07-01) +## [1.178.6](https://github.com/EddieHubCommunity/LinkFree/compare/v1.178.5...v1.178.6) (2023-08-22) ### Bug Fixes -* random profile text ([#7905](https://github.com/EddieHubCommunity/LinkFree/issues/7905)) ([dd9b971](https://github.com/EddieHubCommunity/LinkFree/commit/dd9b9716788c301d6eaff4629b31aa8edf73d51e)) +* spacing between add repo form and repo list ([#8694](https://github.com/EddieHubCommunity/LinkFree/issues/8694)) ([9cc0624](https://github.com/EddieHubCommunity/LinkFree/commit/9cc0624c3a2bed5ebadd6e4bbdce4864f210678f)) -# [1.149.0](https://github.com/EddieHubCommunity/LinkFree/compare/v1.148.0...v1.149.0) (2023-07-01) +## [1.178.5](https://github.com/EddieHubCommunity/LinkFree/compare/v1.178.4...v1.178.5) (2023-08-22) -### Features +### Bug Fixes -* testimonial ordering ([#7884](https://github.com/EddieHubCommunity/LinkFree/issues/7884)) ([d65ba48](https://github.com/EddieHubCommunity/LinkFree/commit/d65ba48937b542927cb9b46ea6a75a4244168c3e)) +* notification removed after set time ([#8607](https://github.com/EddieHubCommunity/LinkFree/issues/8607)) ([a74cd9e](https://github.com/EddieHubCommunity/LinkFree/commit/a74cd9e95fede2e554344575b6572b93b218b4a8)) -# [1.148.0](https://github.com/EddieHubCommunity/LinkFree/compare/v1.147.10...v1.148.0) (2023-07-01) +## [1.178.4](https://github.com/EddieHubCommunity/LinkFree/compare/v1.178.3...v1.178.4) (2023-08-22) ### Bug Fixes -* docs links ([#7902](https://github.com/EddieHubCommunity/LinkFree/issues/7902)) ([1b9a529](https://github.com/EddieHubCommunity/LinkFree/commit/1b9a529f0117d92682c5c2a3780c42ff815d9154)) - - -### Features - -* random profile ([#7900](https://github.com/EddieHubCommunity/LinkFree/issues/7900)) ([f2aed8d](https://github.com/EddieHubCommunity/LinkFree/commit/f2aed8dccba992e3bb889149854ded52b0283bb5)), closes [#7617](https://github.com/EddieHubCommunity/LinkFree/issues/7617) [#7558](https://github.com/EddieHubCommunity/LinkFree/issues/7558) +* missing items now have a space between ([#8676](https://github.com/EddieHubCommunity/LinkFree/issues/8676)) ([6c83c18](https://github.com/EddieHubCommunity/LinkFree/commit/6c83c1898be55055376157c00eea972a55f47430)) diff --git a/Dockerfile.dev b/Dockerfile.dev index 65cdcf36857..e76b2988f1b 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -6,9 +6,9 @@ WORKDIR /usr/src/app COPY package*.json ./ ARG NODE_ENV -RUN if [ "$NODE_ENV" = "development" ]; then npm install --ignore-scripts; else npm install --omit=dev --ignore-scripts; fi +RUN npm install --ignore-scripts COPY . . RUN sed -i 's/0.0.0/'`npm pkg get version | tr -d '"'`'/g' config/app.json -CMD ["npm", "run", "dev:docker"] +CMD ["npm", "run", "docker:dev"] diff --git a/README.md b/README.md index 5305423adf8..2f59fdba0b7 100644 --- a/README.md +++ b/README.md @@ -81,12 +81,25 @@ This will allow you to run your favourite IDE but not have to install any depend #### Prerequisites -- [Docker](https://www.docker.com/) -- [Docker Compose](https://github.com/docker/compose) V2. +- [Git](https://git-scm.com/) +- [Docker](https://www.docker.com/) and [Docker Compose](https://github.com/docker/compose) V2. or [Docker Desktop](https://docs.docker.com/desktop/#:~:text=Docker%20Desktop%20is%20a%20one,share%20containerized%20applications%20and%20microservices) #### Commands -1. `docker compose up` +1. `git clone https://github.com/EddieHubCommunity/LinkFree` + +2. `cd LinkFree` + +3. `docker compose up` + +4. In your browser on localhost:3000 you should now see the project up and running. + +5. Now you need to upload the data in your mongoDB instance. `localhost:3000/api/system/reload?secret=development` + +6. Recheck localhost:3000 to confirm data is uploaded, you should see current amount of active users. + +> **Note** +> If you wanna look at the database, you can use [MongoDB Compass](https://www.mongodb.com/products/compass) with connection string as `mongodb://localhost:27017/linkfree` Read more in the official documentation - https://linkfree.io/docs/environments/local-development#docker-compose @@ -141,7 +154,7 @@ Here are some testimonials from individuals who have used LinkFree:- > "LinkFree is very close to me because I have seen it evolve. With LinkFree, I have discovered so many amazing people in tech. Some of my favorite features are the barcode for profiles and testimonials. If you are reading this and don't have a profile, I highly recommend doing that. Thank you, Eddie and EddieHub community, for building this incredible app." - **Name :** Pradumna Saraf -- **Bio :** Open Source Advocate | DevOps Engineer | EddieHub Ambassador +- **Bio :** Open Source | DevOps | Golang Developer | EddieHub Ambassador - **Username :** Pradumna Saraf @@ -161,3 +174,4 @@ Don't forget to leave a star âī¸. We take participation in our community as a harassment-free experience for everyone and we pledge to act in ways to contribute to an open, welcoming, diverse and inclusive community. If you have experienced or been made aware of unacceptable behaviour, please remember that you can report this. Read our [Code of Conduct](https://github.com/EddieHubCommunity/LinkFree/blob/main/CODE_OF_CONDUCT.md) for more details. + diff --git a/components/Alert.js b/components/Alert.js index 7f082592c42..7cb1a5980fd 100644 --- a/components/Alert.js +++ b/components/Alert.js @@ -2,12 +2,12 @@ import ExclamationTriangleIcon from "@heroicons/react/24/outline/ExclamationTria import ExclamationCircleIcon from "@heroicons/react/24/outline/ExclamationCircleIcon"; import CheckCircleIcon from "@heroicons/react/24/outline/CheckCircleIcon"; -export default function alert({ type, message }) { +export default function Alert({ type, message }) { switch (type) { case "success": return (