diff --git a/.eslintrc.json b/.eslintrc.json
index 7c52faa3c..f5624d78a 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -18,7 +18,8 @@
}
]
}
- ]
+ ],
+ "@typescript-eslint/ban-ts-comment": "off"
}
},
{
diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
index f2754e8a1..fa3bd26d0 100644
--- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
+++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
@@ -1,30 +1,30 @@
-name: ๐ Bug report
-description: Report a bug in the RealWorld project
-title: '[Bug]: '
-labels:
- - bug
-assignees:
- - geromegrignon
-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/)
+name: ๐ Bug report
+description: Report a bug in the RealWorld project
+title: '[Bug]: '
+labels:
+ - bug
+assignees:
+ - geromegrignon
+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/)
diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
index 2c39da2e5..507d0564d 100644
--- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
+++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
@@ -1,38 +1,38 @@
-name: ๐ Feature request
-description: Suggest a feature for RealWorld project
-title: '[Feature Request]:'
-assignees:
- - geromegrignon
-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/)
+name: ๐ Feature request
+description: Suggest a feature for RealWorld project
+title: '[Feature Request]:'
+assignees:
+ - geromegrignon
+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/)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index a3247786b..d957572d7 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,9 +1,11 @@
## PR Checklist
+
Please check if your PR fulfills the following requirements:
- [ ] The commit message follows our guidelines: https://github.com/gothinkster/realworld/blob/master/CONTRIBUTING.md#commit
## PR Type
+
What kind of change does this PR introduce?
@@ -12,23 +14,19 @@ What kind of change does this PR introduce?
- [ ] Feature
- [ ] Other... Please describe:
-
## What is the current behavior?
+
Issue Number: N/A
-
## What is the new behavior?
-
## Does this PR introduce a breaking change?
- [ ] Yes
- [ ] No
-
-
## Other information
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 386b22355..7d9963bea 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,19 +1,13 @@
version: 2
updates:
-- package-ecosystem: github-actions
- directory: "/"
- schedule:
- interval: weekly
- open-pull-requests-limit: 10
+ - 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
-
-- package-ecosystem: npm
- directory: "/documentation"
- schedule:
- interval: weekly
- open-pull-requests-limit: 10
+ - package-ecosystem: npm
+ directory: '/'
+ schedule:
+ interval: weekly
+ open-pull-requests-limit: 10
diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml
new file mode 100644
index 000000000..d6ba02bd2
--- /dev/null
+++ b/.github/workflows/api.yaml
@@ -0,0 +1,34 @@
+name: CI
+
+on:
+ workflow_dispatch:
+ push:
+ branches: [main]
+ pull_request:
+ branches:
+ - '**'
+
+jobs:
+ run_tests:
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [12.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '16'
+ cache: 'npm'
+ - name: Install dependencies
+ run: npm ci --no-audit --prefer-offline --progress=false
+ - name: Check prettier
+ run: npm run prettier:check
+ - name: Check ESLinter
+ run: npm run lint:check
+ - name: Check unit tests
+ run: npm run test --ci --lastCommit --maxWorkers=50%
+ env:
+ CI: true
diff --git a/.github/workflows/test-documentation.yml b/.github/workflows/test-documentation.yml
index 17c8f50f2..5e16bc80a 100644
--- a/.github/workflows/test-documentation.yml
+++ b/.github/workflows/test-documentation.yml
@@ -13,12 +13,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16'
- cache: 'yarn'
- - name: Run install
- uses: borales/actions-yarn@v4
- with:
- cmd: install
+ cache: 'npm'
+ - name: Install dependencies
+ run: npm ci --no-audit --prefer-offline --progress=false
- name: Build production bundle
- uses: borales/actions-yarn@v4
- with:
- cmd: nx build documentation
+ run: npx nx build documentation
diff --git a/.gitignore b/.gitignore
index c2f2d1606..783c8f30e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,13 +4,13 @@
dist
tmp
/out-tsc
+_generated_
+
+# Keep environment variables out of version control
+.env
# dependencies
node_modules
-.yarn/*
-!.yarn/releases
-!.yarn/plugins
-.pnp.*
# IDEs and editors
/.idea
diff --git a/.husky/.gitignore b/.husky/.gitignore
new file mode 100644
index 000000000..31354ec13
--- /dev/null
+++ b/.husky/.gitignore
@@ -0,0 +1 @@
+_
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100755
index 000000000..36af21989
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1,4 @@
+#!/bin/sh
+. "$(dirname "$0")/_/husky.sh"
+
+npx lint-staged
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 000000000..521a9f7c0
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+legacy-peer-deps=true
diff --git a/.prettierignore b/.prettierignore
index ae3008687..7faf65fed 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,2 +1,3 @@
.prettierignore
-.docusaurus/
\ No newline at end of file
+.docusaurus/
+/dist
diff --git a/.prettierrc b/.prettierrc
index 544138be4..f45ef308e 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,3 +1,7 @@
{
- "singleQuote": true
+ "printWidth": 100,
+ "singleQuote": true,
+ "trailingComma": "all",
+ "bracketSpacing": true,
+ "arrowParens": "avoid"
}
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 6f61f2ff9..cc0cd255f 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
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,
+- 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
+- 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
+- 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
+- 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
+- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ 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
+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
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2e4ee4262..29e80826f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -85,13 +85,13 @@ Before you submit your Pull Request (PR) consider the following guidelines:
- 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):
+ - 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
- ```
+ ```bash
+ git rebase master -i
+ git push -f
+ ```
That's it! Thank you for your contribution!
@@ -127,7 +127,6 @@ from the master (upstream) repository:
## Commit Message Guidelines
> These guidelines have been added to the project starting from
->
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**.
@@ -167,6 +166,7 @@ The version in our package.json gets copied to the one we publish, and users nee
### Type
Must be one of the following:
+
- **docs**: Documentation only changes
- **feat**: A new feature
- **fix**: A bug fix
@@ -207,7 +207,7 @@ Close #394
```
```
-BREAKING CHANGE:
+BREAKING CHANGE:
change login route to /users/login
```
diff --git a/README.md b/README.md
index 164a7c54a..c64b76f42 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,18 @@

-
-### See how *the exact same* Medium.com clone (called [Conduit](https://demo.realworld.io)) is built using different [frontends](https://codebase.show/projects/realworld?category=frontend) and [backends](https://codebase.show/projects/realworld?category=backend). Yes, you can mix and match them, because **they all adhere to the same [API spec](https://realworld-docs.netlify.app/docs/specs/backend-specs/introduction)** ๐ฎ๐
+### See how _the exact same_ Medium.com clone (called [Conduit](https://demo.realworld.io)) is built using different [frontends](https://codebase.show/projects/realworld?category=frontend) and [backends](https://codebase.show/projects/realworld?category=backend). Yes, you can mix and match them, because **they all adhere to the same [API spec](https://realworld-docs.netlify.app/docs/specs/backend-specs/introduction)** ๐ฎ๐
While most "todo" demos provide an excellent cursory glance at a framework's capabilities, they typically don't convey the knowledge & perspective required to actually build _real_ applications with it.
**RealWorld** solves this by allowing you to choose any frontend (React, Angular, & more) and any backend (Node, Django, & more) and see how they power a real-world, beautifully designed full-stack app called [**Conduit**](https://demo.realworld.io).
-*Read the [full blog post announcing RealWorld on Medium.](https://medium.com/@ericsimons/introducing-realworld-6016654d36b5)*
+_Read the [full blog post announcing RealWorld on Medium.](https://medium.com/@ericsimons/introducing-realworld-6016654d36b5)_
Join us on [GitHub Discussions!](https://github.com/gothinkster/realworld/discussions) ๐
@@ -51,5 +50,4 @@ Gรฉrรดme is a Software Engineer at Sfeir. He's an open-source enthusiast. <
Manuel is an independent Software Engineer, creator of the [Layr framework](https://layrjs.com) and the [CodebaseShow website](https://codebase.show/).
- This is the generated root route.{' '}
- Click here for page 2.
+ This is the generated root route. Click here for page 2.
}
/>
diff --git a/apps/demo/src/app/nx-welcome.tsx b/apps/demo/src/app/nx-welcome.tsx
index 3c1a440fe..a1322bd24 100644
--- a/apps/demo/src/app/nx-welcome.tsx
+++ b/apps/demo/src/app/nx-welcome.tsx
@@ -665,11 +665,7 @@ export function NxWelcome({ title }: { title: string }) {
-
-
- You can activate distributed tasks executions and caching by
- running:
-
+
You can activate distributed tasks executions and caching by running:
nx connect-to-nx-cloud
-
+
{' '}
What is Nx Cloud?{' '}
diff --git a/apps/demo/src/main.tsx b/apps/demo/src/main.tsx
index 563fabfe0..eaffab661 100644
--- a/apps/demo/src/main.tsx
+++ b/apps/demo/src/main.tsx
@@ -4,13 +4,11 @@ import { BrowserRouter } from 'react-router-dom';
import App from './app/app';
-const root = ReactDOM.createRoot(
- document.getElementById('root') as HTMLElement
-);
+const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(
-
+ ,
);
diff --git a/apps/documentation/docs/community/resources.md b/apps/documentation/docs/community/resources.md
index 26c74f1ef..4d84766df 100644
--- a/apps/documentation/docs/community/resources.md
+++ b/apps/documentation/docs/community/resources.md
@@ -2,7 +2,6 @@
sidebar_position: 1
---
-
# Resources
# Community created resources
@@ -10,15 +9,14 @@ sidebar_position: 1
Forks, tutorials, workshops, and other resources based on the RealWorld project:
- [**RealWorld React/NodeJS E2E Tests**](https://github.com/anishkny/realworld-e2e-test) by [**Anish Karandikar**](https://github.com/anishkny)
- - A repo showing how to wire [React](https://github.com/gothinkster/react-redux-realworld-example-app) frontend with [NodeJS](https://github.com/gothinkster/node-express-realworld-example-app) backend for a RealWorld fullstack
- - Includes E2E integration tests that use [Chrome Puppeteer](https://github.com/GoogleChrome/puppeteer) and [Mocha](https://mochajs.org) and work with CI systems like [Travis CI](https://travis-ci.org/anishkny/realworld-e2e-test) and [CircleCI](https://circleci.com/gh/anishkny/realworld-e2e-test)
- - Also demonstrates usage of [Greenkeeper](https://greenkeeper.io) for automatic dependency updates and [Snyk](https://snyk.io/) for vulnerability monitoring
+ - A repo showing how to wire [React](https://github.com/gothinkster/react-redux-realworld-example-app) frontend with [NodeJS](https://github.com/gothinkster/node-express-realworld-example-app) backend for a RealWorld fullstack
+ - Includes E2E integration tests that use [Chrome Puppeteer](https://github.com/GoogleChrome/puppeteer) and [Mocha](https://mochajs.org) and work with CI systems like [Travis CI](https://travis-ci.org/anishkny/realworld-e2e-test) and [CircleCI](https://circleci.com/gh/anishkny/realworld-e2e-test)
+ - Also demonstrates usage of [Greenkeeper](https://greenkeeper.io) for automatic dependency updates and [Snyk](https://snyk.io/) for vulnerability monitoring
- Performance comparisons:
- - [A Real-World Comparison of Front-End Frameworks with Benchmarks 2020](https://medium.com/dailyjs/a-realworld-comparison-of-front-end-frameworks-2020-4e50655fe4c1)
- - [A Real-World Comparison of Front-End Frameworks with Benchmarks 2019](https://medium.freecodecamp.org/a-realworld-comparison-of-front-end-frameworks-with-benchmarks-2019-update-4be0d3c78075)
- - [A Real-World Comparison of Front-End Frameworks with Benchmarks 2018](https://medium.freecodecamp.org/a-real-world-comparison-of-front-end-frameworks-with-benchmarks-2018-update-e5760fb4a962)
- - [A Real-World Comparison of Front-End Frameworks with Benchmarks 2017](https://medium.freecodecamp.org/a-real-world-comparison-of-front-end-frameworks-with-benchmarks-e1cb62fd526c)
-
+ - [A Real-World Comparison of Front-End Frameworks with Benchmarks 2020](https://medium.com/dailyjs/a-realworld-comparison-of-front-end-frameworks-2020-4e50655fe4c1)
+ - [A Real-World Comparison of Front-End Frameworks with Benchmarks 2019](https://medium.freecodecamp.org/a-realworld-comparison-of-front-end-frameworks-with-benchmarks-2019-update-4be0d3c78075)
+ - [A Real-World Comparison of Front-End Frameworks with Benchmarks 2018](https://medium.freecodecamp.org/a-real-world-comparison-of-front-end-frameworks-with-benchmarks-2018-update-e5760fb4a962)
+ - [A Real-World Comparison of Front-End Frameworks with Benchmarks 2017](https://medium.freecodecamp.org/a-real-world-comparison-of-front-end-frameworks-with-benchmarks-e1cb62fd526c)
:::tip
Hello fellow writer, get in touch with us in [**GitHub Discussions**](https://github.com/gothinkster/realworld/discussions/categories/community) so we can add your RealWorld related content here.
diff --git a/apps/documentation/docs/community/special-thanks.md b/apps/documentation/docs/community/special-thanks.md
index e491f7ca0..8b976e87f 100644
--- a/apps/documentation/docs/community/special-thanks.md
+++ b/apps/documentation/docs/community/special-thanks.md
@@ -6,7 +6,7 @@ sidebar_position: 3
RealWorld would not be possible without the open source community's assistance in reviewing codebases, developing new app implementations, and a variety of other duties that help the project progress. We'd like to thank the following OSS leaders for their contributions to RealWorld:
-- **Dan Abramov** (creator of Redux) for helping [spark the initial idea](https://twitter.com/dan_abramov/status/692009757775896577), [getting the Redux community involved](https://github.com/reactjs/redux/issues/1353), as well as graciously taking the time to provide feedback on the Redux codebase
+- **Dan Abramov** (creator of Redux) for helping [spark the initial idea](https://twitter.com/dan_abramov/status/692009757775896577), [getting the Redux community involved](https://github.com/reactjs/redux/issues/1353), as well as graciously taking the time to provide feedback on the Redux codebase
- **Max Lynch** (creator of Ionic) for taking the time to provide guidance in the early days of this project
- **Addy Osmani** (creator of TodoMVC) for helping [spark the initial idea](https://twitter.com/addyosmani/status/762828483433144320) and his amazing work with TodoMVC
- **TodoMVC** ([team & contributors](https://github.com/tastejs/todomvc#team)) for their exemplary & successful work; their project & org has been an invaluable analogy for us as we've built out RealWorld
diff --git a/apps/documentation/docs/implementation-creation/expectations.md b/apps/documentation/docs/implementation-creation/expectations.md
index 266dca579..9b21c2e5b 100644
--- a/apps/documentation/docs/implementation-creation/expectations.md
+++ b/apps/documentation/docs/implementation-creation/expectations.md
@@ -30,8 +30,8 @@ That said, we do _prefer_ that every repo includes excellent tests that are exem
## Other Expectations
-* All the required features (see specs) should be implemented.
-* You should publish your implementation on a dedicated GitHub repository with the "Issues" section open.
-* You should provide a README that presents an overview of your implementation and explains how to run it locally.
-* The library/framework you are using should have at least 300 GitHub stars.
-* You should do your best to keep your implementation up to date.
+- All the required features (see specs) should be implemented.
+- You should publish your implementation on a dedicated GitHub repository with the "Issues" section open.
+- You should provide a README that presents an overview of your implementation and explains how to run it locally.
+- The library/framework you are using should have at least 300 GitHub stars.
+- You should do your best to keep your implementation up to date.
diff --git a/apps/documentation/docs/implementation-creation/features.md b/apps/documentation/docs/implementation-creation/features.md
index c2f917993..3b272e933 100644
--- a/apps/documentation/docs/implementation-creation/features.md
+++ b/apps/documentation/docs/implementation-creation/features.md
@@ -7,9 +7,9 @@ sidebar_position: 3
**General functionality:**
- Authenticate users via JWT (login/signup pages + logout button on settings page)
-- CRU* users (sign up & settings page - no deleting required)
+- CRU- users (sign up & settings page - no deleting required)
- CRUD Articles
-- CR*D Comments on articles (no updating required)
+- CR-D Comments on articles (no updating required)
- GET and display paginated lists of articles
- Favorite articles
- Follow other users
diff --git a/apps/documentation/docs/implementation-creation/introduction.md b/apps/documentation/docs/implementation-creation/introduction.md
index ffe7a6221..6a517fd80 100644
--- a/apps/documentation/docs/implementation-creation/introduction.md
+++ b/apps/documentation/docs/implementation-creation/introduction.md
@@ -7,15 +7,15 @@ sidebar_position: 1
**Conduit** is a social blogging site (i.e. a Medium.com clone). It uses a custom API for all requests, including authentication.
Discover our [live demo](https://demo.realworld.io).
-
:::tip
Check for [Discussions](https://github.com/gothinkster/realworld/discussions/categories/wip-implementations) about works in progress as we don't list duplicate projects.
An opportunity to collaborate might awaits you already.
:::
Otherwise:
+
1. [fork our starter kit](https://github.com/gothinkster/realworld-starter-kit)
-2. Read the followings sections: *expectations* and *features* for a better understanding of this project
+2. Read the followings sections: _expectations_ and _features_ for a better understanding of this project
3. Read the frontend and/or the backend specs
4. Submit the new implementation on [CodebaseShow](https://codebase.show/projects/realworld)
diff --git a/apps/documentation/docs/intro.mdx b/apps/documentation/docs/intro.mdx
index 489fcad4f..75851ef17 100644
--- a/apps/documentation/docs/intro.mdx
+++ b/apps/documentation/docs/intro.mdx
@@ -6,15 +6,17 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
# Introduction
-
+
+
+
-> See how *the exact same* Medium.com clone (called [Conduit](https://demo.realworld.io)) is built using different [frontends](https://codebase.show/projects/realworld?category=frontend) and [backends](https://codebase.show/projects/realworld?category=backend). Yes, you can mix and match them, because **they all adhere to the same [API spec](specs/backend-specs/introduction)** ๐ฎ๐
+> See how _the exact same_ Medium.com clone (called [Conduit](https://demo.realworld.io)) is built using different [frontends](https://codebase.show/projects/realworld?category=frontend) and [backends](https://codebase.show/projects/realworld?category=backend). Yes, you can mix and match them, because **they all adhere to the same [API spec](specs/backend-specs/introduction)** ๐ฎ๐
While most "todo" demos provide an excellent cursory glance at a framework's capabilities, they typically don't convey the knowledge & perspective required to actually build _real_ applications with it.
**RealWorld** solves this by allowing you to choose any frontend (React, Angular, & more) and any backend (Node, Django, & more) and see how they power a real world, beautifully designed fullstack app called [**Conduit**](https://demo.realworld.io).
-*Read the [full blog post announcing RealWorld on Medium.](https://medium.com/@ericsimons/introducing-realworld-6016654d36b5)*
+_Read the [full blog post announcing RealWorld on Medium.](https://medium.com/@ericsimons/introducing-realworld-6016654d36b5)_
Join us on [GitHub Discussions!](https://github.com/gothinkster/realworld/discussions) ๐
diff --git a/apps/documentation/docs/specs/backend-specs/endpoints.md b/apps/documentation/docs/specs/backend-specs/endpoints.md
index 718750641..d3fd88758 100644
--- a/apps/documentation/docs/specs/backend-specs/endpoints.md
+++ b/apps/documentation/docs/specs/backend-specs/endpoints.md
@@ -10,12 +10,12 @@ You can read the authentication header from the headers of the request
`Authorization: Token jwt.token.here`
-
### Authentication:
`POST /api/users/login`
Example request body:
+
```JSON
{
"user":{
@@ -29,12 +29,12 @@ No authentication required, returns a [User](/specs/backend-specs/api-response-f
Required fields: `email`, `password`
-
### Registration:
`POST /api/users`
Example request body:
+
```JSON
{
"user":{
@@ -49,21 +49,18 @@ No authentication required, returns a [User](/specs/backend-specs/api-response-f
Required fields: `email`, `username`, `password`
-
-
### Get Current User
`GET /api/user`
Authentication required, returns a [User](/specs/backend-specs/api-response-format.md#users-for-authentication) that's the current user
-
-
### Update User
`PUT /api/user`
Example request body:
+
```JSON
{
"user":{
@@ -76,19 +73,14 @@ Example request body:
Authentication required, returns the [User](/specs/backend-specs/api-response-format.md#users-for-authentication)
-
Accepted fields: `email`, `username`, `password`, `image`, `bio`
-
-
### Get Profile
`GET /api/profiles/:username`
Authentication optional, returns a [Profile](/specs/backend-specs/api-response-format.md#profile)
-
-
### Follow user
`POST /api/profiles/:username/follow`
@@ -97,8 +89,6 @@ Authentication required, returns a [Profile](/specs/backend-specs/api-response-f
No additional parameters required
-
-
### Unfollow user
`DELETE /api/profiles/:username/follow`
@@ -107,8 +97,6 @@ Authentication required, returns a [Profile](/specs/backend-specs/api-response-f
No additional parameters required
-
-
### List Articles
`GET /api/articles`
@@ -139,8 +127,6 @@ Offset/skip number of articles (default is 0):
Authentication optional, will return [multiple articles](/specs/backend-specs/api-response-format.md#multiple-articles), ordered by most recent first
-
-
### Feed Articles
`GET /api/articles/feed`
@@ -149,7 +135,6 @@ Can also take `limit` and `offset` query parameters like [List Articles](/specs/
Authentication required, will return [multiple articles](/specs/backend-specs/api-response-format.md#multiple-articles) created by followed users, ordered by most recent first.
-
### Get Article
`GET /api/articles/:slug`
@@ -179,8 +164,6 @@ Required fields: `title`, `description`, `body`
Optional fields: `tagList` as an array of Strings
-
-
### Update Article
`PUT /api/articles/:slug`
@@ -201,15 +184,12 @@ Optional fields: `title`, `description`, `body`
The `slug` also gets updated when the `title` is changed
-
### Delete Article
`DELETE /api/articles/:slug`
Authentication required
-
-
### Add Comments to an Article
`POST /api/articles/:slug/comments`
@@ -228,24 +208,18 @@ Authentication required, returns the created [Comment](/specs/backend-specs/api-
Required field: `body`
-
-
### Get Comments from an Article
`GET /api/articles/:slug/comments`
Authentication optional, returns [multiple comments](/specs/backend-specs/api-response-format.md#multiple-comments)
-
-
### Delete Comment
`DELETE /api/articles/:slug/comments/:id`
Authentication required
-
-
### Favorite Article
`POST /api/articles/:slug/favorite`
@@ -254,8 +228,6 @@ Authentication required, returns the [Article](/specs/backend-specs/api-response
No additional parameters required
-
-
### Unfavorite Article
`DELETE /api/articles/:slug/favorite`
@@ -264,8 +236,6 @@ Authentication required, returns the [Article](/specs/backend-specs/api-response
No additional parameters required
-
-
### Get Tags
`GET /api/tags`
diff --git a/apps/documentation/docs/specs/backend-specs/introduction.md b/apps/documentation/docs/specs/backend-specs/introduction.md
index 217c57407..6b75d854f 100644
--- a/apps/documentation/docs/specs/backend-specs/introduction.md
+++ b/apps/documentation/docs/specs/backend-specs/introduction.md
@@ -4,7 +4,6 @@ sidebar_position: 1
# Introduction
-
All backend implementations need to adhere to our [API spec](https://github.com/gothinkster/realworld/tree/main/api).
For your convenience, we have a [Postman collection](https://github.com/gothinkster/realworld/blob/main/api/Conduit.postman_collection.json) that you can use to test your API endpoints as you build your app.
diff --git a/apps/documentation/docs/specs/backend-specs/postman.md b/apps/documentation/docs/specs/backend-specs/postman.md
index ee7d16e35..0b9484062 100644
--- a/apps/documentation/docs/specs/backend-specs/postman.md
+++ b/apps/documentation/docs/specs/backend-specs/postman.md
@@ -6,8 +6,6 @@ sidebar_position: 6
For your convenience, we have a [Postman collection](https://github.com/gothinkster/realworld/blob/master/api/Conduit.postman_collection.json) that you can use to test your API endpoints as you build your app.
-
## Running API tests locally
To locally run the provided Postman collection against your backend, follow instructions [here](https://github.com/gothinkster/realworld/tree/main/api).
-
diff --git a/apps/documentation/docs/specs/frontend-specs/api.md b/apps/documentation/docs/specs/frontend-specs/api.md
index f01b8f888..1148cc062 100644
--- a/apps/documentation/docs/specs/frontend-specs/api.md
+++ b/apps/documentation/docs/specs/frontend-specs/api.md
@@ -5,6 +5,7 @@ sidebar_position: 5
# API
This project provides you different solutions to test your frontend implementation with an API by:
+
- [running our official backend implementation locally](#run-the-official-backend-implementation-locally)
- [hosting your own API](#host-your-own-api)
- [using the API deployed for the official demo](#demo-api)
@@ -19,14 +20,14 @@ The Readme will provide you guidances to start the server locally.
We encourage you to use this implementation's **main** branch for local tests as the **limited** one includes [limitations](#api-limitations) aimed to protect public-hosted APIs.
:::
-
## Host your own API
The official backend implementation includes a [**Deploy to Heroku** button](https://github.com/gothinkster/node-express-prisma-v1-official-app#deploy-to-heroku).
This button provides you a quick and easy way to deploy the API on Heroku for your frontend implementation.
-:::caution
+:::caution
The official backend implementation repository includes two branches:
+
- the **main** branch which adheres to the RealWorld backend specs
- the **limited** branch which includes limitations for public-hosted APIs
@@ -39,7 +40,6 @@ The **limited** branch will be more suitable if you plan to host your implementa
This project provides you with a public hosted API to test your frontend implementations.
Point your API requests to `https://api.realworld.io/api` and you're good to go!
-
### API Usage
The usage of the API is free and non-limited by any kind of key.
@@ -60,17 +60,17 @@ Most of the requests require a valid token.
You can retrieve a token by logging in or by registering.
Log in : https://api.realworld.io/api-docs/#/User%20and%20Authentication/Login
-Register: https://api.realworld.io/api-docs/#/User%20and%20Authentication/CreateUser
+Register: https://api.realworld.io/api-docs/#/User%20and%20Authentication/CreateUser
-* Click the `Try it out` button
-* populate the body input with the related credentials
-* Click `Execute` button
-* Copy the token from the response body
+- Click the `Try it out` button
+- populate the body input with the related credentials
+- Click `Execute` button
+- Copy the token from the response body
#### Register the token
-* Click `Authorize` button on top of the Swagger documentation page
-* Populate the field with `Token `
+- Click `Authorize` button on top of the Swagger documentation page
+- Populate the field with `Token `
## API Limitations
@@ -79,5 +79,6 @@ To provide everyone a **safe** and **healthy** experience, the following limitat
:::
The visibility of user content is limited :
+
- logged out users see only content created by demo accounts
- logged in users see only their content and the content created by demo accounts
diff --git a/apps/documentation/docs/specs/frontend-specs/routing.md b/apps/documentation/docs/specs/frontend-specs/routing.md
index 2b1aa0b24..b8f8ffbeb 100644
--- a/apps/documentation/docs/specs/frontend-specs/routing.md
+++ b/apps/documentation/docs/specs/frontend-specs/routing.md
@@ -5,19 +5,19 @@ sidebar_position: 3
# Routing Guidelines
- Home page (URL: /#/ )
- - List of tags
- - List of articles pulled from either Feed, Global, or by Tag
- - Pagination for list of articles
+ - List of tags
+ - List of articles pulled from either Feed, Global, or by Tag
+ - Pagination for list of articles
- Sign in/Sign up pages (URL: /#/login, /#/register )
- - Uses JWT (store the token in localStorage)
- - Authentication can be easily switched to session/cookie based
+ - Uses JWT (store the token in localStorage)
+ - Authentication can be easily switched to session/cookie based
- Settings page (URL: /#/settings )
- Editor page to create/edit articles (URL: /#/editor, /#/editor/article-slug-here )
- Article page (URL: /#/article/article-slug-here )
- - Delete article button (only shown to article's author)
- - Render markdown from server client side
- - Comments section at bottom of page
- - Delete comment button (only shown to comment's author)
+ - Delete article button (only shown to article's author)
+ - Render markdown from server client side
+ - Comments section at bottom of page
+ - Delete comment button (only shown to comment's author)
- Profile page (URL: /#/profile/:username, /#/profile/:username/favorites )
- - Show basic user info
- - List of articles populated from author's created articles or author's favorited articles
+ - Show basic user info
+ - List of articles populated from author's created articles or author's favorited articles
diff --git a/apps/documentation/docs/specs/frontend-specs/styles.md b/apps/documentation/docs/specs/frontend-specs/styles.md
index d00077ed6..1dcf3126c 100644
--- a/apps/documentation/docs/specs/frontend-specs/styles.md
+++ b/apps/documentation/docs/specs/frontend-specs/styles.md
@@ -4,13 +4,12 @@ sidebar_position: 2
# Styles
-We created a custom Bootstrap 4 style & templates to ensure all frontends had consistent UI functionality. Our [starter kit](https://github.com/gothinkster/realworld-starter-kit) includes all the [templates & info required to get up and running](https://github.com/gothinkster/realworld-starter-kit/blob/master/FRONTEND_INSTRUCTIONS.md).
-
+We created a custom Bootstrap 4 style & templates to ensure all frontends had consistent UI functionality. Our [starter kit](https://github.com/gothinkster/realworld-starter-kit) includes all the [templates & info required to get up and running](https://github.com/gothinkster/realworld-starter-kit/blob/master/FRONTEND_INSTRUCTIONS.md).
Instead of having the Bootstrap theme included locally, we recommend loading the precompiled theme from our CDN (our [header template](/specs/frontend-specs/templates.md#header) does this by default):
```html
-
+
```
Alternatively, if you want to make modifications to the theme, check out the [theme's repo](https://github.com/gothinkster/conduit-bootstrap-template).
diff --git a/apps/documentation/docs/specs/frontend-specs/templates.md b/apps/documentation/docs/specs/frontend-specs/templates.md
index 317110261..f97cb76f0 100644
--- a/apps/documentation/docs/specs/frontend-specs/templates.md
+++ b/apps/documentation/docs/specs/frontend-specs/templates.md
@@ -11,64 +11,63 @@ sidebar_position: 1
```html
-
-
+
+
Conduit
-
-
+
+
-
-
-
-
-
+
+
```
### Footer
```html
-
-
-
-