Repository: realworld-apps/realworld Branch: main Commit: a86e4d72186c Files: 245 Total size: 417.4 KB Directory structure: gitextract_60zq8mk5/ ├── .github/ │ ├── CODEOWNERS │ ├── ISSUE_TEMPLATE/ │ │ ├── BUG_REPORT.yml │ │ └── FEATURE_REQUEST.yml │ ├── dependabot.yml │ └── workflows/ │ ├── bruno-check.yml │ ├── codeql.yml │ ├── deploy-docs.yml │ └── spammy-guardian.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── assets/ │ ├── media/ │ │ ├── conduit-logo.svg.generate.ts │ │ └── mobile_icons/ │ │ ├── ios/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ └── README.md │ │ └── watchkit/ │ │ └── AppIcon.appiconset/ │ │ └── Contents.json │ └── theme/ │ └── styles.css ├── docs/ │ ├── .gitignore │ ├── .vscode/ │ │ ├── extensions.json │ │ └── launch.json │ ├── README.md │ ├── astro.config.mjs │ ├── non-included/ │ │ └── LICENSES_LOGOS.md │ ├── package.json │ ├── src/ │ │ ├── content/ │ │ │ ├── config.ts │ │ │ └── docs/ │ │ │ ├── community/ │ │ │ │ ├── authors.md │ │ │ │ ├── resources.md │ │ │ │ └── special-thanks.md │ │ │ ├── implementation-creation/ │ │ │ │ ├── expectations.md │ │ │ │ ├── features.md │ │ │ │ └── introduction.md │ │ │ ├── index.mdx │ │ │ ├── introduction.mdx │ │ │ └── specifications/ │ │ │ ├── backend/ │ │ │ │ ├── api-response-format.md │ │ │ │ ├── bruno.md │ │ │ │ ├── cors.md │ │ │ │ ├── endpoints.md │ │ │ │ ├── error-handling.md │ │ │ │ ├── hurl.md │ │ │ │ ├── introduction.md │ │ │ │ ├── postman.md │ │ │ │ └── tests.md │ │ │ ├── frontend/ │ │ │ │ ├── api.md │ │ │ │ ├── routing.md │ │ │ │ ├── styles.md │ │ │ │ ├── templates.md │ │ │ │ └── tests.md │ │ │ └── mobile-specs/ │ │ │ └── introduction.md │ │ ├── env.d.ts │ │ └── tailwind.css │ └── tsconfig.json └── specs/ ├── api/ │ ├── README.md │ ├── bruno/ │ │ ├── articles/ │ │ │ ├── 01-setup-register.bru │ │ │ ├── 02-create-article-with-tags.bru │ │ │ ├── 03-list-all-articles.bru │ │ │ ├── 04-list-by-author.bru │ │ │ ├── 05-list-all-articles-with-auth.bru │ │ │ ├── 06-list-by-author-with-auth.bru │ │ │ ├── 07-list-by-tag.bru │ │ │ ├── 08-list-articles-without-auth.bru │ │ │ ├── 09-get-single-article.bru │ │ │ ├── 10-update-article-body.bru │ │ │ ├── 11-verify-update-persisted.bru │ │ │ ├── 12-update-article-without-taglist-tags-should-be-preserved.bru │ │ │ ├── 13-update-article-remove-all-tags-with-empty-array.bru │ │ │ ├── 14-verify-tags-were-actually-removed.bru │ │ │ ├── 15-update-article-taglist-null-should-be-rejected.bru │ │ │ ├── 16-delete-article.bru │ │ │ └── 17-verify-deletion.bru │ │ ├── auth/ │ │ │ ├── 01-register.bru │ │ │ ├── 02-login.bru │ │ │ ├── 03-get-current-user.bru │ │ │ ├── 04-update-user.bru │ │ │ ├── 05-verify-update-persisted.bru │ │ │ ├── 06-update-user-bio-to-empty-string-should-normalize-to-null.bru │ │ │ ├── 07-verify-empty-string-normalization-persisted.bru │ │ │ ├── 08-restore-bio-then-set-to-null.bru │ │ │ ├── 09-update-user-bio-to-null-should-accept-for-nullable-field.bru │ │ │ ├── 10-verify-null-bio-persisted.bru │ │ │ ├── 11-restore-bio.bru │ │ │ ├── 12-update-user-image.bru │ │ │ ├── 13-verify-image-update-persisted.bru │ │ │ ├── 14-update-image-to-empty-string-should-normalize-to-null.bru │ │ │ ├── 15-verify-image-empty-string-normalization-persisted.bru │ │ │ ├── 16-set-image-then-update-to-null-should-accept-for-nullable-field.bru │ │ │ ├── 17-put-user.bru │ │ │ ├── 18-verify-null-image-persisted.bru │ │ │ ├── 19-update-username-and-email.bru │ │ │ └── 20-verify-username-email-update-persisted.bru │ │ ├── bruno.json │ │ ├── collection.bru │ │ ├── comments/ │ │ │ ├── 01-setup-register.bru │ │ │ ├── 02-setup-create-article.bru │ │ │ ├── 03-create-comment.bru │ │ │ ├── 04-list-comments.bru │ │ │ ├── 05-list-comments-without-auth.bru │ │ │ ├── 06-delete-comment.bru │ │ │ ├── 07-verify-deletion.bru │ │ │ ├── 08-selective-deletion-create-two-comments-delete-one-verify-the-other-remains.bru │ │ │ ├── 09-post-comments.bru │ │ │ ├── 10-verify-two-comments-exist.bru │ │ │ ├── 11-delete-the-first-comment.bru │ │ │ ├── 12-verify-only-the-second-comment-remains.bru │ │ │ └── 13-cleanup.bru │ │ ├── environments/ │ │ │ └── local.bru │ │ ├── errors-articles/ │ │ │ ├── 01-create-article-no-auth.bru │ │ │ ├── 02-get-unknown-slug.bru │ │ │ ├── 03-update-no-auth.bru │ │ │ ├── 04-delete-no-auth.bru │ │ │ ├── 05-get-feed-no-auth.bru │ │ │ ├── 06-favorite-no-auth.bru │ │ │ ├── 07-unfavorite-no-auth.bru │ │ │ ├── 08-setup-register-for-authenticated-error-tests.bru │ │ │ ├── 09-create-article-empty-title.bru │ │ │ ├── 10-create-article-empty-description.bru │ │ │ ├── 11-create-article-empty-body.bru │ │ │ ├── 12-duplicate-titles-are-allowed-each-gets-a-unique-slug.bru │ │ │ ├── 13-post-articles.bru │ │ │ ├── 14-update-unknown-slug.bru │ │ │ ├── 15-favorite-unknown-slug.bru │ │ │ ├── 16-unfavorite-unknown-slug.bru │ │ │ ├── 17-update-unknown-slug.bru │ │ │ ├── 18-delete-unknown-slug.bru │ │ │ ├── 19-cleanup.bru │ │ │ └── 20-delete-slug2.bru │ │ ├── errors-auth/ │ │ │ ├── 01-register-empty-username.bru │ │ │ ├── 02-register-empty-email.bru │ │ │ ├── 03-register-empty-password.bru │ │ │ ├── 04-register-valid-user-for-duplicate-and-login-tests.bru │ │ │ ├── 05-register-duplicate-username.bru │ │ │ ├── 06-register-duplicate-email.bru │ │ │ ├── 07-login-empty-email.bru │ │ │ ├── 08-login-empty-password.bru │ │ │ ├── 09-login-wrong-password.bru │ │ │ ├── 10-get-user-no-auth.bru │ │ │ ├── 11-put-user-no-auth.bru │ │ │ ├── 12-update-email-to-empty-string-should-reject.bru │ │ │ ├── 13-update-username-to-empty-string-should-reject.bru │ │ │ ├── 14-update-email-to-null-should-reject.bru │ │ │ └── 15-update-username-to-null-should-reject.bru │ │ ├── errors-authorization/ │ │ │ ├── 01-register-user-a.bru │ │ │ ├── 02-register-user-b.bru │ │ │ ├── 03-user-a-creates-article.bru │ │ │ ├── 04-user-b-tries-to-delete-403.bru │ │ │ ├── 05-user-b-tries-to-update-403.bru │ │ │ ├── 06-user-a-creates-a-comment-on-the-article.bru │ │ │ ├── 07-user-b-tries-to-delete-a-s-comment-403.bru │ │ │ ├── 08-verify-comment-survived-the-failed-delete.bru │ │ │ └── 09-cleanup-user-a-deletes-article.bru │ │ ├── errors-comments/ │ │ │ ├── 01-post-comment-no-auth.bru │ │ │ ├── 02-delete-comment-no-auth.bru │ │ │ ├── 03-setup-register-create-article.bru │ │ │ ├── 04-post-articles.bru │ │ │ ├── 05-post-comment-empty-body.bru │ │ │ ├── 06-post-comment-on-unknown-article.bru │ │ │ ├── 07-get-comments-on-unknown-article.bru │ │ │ ├── 08-delete-comment-on-unknown-article.bru │ │ │ ├── 09-delete-non-existent-comment-on-existing-article.bru │ │ │ └── 10-cleanup.bru │ │ ├── errors-profiles/ │ │ │ ├── 01-get-unknown-profile.bru │ │ │ ├── 02-follow-no-auth.bru │ │ │ ├── 03-unfollow-no-auth.bru │ │ │ ├── 04-setup-register-for-authenticated-404-tests.bru │ │ │ ├── 05-follow-unknown-user-authed.bru │ │ │ └── 06-unfollow-unknown-user-authed.bru │ │ ├── favorites/ │ │ │ ├── 01-setup-register.bru │ │ │ ├── 02-setup-create-article.bru │ │ │ ├── 03-favorite-article.bru │ │ │ ├── 04-verify-favorite-persists.bru │ │ │ ├── 05-articles-filtered-by-favorited-username.bru │ │ │ ├── 06-articles-filtered-by-favorited-username-with-auth.bru │ │ │ ├── 07-unfavorite-article.bru │ │ │ ├── 08-verify-unfavorite-persists.bru │ │ │ └── 09-cleanup.bru │ │ ├── feed/ │ │ │ ├── 01-register-main-user.bru │ │ │ ├── 02-register-celeb-user.bru │ │ │ ├── 03-feed-for-new-user-returns-empty.bru │ │ │ ├── 04-main-follows-celeb.bru │ │ │ ├── 05-celeb-creates-article-1.bru │ │ │ ├── 06-celeb-creates-article-2.bru │ │ │ ├── 07-main-checks-feed.bru │ │ │ ├── 08-feed-with-limit-1.bru │ │ │ ├── 09-feed-with-limit-1-offset-1.bru │ │ │ ├── 10-cleanup-delete-articles.bru │ │ │ ├── 11-delete-slug2.bru │ │ │ └── 12-cleanup-unfollow.bru │ │ ├── pagination/ │ │ │ ├── 01-setup-register.bru │ │ │ ├── 02-create-article-1.bru │ │ │ ├── 03-create-article-2.bru │ │ │ ├── 04-list-with-limit-1-most-recent-first-so-slug2.bru │ │ │ ├── 05-list-with-limit-1-offset-1-second-page-so-slug1.bru │ │ │ ├── 06-cleanup.bru │ │ │ └── 07-delete-slug2.bru │ │ ├── profiles/ │ │ │ ├── 01-register-main-user.bru │ │ │ ├── 02-register-celeb-user.bru │ │ │ ├── 03-get-profile-without-auth.bru │ │ │ ├── 04-get-profile-with-auth.bru │ │ │ ├── 05-follow-profile.bru │ │ │ ├── 06-unfollow-profile.bru │ │ │ └── 07-verify-unfollow-persisted.bru │ │ └── tags/ │ │ ├── 01-setup-register.bru │ │ ├── 02-setup-create-article-with-tags.bru │ │ ├── 03-get-tags.bru │ │ └── 04-cleanup.bru │ ├── hurl/ │ │ ├── articles.hurl │ │ ├── auth.hurl │ │ ├── comments.hurl │ │ ├── errors_articles.hurl │ │ ├── errors_auth.hurl │ │ ├── errors_authorization.hurl │ │ ├── errors_comments.hurl │ │ ├── errors_profiles.hurl │ │ ├── favorites.hurl │ │ ├── feed.hurl │ │ ├── pagination.hurl │ │ ├── profiles.hurl │ │ ├── run-hurl-tests.sh │ │ └── tags.hurl │ ├── hurl-to-bruno.js │ ├── openapi.yml │ ├── run-api-tests-bruno.sh │ └── run-api-tests-hurl.sh └── e2e/ ├── SELECTORS.md ├── articles.spec.ts ├── auth.spec.ts ├── comments.spec.ts ├── error-handling.spec.ts ├── health.spec.ts ├── helpers/ │ ├── api.ts │ ├── articles.ts │ ├── auth.ts │ ├── comments.ts │ ├── config.ts │ ├── debug.ts │ ├── profile.ts │ └── setup.ts ├── navigation.spec.ts ├── null-fields.spec.ts ├── playwright.base.ts ├── settings.spec.ts ├── social.spec.ts ├── url-navigation.spec.ts ├── user-fetch-errors.spec.ts └── xss-security.spec.ts ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/CODEOWNERS ================================================ ================================================ FILE: .github/ISSUE_TEMPLATE/BUG_REPORT.yml ================================================ name: 🐞 Bug report description: Report a bug in the RealWorld project title: '[Bug]: ' labels: - bug body: - type: dropdown attributes: label: Relevant scope description: What is the scope of this request? options: - Frontend specs - Backend specs - Deployed demo - 'Other: describe below' validations: required: true - type: textarea attributes: label: Description description: A clear and concise description of the problem validations: required: true - type: markdown attributes: value: >- This template was generated with [Issue Forms Creator](https://www.issue-forms-creator.app/) ================================================ FILE: .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml ================================================ name: 🚀 Feature request description: Suggest a feature for RealWorld project title: '[Feature Request]:' body: - type: markdown attributes: value: '# Feature Request' - type: dropdown attributes: label: Relevant Scope description: What is the scope of this request? options: - Frontend specs - Backend specs - 'Other: describe below' validations: required: true - type: textarea attributes: label: Description description: ' ' validations: required: true - type: textarea attributes: label: Describe the solution you'd like description: If you have a solution in mind, please describe it. - type: textarea attributes: label: Describe alternatives you've considered description: Have you considered any alternative solutions or workarounds? - type: markdown attributes: value: >- This template was generated with [Issue Forms Creator](https://www.issue-forms-creator.app/) ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: - package-ecosystem: github-actions directory: '/' schedule: interval: weekly open-pull-requests-limit: 10 - package-ecosystem: npm directory: '/' schedule: interval: weekly open-pull-requests-limit: 10 ================================================ FILE: .github/workflows/bruno-check.yml ================================================ name: 'Bruno Check' on: push: pull_request: jobs: bruno-check: name: Verify Bruno collection is up-to-date runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v6 - name: Setup Bun uses: oven-sh/setup-bun@v2 - name: Check Bruno collection is up-to-date run: make bruno-check ================================================ FILE: .github/workflows/codeql.yml ================================================ name: 'CodeQL' on: workflow_dispatch: schedule: - cron: '24 3 * * 3' jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: ['javascript'] steps: - name: Checkout repository uses: actions/checkout@v6 - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 with: category: '/language:${{matrix.language}}' ================================================ FILE: .github/workflows/deploy-docs.yml ================================================ name: Deploy Documentation on: push: branches: [main] paths: - 'docs/**' - '.github/workflows/deploy-docs.yml' workflow_dispatch: # allow manual trigger permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: false jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Bun uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Setup Pages uses: actions/configure-pages@v4 - name: Install dependencies run: bun install working-directory: ./docs - name: Build documentation run: bun run build working-directory: ./docs - name: Upload artifact uses: actions/upload-pages-artifact@v4 with: path: './docs/dist' deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 ================================================ FILE: .github/workflows/spammy-guardian.yml ================================================ name: Spammy Guardian on: workflow_dispatch: inputs: issueId: description: 'id of the issue to test againt' required: true issue_comment: issues: types: [opened] jobs: spammy-guardian: runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' || github.actor != 'netlify[bot]' }} steps: - uses: kerhub/spammy-guardian@fa79bcda24df6dae5b93285e1749e59c77add4bd with: token: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # Dependencies node_modules .pnp .pnp.js # Local env files .env .env.local .env.development.local .env.test.local .env.production.local # Testing coverage # Turbo .turbo # Vercel .vercel # Build Outputs .next/ .nitro/ out/ build dist # Debug npm-debug.log* yarn-debug.log* yarn-error.log* # Misc .DS_Store *.pem # IDEs .idea # Python __pycache__ # Temp files .tmp # Local db dev.db ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to RealWorld We would love for you to contribute to RealWorld and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow: - [Question or Problem?](#question) - [Issues and Bugs](#issue) - [Feature Requests](#feature) - [Submission Guidelines](#submit) - [Coding Rules](#rules) - [Commit Message Guidelines](#commit) ## Got a Question or Problem? Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. For open discussions, we encourage you to use the [Github Discussions][github-discussions] channels. ## Interested in creating Conduit for your framework? To create an official implementation of Conduit, check out our [Github Discussions](https://github.com/realworld-apps/realworld/discussions/categories/wip-implementations) and see if anyone else has requested and/or is already working on your framework. If not, feel free to start working on one! Start [here][github-spec]! ## Found a Bug? If you find a bug in the project, you can help us by [submitting an issue][github-issue] to our [GitHub Repository][github]. Even better, you can [submit a Pull Request](#submit-pr) with a fix. ## Missing a Feature? You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub repository. If you would like to _implement_ a new feature, please submit an issue with a proposal for your work **FIRST**, to be sure that we can use it. Please consider what kind of change it is: - For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project. - **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). ## Submission Guidelines ### Submitting an Issue Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. You can file new issues by selecting from our [new issue templates][github-choose] and filling out the issue template. ### Submitting a Pull Request (PR) Before you submit your Pull Request (PR) consider the following guidelines: 1. Search [GitHub](https://github.com/realworld-apps/realworld/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate effort. 1. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design up front helps to ensure that we're ready to accept your work. 1. Fork the realworld-apps/realworld repo. 1. Make your changes in a new git branch: ```bash git checkout -b my-fix-branch master ``` 1. Create your patch. 1. Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). 1. Push your branch to GitHub: ```bash git push origin my-fix-branch ``` 1. In GitHub, send a pull request to `realworld:master`. - If we suggest changes then: - Make the required updates. - Rebase your branch and force push to your GitHub repository (this will update your Pull Request): ```bash git rebase master -i git push -f ``` That's it! Thank you for your contribution! #### After your pull request is merged After your pull request is merged, you can safely delete your branch and pull the changes from the master (upstream) repository: - Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: ```bash git push origin --delete my-fix-branch ``` - Check out the master branch: ```bash git checkout master -f ``` - Delete the local branch: ```bash git branch -D my-fix-branch ``` - Update your master with the latest upstream version: ```bash git pull --ff upstream master ``` ## Commit Message Guidelines > These guidelines have been added to the project starting from February 2025 We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. ### Commit Message Format Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**: ``` ():