Skip to content

Commit

Permalink
chore: tanstack starter docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Jan 30, 2025
1 parent cab90a0 commit aa05723
Show file tree
Hide file tree
Showing 64 changed files with 3,313 additions and 19 deletions.
14 changes: 14 additions & 0 deletions apps/website/public/img/frameworks/better-auth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
306 changes: 306 additions & 0 deletions apps/website/src/data/tanstack-sidebar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,306 @@
import { RouteItem } from '@/docs/utils/get-route-context'

const sidebar = {
routes: [
{
title: 'Overview',
path: '/docs/nextjs-starter-kit',
},
{
title: 'Tech stack',
path: '/docs/nextjs-starter-kit/tech-stack',
},
{
title: 'Project structure',
path: '/docs/nextjs-starter-kit/project-structure',
},
{
title: 'CLI commands',
path: '/docs/nextjs-starter-kit/commands',
},
{
title: 'Installation',
path: '/docs/nextjs-starter-kit/installation',
open: false,
heading: true,
routes: [
{
title: 'Overview',
path: '/docs/nextjs-starter-kit/installation',
},
{
title: 'Clone the repository',
path: '/docs/nextjs-starter-kit/installation/clone-repository',
},
{
title: 'Run the application',
path: '/docs/nextjs-starter-kit/installation/run-application',
},
{
title: 'Using PNPM',
path: '/docs/nextjs-starter-kit/installation/using-pnpm',
},
],
},
{
title: 'Configuration',
path: '/docs/nextjs-starter-kit/configuration',
heading: true,
open: false,
routes: [
{
title: 'Environment variables',
path: '/docs/nextjs-starter-kit/configuration/environment-variables',
},
],
},
{
title: 'Authentication',
path: '/docs/nextjs-starter-kit/authentication',
heading: true,
open: false,
routes: [
{
title: 'Overview',
path: '/docs/nextjs-starter-kit/authentication',
},
{
title: 'Better auth',
path: '/docs/nextjs-starter-kit/authentication/better-auth',
},
{
title: 'Supabase',
path: '/docs/nextjs-starter-kit/authentication/supabase',
},
{
title: 'Customize auth screens',
path: '/docs/nextjs-starter-kit/authentication/customize-auth-screens',
},
],
},
{
title: 'Theming',
path: '/docs/theming',
heading: true,
open: false,
routes: [
{
title: 'Configuration',
path: '/docs/nextjs-starter-kit/theming/configuration',
},
{
title: 'Fonts',
path: '/docs/nextjs-starter-kit/theming/fonts',
},
{
title: 'Logo',
path: '/docs/nextjs-starter-kit/theming/logo',
},
],
},
{
title: 'API',
path: '/docs/nextjs-starter-kit/api',
heading: true,
open: false,
routes: [
{
title: 'Overview',
path: '/docs/nextjs-starter-kit/api',
},
{
title: 'Conventions',
path: '/docs/nextjs-starter-kit/api/conventions',
},
{
title: 'Define procedures',
path: '/docs/nextjs-starter-kit/api/define-procedures',
},
{
title: 'Router context',
path: '/docs/nextjs-starter-kit/api/router-context',
},
{
title: 'Calling procedures',
path: '/docs/nextjs-starter-kit/api/calling-procedures',
},
],
},
{
title: 'API procedures',
path: '/docs/nextjs-starter-kit/api-procedures',
heading: true,
open: false,
routes: [
{
title: 'Auth',
path: '/docs/nextjs-starter-kit/api-procedures/auth',
},
{
title: 'Billing',
path: '/docs/nextjs-starter-kit/api-procedures/billing',
},
{
title: 'Users',
path: '/docs/nextjs-starter-kit/api-procedures/users',
},
{
title: 'Workspace members',
path: '/docs/nextjs-starter-kit/api-procedures/workspace-members',
},
{
title: 'Workspaces',
path: '/docs/nextjs-starter-kit/api-procedures/workspaces',
},
{
title: 'Notifications',
path: '/docs/nextjs-starter-kit/api-procedures/notifications',
},
{
title: 'Tags',
path: '/docs/nextjs-starter-kit/api-procedures/tags',
},
{
title: 'Contacts',
path: '/docs/nextjs-starter-kit/api-procedures/contacts',
},
],
},
{
title: 'Database',
path: '/docs/nextjs-starter-kit/database',
heading: true,
open: false,
routes: [
{
title: 'Overview',
path: '/docs/nextjs-starter-kit/database',
},
{
title: 'Migrations',
path: '/docs/nextjs-starter-kit/database/migrations',
},
{
title: 'Schema',
path: '/docs/nextjs-starter-kit/database/schema',
},
{
title: 'Seed data',
path: '/docs/nextjs-starter-kit/database/seed-data',
},
{
title: 'Drizzle Studio',
path: '/docs/nextjs-starter-kit/database/studio',
},
],
},
{
title: 'Development',
path: '/docs/nextjs-starter-kit/development',
heading: true,
open: false,
routes: [
{
title: 'Updating dependencies',
path: '/docs/nextjs-starter-kit/development/updating-dependencies',
},
{
title: 'Adding pages',
path: '/docs/nextjs-starter-kit/development/adding-pages',
},
{
title: 'Forms and validation',
path: '/docs/nextjs-starter-kit/development/forms-and-validation',
},
{
title: 'Error handling',
path: '/docs/nextjs-starter-kit/development/error-handling',
},
],
},
{
title: 'Billing',
path: '/docs/nextjs-starter-kit/billing',
heading: true,
open: false,
routes: [
{
title: 'Overview',
path: '/docs/nextjs-starter-kit/billing',
},
{
title: 'Billing plans',
path: '/docs/nextjs-starter-kit/billing/plans',
},
{
title: 'Stripe',
path: '/docs/nextjs-starter-kit/billing/stripe',
},
{
title: 'Unit based usage',
path: '/docs/nextjs-starter-kit/billing/unit-based-usage',
},
{
title: 'Metered usage',
path: '/docs/nextjs-starter-kit/billing/metered-based-usage',
},
{
title: 'Webhooks',
path: '/docs/nextjs-starter-kit/billing/webhooks',
},
],
},
{
title: 'Deployments',
path: '/docs/nextjs-starter-kit/deployments',
heading: true,
open: false,
routes: [
{
title: 'Preparation',
path: '/docs/nextjs-starter-kit/deployments/preparation',
},
{
title: 'Deploy to Vercel',
path: '/docs/nextjs-starter-kit/deployments/vercel',
},
{
title: 'Deploy to Netlify',
path: '/docs/nextjs-starter-kit/deployments/netlify',
},
],
},
// {
// title: 'Troubleshooting',
// path: '/docs/nextjs-starter-kit/troubleshooting',
// heading: true,
// open: false,
// routes: [
// {
// title: 'Common issues',
// },
// {
// title: 'Community support',
// },
// ],
// },
{
title: 'Contributing',
path: '/docs/nextjs-starter-kit/contributing',
heading: true,
open: false,
routes: [
{
title: 'Report bugs or feature requests',
path: '/docs/nextjs-starter-kit/contributing/bugs-and-feature-requests',
},
{
title: 'Contribute to the project',
path: '/docs/nextjs-starter-kit/contributing/contributing',
},
],
},
] as RouteItem[],
}

export default sidebar
20 changes: 18 additions & 2 deletions apps/website/src/docs/components/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
Flex,
Text,
HStack,
Image,
MenuGroup,
} from '@chakra-ui/react'
import { Routes, RouteItem } from '@/docs/utils/get-route-context'
import { convertBackticksToInlineCode } from '@/docs/utils/convert-backticks-to-inline-code'
Expand Down Expand Up @@ -391,6 +393,20 @@ function SidebarSwitch() {
href: '/docs/nextjs-starter-kit',
icon: NextjsIcon,
},
{
label: 'Tanstack Router (SPA) starter kit',
description: 'SPA starter kit using Tanstack Router.',
href: '/docs/tanstack-router-starter-kit',
icon: () => (
<Image
src="/img/frameworks/tanstack.png"
alt="Tanstack Router"
boxSize="4"
mt="1"
alignSelf="start"
/>
),
},
]

const activeItem = items
Expand All @@ -416,7 +432,7 @@ function SidebarSwitch() {
borderColor: 'whiteAlpha.200',
}}
>
<HStack as="span" minW="0">
<HStack as="span" minW="0" alignItems="center">
<Icon as={activeItem?.icon} alignSelf="start" boxSize="4" />
<Stack as="span" spacing="1" flex="1" minW="0">
<Text as="span" flex="1">
Expand All @@ -440,7 +456,7 @@ function SidebarSwitch() {
<Link key={item.href} href={item.href} legacyBehavior>
<MenuItem fontSize="xs">
<HStack flex="1">
<Icon as={item.icon} alignSelf="start" boxSize="4" />
<Icon as={item.icon} alignSelf="start" mt="1" boxSize="4" />
<Stack spacing="0" flex="1">
<Text as="span" flex="1" fontWeight="semibold">
{item?.label}
Expand Down
2 changes: 2 additions & 0 deletions apps/website/src/layouts/mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import docsSidebar from '@/data/docs-sidebar'
import coreSidebar from '@/data/core-sidebar'
import proSidebar from '@/data/pro-sidebar'
import nextjsSidebar from '@/data/nextjs-sidebar'
import tanstackSidebar from '@/data/tanstack-sidebar'
import guidesSidebar from '@/data/guides-sidebar'
import * as React from 'react'
import {
Expand All @@ -26,6 +27,7 @@ export function getRoutes(slug: string) {
'/docs/guides': guidesSidebar,
'/docs/pro': proSidebar,
'/docs/nextjs-starter-kit': nextjsSidebar,
'/docs/tanstack-router-starter-kit': tanstackSidebar,
'/blog': { routes: [] },
}

Expand Down
Loading

0 comments on commit aa05723

Please sign in to comment.