Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nuxt): Add Nuxt SDK docs #1728

Merged
merged 26 commits into from
Dec 19, 2024

Conversation

wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Nov 20, 2024

Note:

I think it's best to review this PR after the Vue SDK PRs!

Explanation:

  • Alongside the new Vue SDK we're launching, we're also launching an official Nuxt SDK. Nuxt is the fullstack framework for Vue.
  • Nuxt SDK will be our fullstack SDK for Vue devs
  • Here's the Nuxt SDK PR, merged and 0.0.1 released

This PR:

  • Adds Nuxt SDK quickstart guide (quickstart repo here, 1:1 with the guide)
  • Ads SDK References and code examples

Checklist

  • I have clicked on "Files changed" and performed a thorough self-review
  • I have added the "deploy-preview" label and added the preview link(s) to this PR description
  • All existing checks pass

Resolves ECO-244

Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/1728

@wobsoriano wobsoriano changed the title feat(nuxt): Add Nuxt SDK docs (WIP) feat(nuxt): Add Nuxt SDK docs Nov 20, 2024
@wobsoriano wobsoriano marked this pull request as ready for review November 20, 2024 23:33
@wobsoriano wobsoriano requested review from a team as code owners November 20, 2024 23:33
@wobsoriano wobsoriano changed the base branch from main to rob/eco-224-vue-sdk-references December 13, 2024 17:35
@wobsoriano wobsoriano force-pushed the rob/eco-224-nuxt-quickstart branch from 0d59d11 to 162d9f2 Compare December 13, 2024 17:35
@alexisintech alexisintech force-pushed the rob/eco-224-vue-sdk-references branch from 32fa402 to 7954eae Compare December 13, 2024 21:05
Copy link
Contributor

@victoriaxyz victoriaxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wobsoriano, here's my update!

docs/quickstarts/nuxt.mdx

  • update quickstart
  • fix <TutorialHero/> steps, links, headings
  • rewrite and restructure sections

docs/references/backend/overview.mdx

  • fix code file path and function name

docs/references/nuxt/clerk-middleware.mdx

  • rewrite title, description, intro, sections
  • rewrite and restructure to protecting routes via authentication and authorization status
  • fix code logic, file paths, comments

docs/references/nuxt/overview.mdx

  • rewrite title, description, intro, headings, sections

docs/references/nuxt/protecting-pages.mdx

  • rewrite title, description, intro, headings, sections

docs/references/nuxt/read-session-data.mdx

  • rewrite title, description, intro, headings, sections
  • restructure sections
  • fix code logic, file paths, comments

// Check if the user is trying to access a protected route
if (isAdminRoute) {
// Check if the user has the required admin role
if (orgRole !== 'org:admin') {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can also use the role property here @alexisintech? Something lik,e !has({ role: 'org:admin' })

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Use `useAuth()`

<Include src="_partials/nuxt/use-auth" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL 👀

@wobsoriano wobsoriano merged commit 2aefa83 into rob/eco-224-vue-sdk-references Dec 19, 2024
1 check passed
@wobsoriano wobsoriano deleted the rob/eco-224-nuxt-quickstart branch December 19, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants