repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/graphql/interfaces/codegen.ts
starters/deno-oak-denodb/src/graphql/interfaces/codegen.ts
// deno-lint-ignore-file import { GraphQLResolveInfo } from '../../../deps.ts'; export type Maybe<T> = T | null; export type InputMaybe<T> = Maybe<T>; export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }; export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/graphql/schema/technology.ts
starters/deno-oak-denodb/src/graphql/schema/technology.ts
import { gql } from '../../../deps.ts'; export const technologyTypes = gql` type Technology { id: String! displayName: String! description: String! url: String! createdAt: String! updatedAt: String! } input CreateTechnologyInput { displayName: String! description: String! url...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/graphql/resolvers/mutation_handler.ts
starters/deno-oak-denodb/src/graphql/resolvers/mutation_handler.ts
import { GraphqlContext } from '../interfaces/graphql_interfaces.ts'; import { MutationCreateTechnologyArgs, MutationDeleteTechnologyByIdArgs, MutationUpdateTechnologyArgs, ResolveType, Technology, } from '../interfaces/codegen.ts'; import { TechnologyRepository } from '../../db/repository/technology_repository.ts...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/graphql/resolvers/resolvers.ts
starters/deno-oak-denodb/src/graphql/resolvers/resolvers.ts
import { Resolvers } from '../interfaces/codegen.ts'; import { GraphqlContext } from '../interfaces/graphql_interfaces.ts'; import { createTechnology, deleteTechnologyById, updateTechnology } from './mutation_handler.ts'; import { technologies, technology } from './query_handler.ts'; export const technologyResolvers: ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/graphql/resolvers/query_handler.ts
starters/deno-oak-denodb/src/graphql/resolvers/query_handler.ts
import { GraphQLResolveInfo } from '../../../deps.ts'; import { useCache } from '../../cache/use_cache.ts'; import { QueryTechnologyArgs, Technology } from '../interfaces/codegen.ts'; import { GraphqlContext } from '../interfaces/graphql_interfaces.ts'; import { TechnologyRepository } from '../../db/repository/technolo...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/db/db.ts
starters/deno-oak-denodb/src/db/db.ts
import { Database, PostgresConnector } from '../../deps.ts'; import { TechnologyModel } from './model/technology_model.ts'; import { DATABASE_HOST, DATABASE_NAME, DATABASE_PASSWORD, DATABASE_USERNAME, } from '../config/environment.ts'; const connection = new PostgresConnector({ host: DATABASE_HOST, username: DAT...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/db/run_seeder.ts
starters/deno-oak-denodb/src/db/run_seeder.ts
import { Database, PostgresConnector } from '../../deps.ts'; import { TechnologyModel } from './model/technology_model.ts'; import { technologySeedData } from './seeding/technology_seeder.ts'; import { DATABASE_HOST, DATABASE_NAME, DATABASE_PASSWORD, DATABASE_USERNAME, } from '../config/environment.ts'; async fun...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/db/model/technology_model.ts
starters/deno-oak-denodb/src/db/model/technology_model.ts
import { DataTypes, Model } from '../../../deps.ts'; export class TechnologyModel extends Model { static table = 'technologies'; static timestamps = true; static fields = { id: { type: DataTypes.UUID, primaryKey: true, }, displayName: { type: DataTypes.STRING }, description: { type: DataTypes.STRING ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/db/seeding/technology_seeder.ts
starters/deno-oak-denodb/src/db/seeding/technology_seeder.ts
export const technologySeedData = [ { id: crypto.randomUUID(), displayName: 'Oak', description: 'A middleware framework for Deno\'s native HTTP server, Deno Deploy and Node.js 16.5 and later. It also includes a middleware router.', url: 'https://oakserver.github.io/oak/', }, { id: crypto.randomUUID(), ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/db/repository/technology_repository.ts
starters/deno-oak-denodb/src/db/repository/technology_repository.ts
import { TechnologyModel } from '../model/technology_model.ts'; import { FieldValue } from '../../../deps.ts'; export class TechnologyRepository { static create(technologyFields: { [key: string]: FieldValue }): Promise<TechnologyModel> { return TechnologyModel.create({ id: crypto.randomUUID(), ...technologyFi...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/__tests__/mutation_handler_test.ts
starters/deno-oak-denodb/src/__tests__/mutation_handler_test.ts
import { afterEach, assertEquals, beforeEach, describe, it, Spy, spy, Stub, stub, } from '../../dev_deps.ts'; import { createTechnology, deleteTechnologyById, updateTechnology, } from '../graphql/resolvers/mutation_handler.ts'; import { TechnologyRepository } from '../db/repository/technology_repository.ts'...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/__tests__/example_test.ts
starters/deno-oak-denodb/src/__tests__/example_test.ts
import { assertEquals } from '../../dev_deps.ts'; Deno.test('url test', () => { const url = new URL('./foo.js', 'https://deno.land/'); assertEquals(url.href, 'https://deno.land/foo.js'); });
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/__tests__/query_handler_test.ts
starters/deno-oak-denodb/src/__tests__/query_handler_test.ts
import { technologies, technology } from '../graphql/resolvers/query_handler.ts'; import { TechnologyRepository } from '../db/repository/technology_repository.ts'; import { afterEach, assertEquals, assertSpyCall, assertSpyCalls, beforeEach, describe, it, Spy, spy, Stub, stub, } from '../../dev_deps.ts'; con...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/docs/sources.ts
starters/deno-oak-denodb/src/docs/sources.ts
/** * All public exports from the modules listed below will be used for generating the documentation. */ export * from '../util/cors_allowed_origins.ts'; export * from '../rest/handlers/healtcheck_handler.ts'; export * from '../graphql/resolvers/mutation_handler.ts'; export * from '../graphql/resolvers/query_handler....
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/config/environment.ts
starters/deno-oak-denodb/src/config/environment.ts
import { config } from '../../deps.ts'; export const { API_HOST, DATABASE_HOST, DATABASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD, PORT, CORS_ALLOWED_ORIGINS, LOG_LEVEL, REDIS_CACHE_HOST, REDIS_CACHE_PORT, PRODUCTION, } = config({ safe: true, allowEmptyValues: true, });
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/rest/services/healtcheck_service.ts
starters/deno-oak-denodb/src/rest/services/healtcheck_service.ts
import { cache } from '../../cache/mod.ts'; import { logger } from '../../util/logger.ts'; import { db } from '../../db/db.ts'; import { PostgresConnector } from '../../../deps.ts'; export async function isCacheRunning(): Promise<boolean> { let isRunning; try { const pingResponses = Promise.race([ cache.pingRe...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/deno-oak-denodb/src/rest/handlers/healtcheck_handler.ts
starters/deno-oak-denodb/src/rest/handlers/healtcheck_handler.ts
import { Context } from '../../../deps.ts'; import { isCacheRunning, isDatabaseRunning } from '../services/healtcheck_service.ts'; interface HealthCheckResponse { isCacheRunning: boolean; isDatabaseRunning: boolean; } /** * Handles the healthcheck endpoint. Returns the status of the databases. * @param response T...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/.storybook/preview.ts
starters/next-chakra-ui/.storybook/preview.ts
import type { Preview } from "@storybook/react"; import "../styles/globals.css"; const preview: Preview = { parameters: { actions: { argTypesRegex: "^on[A-Z].*" }, controls: { matchers: { color: /(background|color)$/i, date: /Date$/, }, }, }, }; export default preview;
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/.storybook/main.ts
starters/next-chakra-ui/.storybook/main.ts
import type { StorybookConfig } from "@storybook/nextjs"; import path from "path"; const config: StorybookConfig = { stories: [ "../src/pages/**/*.mdx", "../src/components/**/*.stories.@(js|jsx|ts|tsx)", ], staticDirs: ["../public"], addons: [ "@chakra-ui/storybook-addon", "@storybook/addon-a11...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/pages/counter-example.tsx
starters/next-chakra-ui/src/pages/counter-example.tsx
import type { NextPage } from "next"; import Link from "next/link"; import { Center, Heading } from "@chakra-ui/react"; import { Counter } from "../components/Counter"; import { useState } from "react"; const CounterExample: NextPage = () => { const [count, setCount] = useState<number>(0); return ( <> <...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/pages/_app.tsx
starters/next-chakra-ui/src/pages/_app.tsx
import type { AppProps } from "next/app"; import { ChakraProvider, extendTheme } from "@chakra-ui/react"; // you can extend the theme and add custom colors, font styles, etc. const colors = { brand: { 50: "#1a365d", 100: "#153e75", 500: "#2464ec", }, }; const fontWeights = { normal: 400, medium: 6...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/pages/fetch-example.tsx
starters/next-chakra-ui/src/pages/fetch-example.tsx
import type { NextPage } from "next"; import Link from "next/link"; import { Greeting } from "../components/greeting/Greeting"; import { Heading, Center } from "@chakra-ui/react"; import { useState, useEffect } from "react"; const FetchExample: NextPage = () => { const [greeting, setGreeting] = useState<string>("");...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/pages/index.tsx
starters/next-chakra-ui/src/pages/index.tsx
import type { NextPage } from "next"; import Head from "next/head"; import Link from "next/link"; import { Heading, Box, Center, UnorderedList, ListItem, Flex, } from "@chakra-ui/react"; type Routes = { text: string; route: string; }; const Home: NextPage = () => { const routesArr: Routes[] = [ ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/pages/api/hello.ts
starters/next-chakra-ui/src/pages/api/hello.ts
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction import type { NextApiRequest, NextApiResponse } from "next"; type Data = { name: string; }; export default function handler( req: NextApiRequest, res: NextApiResponse<Data> ) { res.status(200).json({ name: "This Dot Labs" }); }
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/components/index.ts
starters/next-chakra-ui/src/components/index.ts
export * from "./Counter";
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/components/counter/Counter.stories.tsx
starters/next-chakra-ui/src/components/counter/Counter.stories.tsx
import { SetStateAction } from "react"; import { Counter } from "./Counter"; export default { title: "Pages/Counter", component: Counter, }; export const CounterExamplePage = () => ( <Counter count={0} setCount={function (value: SetStateAction<number>): void { throw new Error("Function not impleme...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/components/counter/Counter.tsx
starters/next-chakra-ui/src/components/counter/Counter.tsx
import { Heading, Button, Text, Flex } from "@chakra-ui/react"; import { Dispatch, SetStateAction } from "react"; type CountStateParams = { count: number; setCount: Dispatch<SetStateAction<number>>; }; export const Counter = ({ count, setCount }: CountStateParams) => { const counterButtons: { text: string; ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/components/counter/index.ts
starters/next-chakra-ui/src/components/counter/index.ts
export { Counter } from "./Counter";
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/components/greeting/Greeting.stories.tsx
starters/next-chakra-ui/src/components/greeting/Greeting.stories.tsx
import FetchExample from "../../pages/fetch-example"; export default { title: "Pages/FetchComponent", component: FetchExample, }; export const FetchExamplePage = () => ( <FetchExample userStr="Hello from This Dot Labs" /> );
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/components/greeting/Greeting.tsx
starters/next-chakra-ui/src/components/greeting/Greeting.tsx
import { Text, Center } from "@chakra-ui/react"; type GreetingParams = { msg: string; }; export const Greeting = ({ msg }: GreetingParams) => { return ( <Center my={4}> <Text fontSize="xl">Message: {msg}</Text> </Center> ); };
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/src/components/greeting/index.ts
starters/next-chakra-ui/src/components/greeting/index.ts
export { Greeting } from "./Greeting";
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/__tests__/index.test.tsx
starters/next-chakra-ui/__tests__/index.test.tsx
import { render, screen } from "@testing-library/react"; import Home from "../src/pages/index"; import "@testing-library/jest-dom"; describe("Home", () => { it("renders a heading", () => { render(<Home />); const heading = screen.getByRole("heading", { name: "NextJS and Chakra UI Starter Kit", });...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/__tests__/Counter.test.tsx
starters/next-chakra-ui/__tests__/Counter.test.tsx
import { render, screen, fireEvent } from "@testing-library/react"; import CounterExample from "../src/pages/counter-example"; import "@testing-library/jest-dom"; type Params = { btnText: string; testValue1: string; testValue2: string; }; const handleCounter = ({ btnText, testValue1, testValue2 }: Params) => { ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-chakra-ui/__tests__/Greeting.test.tsx
starters/next-chakra-ui/__tests__/Greeting.test.tsx
import fetch from "jest-fetch-mock"; import { render, screen } from "@testing-library/react"; import FetchExample from "../src/pages/fetch-example"; import "@testing-library/jest-dom"; describe("Fetch Example page", () => { it("renders a heading", () => { render(<FetchExample />); const heading = screen.get...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/types.d.ts
starters/next-react-query-tailwind/types.d.ts
declare module '*module.css' { const styles: { [className: string]: string; }; export default styles; }
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/next-env.d.ts
starters/next-react-query-tailwind/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/.storybook/preview.ts
starters/next-react-query-tailwind/.storybook/preview.ts
import type { Preview } from '@storybook/react'; import { initialize, mswLoader } from 'msw-storybook-addon'; import '../src/styles/globals.css'; initialize(); const preview: Preview = { parameters: { actions: { argTypesRegex: '^on[A-Z].*' }, controls: { matchers: { color: /(background|color)$...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/.storybook/main.ts
starters/next-react-query-tailwind/.storybook/main.ts
import type { StorybookConfig } from '@storybook/nextjs'; import path from 'path'; const config: StorybookConfig = { stories: ['../src/pages/**/*.mdx', '../src/components/**/*.stories.@(js|jsx|ts|tsx)'], staticDirs: ['../public'], addons: [ '@storybook/addon-links', '@storybook/addon-essentials', '@s...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/pages/counter-example.tsx
starters/next-react-query-tailwind/src/pages/counter-example.tsx
import type { NextPage } from 'next'; import { Counter } from "src/components"; import { NavigationLink } from "src/components"; const CounterExample: NextPage = () => { return ( <div className="w-3/5 my-5 mx-auto text-center"> <h1 className="text-[2rem] font-bold border-b-4 border-blue-600 py-4 my-5"> ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/pages/_app.tsx
starters/next-react-query-tailwind/src/pages/_app.tsx
import '../styles/globals.css'; import type { AppProps } from 'next/app'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const queryClient = new QueryClient(); function MyApp({ Component, pageProps }: AppProps) { return ( <QueryClientProvider client={queryClient}> <Component {.....
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/pages/fetch-example.tsx
starters/next-react-query-tailwind/src/pages/fetch-example.tsx
import type { NextPage } from 'next'; import { NavigationLink } from 'src/components'; import { Greeting } from 'src/components/Greeting'; const FetchExample: NextPage = () => { return ( <div className="w-2/5 my-5 mx-auto text-center"> <h1 className="text-[2rem] font-bold border-b-4 border-blue-600 py-4 my...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/pages/index.tsx
starters/next-react-query-tailwind/src/pages/index.tsx
import type { NextPage } from 'next'; import Head from 'next/head'; import { Fragment } from 'react'; import { NavigationLink } from 'src/components'; const Home: NextPage = () => { return ( <Fragment> <Head> <title>next12-react-query-tailwind starter kit</title> <meta name="description" co...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/msw/mswServer.ts
starters/next-react-query-tailwind/src/msw/mswServer.ts
import { setupServer } from 'msw/node'; import { handlers } from './handlers'; export const server = setupServer(...handlers); export function setupMswServer() { beforeAll(() => server.listen()); afterEach(() => server.resetHandlers()); afterAll(() => server.close()); }
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/msw/handlers/helloMock.ts
starters/next-react-query-tailwind/src/msw/handlers/helloMock.ts
import { rest } from 'msw'; export const helloMock = rest.get( 'http://localhost:3000/api/hello', (_, res, ctx) => { return res( ctx.json({ message: 'Hello World!', }) ); } );
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/msw/handlers/index.ts
starters/next-react-query-tailwind/src/msw/handlers/index.ts
import { helloMock } from './helloMock'; export const handlers = [helloMock];
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/index.ts
starters/next-react-query-tailwind/src/components/index.ts
export * from './Counter'; export * from './NavigationLink';
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Counter/Counter.test.tsx
starters/next-react-query-tailwind/src/components/Counter/Counter.test.tsx
import { render, screen, fireEvent } from '@testing-library/react'; import { Counter } from './Counter'; describe('Counter', () => { it('should initially set 0', () => { render(<Counter />); const displayElement = screen.getByRole('display-element'); expect(displayElement).toHaveTextContent('Count: 0');...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Counter/Counter.stories.tsx
starters/next-react-query-tailwind/src/components/Counter/Counter.stories.tsx
import React from 'react'; import { Meta, StoryObj } from '@storybook/react'; import { Counter } from './Counter'; const meta: Meta = { title: 'Example/Counter', component: Counter, parameters: { layout: 'centered', }, }; export default meta; type Story = StoryObj; export const Default: Story = { ren...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Counter/Counter.tsx
starters/next-react-query-tailwind/src/components/Counter/Counter.tsx
import { useState } from 'react'; import styles from './Counter.module.css'; const DEFAULT_COUNT = 0; export function Counter() { const [count, setCount] = useState(DEFAULT_COUNT); return ( <div className="flex justify-evenly whitespace-nowrap"> <h2 className="text-2xl font-bold" role="display-element"...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Counter/index.ts
starters/next-react-query-tailwind/src/components/Counter/index.ts
export { Counter } from './Counter';
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Greeting/Greeting.view.tsx
starters/next-react-query-tailwind/src/components/Greeting/Greeting.view.tsx
import { Fragment } from 'react'; import cn from 'clsx'; type GreetingView = { message?: string | null; loading?: boolean; errorMessage?: string | null; }; export function GreetingView({ message, loading, errorMessage }: GreetingView) { return ( <div className="flex w-full text-xl justify-center"> {...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Greeting/Greeting.test.tsx
starters/next-react-query-tailwind/src/components/Greeting/Greeting.test.tsx
import { render, screen } from '@testing-library/react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { Greeting } from './Greeting.data'; import { setupServer, SetupServer } from 'msw/node'; import { rest } from 'msw'; import "whatwg-fetch"; const MOCK_MESSAGE_HELLO = 'Test Message...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Greeting/Greeting.data.tsx
starters/next-react-query-tailwind/src/components/Greeting/Greeting.data.tsx
import { useQuery } from '@tanstack/react-query'; import { GreetingView } from './Greeting.view'; export function Greeting() { const { data: message, isLoading, error, } = useQuery<string, Error>( ['hello'], async () => { const response = await fetch( 'https://api.starter.dev/.net...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Greeting/Greeting.stories.tsx
starters/next-react-query-tailwind/src/components/Greeting/Greeting.stories.tsx
import type { Meta, StoryObj } from '@storybook/react'; import { createQueryProvider } from '../../utils/mockQueryClient'; import { helloMock } from '../../msw/handlers/helloMock'; import { Greeting } from './Greeting.data'; const meta: Meta = { title: 'Example/Greeting', component: Greeting, parameters: { m...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/Greeting/index.ts
starters/next-react-query-tailwind/src/components/Greeting/index.ts
export { Greeting } from './Greeting.data';
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/NavigationLink/NavigationLink.tsx
starters/next-react-query-tailwind/src/components/NavigationLink/NavigationLink.tsx
import Link from 'next/link'; type NavigationLinkProps = { to: string; label: string; }; export const NavigationLink = ({ to, label }: NavigationLinkProps) => { return ( <Link className="underline text-blue-600 hover:text-blue-800 text-xl" role="link" href={to} > {label} </Li...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/NavigationLink/NavigationLink.test.tsx
starters/next-react-query-tailwind/src/components/NavigationLink/NavigationLink.test.tsx
import { render, screen } from '@testing-library/react'; import { NavigationLink } from './NavigationLink'; describe('NavigationLink', () => { it('should have a valid label', () => { render(<NavigationLink to="/" label="Return Home" />); expect(screen.getByText('Return Home')).toBeTruthy(); }); });
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/NavigationLink/NavigationLink.stories.tsx
starters/next-react-query-tailwind/src/components/NavigationLink/NavigationLink.stories.tsx
import React from 'react'; import { Meta, StoryObj } from '@storybook/react'; import { NavigationLink } from './NavigationLink'; const args = { to: '/', label: 'Home', } const meta: Meta = { title: 'Example/NavigationLink', component: NavigationLink, parameters: { layout: 'centered', }, args, }; ex...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/components/NavigationLink/index.ts
starters/next-react-query-tailwind/src/components/NavigationLink/index.ts
export { NavigationLink } from './NavigationLink';
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/utils/mockQueryClient.tsx
starters/next-react-query-tailwind/src/utils/mockQueryClient.tsx
/* eslint-disable react/display-name */ import type { ReactElement } from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const createQueryClient = () => new QueryClient({ defaultOptions: { queries: { retry: false, }, }, }); export const createQueryPr...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/next-react-query-tailwind/src/utils/mockRouter.tsx
starters/next-react-query-tailwind/src/utils/mockRouter.tsx
/* eslint-disable react/display-name */ import type { ReactElement } from 'react'; import type { NextRouter } from 'next/router'; import { RouterContext } from 'next/dist/shared/lib/router-context'; const createMockRouter = (router: Partial<NextRouter> = {}) => { const mockRouter: NextRouter = { basePath: '', ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/middleware.ts
starters/shopify-next-tailwind/middleware.ts
import { NextRequest, NextResponse } from 'next/server'; import isAuthenticated from './lib/isAuthenticated'; export const config = { matcher: ['/checkout', '/account', '/account/:path*'], }; export function middleware(request: NextRequest) { const isLoginPage = request.nextUrl.pathname === '/account/login'; const...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/.storybook/preview.ts
starters/shopify-next-tailwind/.storybook/preview.ts
import type { Preview } from '@storybook/react'; import '../app/globals.css'; import '../app/custom-font.css'; const preview: Preview = { parameters: { nextjs: { appDirectory: true, }, actions: { argTypesRegex: '^on[A-Z].*' }, controls: { matchers: { color: /(background|color)$/i, date: /Date$/,...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/.storybook/main.ts
starters/shopify-next-tailwind/.storybook/main.ts
import type { StorybookConfig } from '@storybook/nextjs'; const config: StorybookConfig = { stories: ['../components/**/*.stories.@(js|jsx|ts|tsx)'], addons: [ '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions', { name: '@storybook/addon-styling', options: { //...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/layout.tsx
starters/shopify-next-tailwind/app/layout.tsx
import './globals.css'; import './custom-font.css'; import { Inter } from 'next/font/google'; import { getLayoutData } from '@/lib/shopify'; import Footer from './compoents/Footer'; import Header from './compoents/Header'; import { cookies } from 'next/headers'; import { Metadata } from 'next'; import ShopifyAnalytics...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/error.tsx
starters/shopify-next-tailwind/app/error.tsx
'use client'; import { Button } from '@/components/Button'; import { FeaturedSection } from '@/components/FeaturedSection'; import { PageHeader, Text } from '@/components/Text'; import { Collection, Product, ShopifyFeaturedCollectionOperation, ShopifyFeaturedProductOperation, } from '@/lib/shopify/types'; import {...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/page.tsx
starters/shopify-next-tailwind/app/page.tsx
import { Hero } from '../components/Hero'; import { ProductSwimlane } from '@/components/ProductSwimlane'; import { FeaturedCollections } from '@/components/FeaturedCollection'; import { getFeaturedCollections, getFeaturedProducts, getHomepageSeo, getSecondaryHero, getTertiaryHero, } from '@/lib/shopify'; import H...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/not-found.tsx
starters/shopify-next-tailwind/app/not-found.tsx
import { Button } from '@/components/Button'; import { FeaturedSection } from '@/components/FeaturedSection'; import { PageHeader, Text } from '@/components/Text'; import { getFeaturedProducts, getFeaturedCollections } from '@/lib/shopify'; export default async function NotFound() { const featuredProductsResponse = a...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/policies/page.tsx
starters/shopify-next-tailwind/app/policies/page.tsx
import { Link } from '@/components/Link'; import { PageHeader, Section, Heading } from '@/components/Text'; import { getPolicies } from '@/lib/shopify'; export default async function Policies() { const data = await getPolicies(); const policies = Object.values(data.body.data.shop || {}); return ( <> <PageHead...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/policies/[policyHandle]/page.tsx
starters/shopify-next-tailwind/app/policies/[policyHandle]/page.tsx
import { Button } from '@/components/Button'; import { Section, PageHeader } from '@/components/Text'; import { getPolicyContent } from '@/lib/shopify'; export default async function Policy({ params, }: { params: { policyHandle: string }; }) { const handle = params.policyHandle; const policyName = handle.replace(...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/page.tsx
starters/shopify-next-tailwind/app/account/page.tsx
import React from 'react'; import { FeaturedSection } from '@/components/FeaturedSection'; import { getFeaturedProducts, getFeaturedCollections, getCustomer, } from '@/lib/shopify'; import SignOutSection from './component/SignOutSection'; import OrderHistory from './component/OrderHistory'; import AccountDetails fro...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/recover/page.tsx
starters/shopify-next-tailwind/app/account/recover/page.tsx
import { getInputStyleClasses } from '@/lib/utils'; import FormHeader from '../component/FormHeader'; import FormFooter from '../component/FormFooter'; import FormButton from '../component/FormButton'; import { revalidatePath } from 'next/cache'; import { recoverCustomersPassword } from '@/lib/shopify'; import AuthLayo...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/login/page.tsx
starters/shopify-next-tailwind/app/account/login/page.tsx
import { getInputStyleClasses } from '@/lib/utils'; import { redirect } from 'next/navigation'; import FormHeader from '../component/FormHeader'; import FormFooter from '../component/FormFooter'; import FormButton from '../component/FormButton'; import { loginCustomer } from '@/lib/shopify'; import { revalidatePath } f...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/reset/[id]/[resetToken]/page.tsx
starters/shopify-next-tailwind/app/account/reset/[id]/[resetToken]/page.tsx
import AuthLayout from '@/app/account/component/AuthLayout'; import FormButton from '@/app/account/component/FormButton'; import FormHeader from '@/app/account/component/FormHeader'; import { resetCustomersPassword } from '@/lib/shopify'; import { getInputStyleClasses } from '@/lib/utils'; import { revalidatePath } fro...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/orders/[id]/page.tsx
starters/shopify-next-tailwind/app/account/orders/[id]/page.tsx
import { Link } from '@/components/Link'; import { Money } from '@/components/MoneyComponent'; import { PageHeader, Heading, Text } from '@/components/Text'; import { flattenConnection } from '@/lib/flattenConnection'; import { getCustomerOrder } from '@/lib/shopify'; import { OrderLineItem } from '@/lib/shopify/types'...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/component/AccountBook.tsx
starters/shopify-next-tailwind/app/account/component/AccountBook.tsx
import AddressCard from '@/components/AddressCard'; import { Text } from '@/components/Text'; import { Customer, MailingAddress } from '@/lib/shopify/types'; import { convertObjectToQueryString } from '@/lib/utils'; export default function AccountBook({ customer, addresses, }: { customer: Customer; addresses: Mail...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/component/SignOutSection.tsx
starters/shopify-next-tailwind/app/account/component/SignOutSection.tsx
import { cookies } from 'next/headers'; import { redirect } from 'next/navigation'; export default function SignOutSection() { const signOut = async () => { 'use server'; cookies().set({ name: 'customerAccessToken', value: '', httpOnly: true, path: '/', expires: new Date(Date.now()), }); redire...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/component/OrderHistory.tsx
starters/shopify-next-tailwind/app/account/component/OrderHistory.tsx
import EmptyOrders from '@/components/EmptyOrder'; import Orders from '@/components/Orders'; import { Order } from '@/lib/shopify/types'; export default function OrderHistory({ orders }: { orders: Order[] }) { return ( <div className="mt-6"> <div className="grid w-full gap-4 p-4 py-6 md:gap-8 md:p-8 lg:p-12"> ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/component/FormButton.tsx
starters/shopify-next-tailwind/app/account/component/FormButton.tsx
'use client'; import cn from 'clsx'; import { experimental_useFormStatus as useFormStatus } from 'react-dom'; export default function FormButton({ btnText, state = 'Loading...', variant = 'primary', }: { btnText: string; state?: string; variant?: 'primary' | 'outline'; }) { const status = useFormStatus(); cons...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/component/FormFooter.tsx
starters/shopify-next-tailwind/app/account/component/FormFooter.tsx
import Link from 'next/link'; interface IFormFooter { page: 'login' | 'register' | 'recover'; } export default function FormFooter({ page }: IFormFooter) { const data = { login: { linkText: 'Create an account', phrase: 'New to Hydrogen?', href: '/account/register', }, register: { linkText: 'Sign I...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/component/AuthLayout.tsx
starters/shopify-next-tailwind/app/account/component/AuthLayout.tsx
export default function AuthLayout({ children, }: { children: React.ReactNode; }) { return ( <div className="flex justify-center my-24 px-4"> <div className="max-w-md w-full">{children}</div> </div> ); }
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/component/FormHeader.tsx
starters/shopify-next-tailwind/app/account/component/FormHeader.tsx
export default function FormHeader({ title }: { title: string }) { return <h1 className="text-4xl">{title}</h1>; }
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/account/register/page.tsx
starters/shopify-next-tailwind/app/account/register/page.tsx
import { getInputStyleClasses } from '@/lib/utils'; import { revalidatePath } from 'next/cache'; import { createCustomer, loginCustomer } from '@/lib/shopify'; import { redirect } from 'next/navigation'; import { cookies } from 'next/headers'; import FormButton from '../component/FormButton'; import FormFooter from '.....
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/journal/page.tsx
starters/shopify-next-tailwind/app/journal/page.tsx
import ArticleCard from '@/components/ArticleCard'; import { Grid } from '@/components/Grid'; import { PageHeader, Section } from '@/components/Text'; import { BLOG_HANDLE, PAGE_BY } from '@/lib/const'; import { getAllPosts } from '@/lib/shopify'; import LoadMorePosts from './components/LoadMorePosts'; export default ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/journal/[journalHandle]/page.tsx
starters/shopify-next-tailwind/app/journal/[journalHandle]/page.tsx
import { PageHeader, Section } from '@/components/Text'; import { BLOG_HANDLE } from '@/lib/const'; import { getArticleByHandle } from '@/lib/shopify'; import Image from 'next/image'; import sanitizeHtml from 'sanitize-html'; export default async function JournalHandlePage({ params, }: { params: { journalHandle: str...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/journal/components/LoadMorePosts.tsx
starters/shopify-next-tailwind/app/journal/components/LoadMorePosts.tsx
'use client'; import ArticleCard from '@/components/ArticleCard'; import { Button } from '@/components/Button'; import { Grid } from '@/components/Grid'; import { BLOG_HANDLE } from '@/lib/const'; import { ArticleEdge } from '@/lib/shopify/types'; import { useEffect, useState } from 'react'; import { useInView } from '...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/error/route.ts
starters/shopify-next-tailwind/app/api/error/route.ts
import { getFeaturedProducts, getFeaturedCollections } from '@/lib/shopify'; import { NextResponse } from 'next/server'; export async function GET() { const featuredProductsResponse = await getFeaturedProducts(); const featuredCollectionsResponse = await getFeaturedCollections(); return NextResponse.json({ featu...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/posts/route.ts
starters/shopify-next-tailwind/app/api/posts/route.ts
import { BLOG_HANDLE, PAGE_BY } from '@/lib/const'; import { getAllPosts } from '@/lib/shopify'; import { NextRequest, NextResponse } from 'next/server'; export async function GET(request: NextRequest) { const params = new URL(request.url).searchParams; const data = await getAllPosts({ variables: { blogHandle:...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/collectionProducts/route.ts
starters/shopify-next-tailwind/app/api/collectionProducts/route.ts
import { FiltersQueryParams } from '@/app/collections/[collectionHandle]/page'; import { PAGE_BY } from '@/lib/const'; import { getCollectionProducts } from '@/lib/shopify'; import { NextRequest, NextResponse } from 'next/server'; export async function GET(request: NextRequest) { const params = new URL(request.url).s...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/products/route.ts
starters/shopify-next-tailwind/app/api/products/route.ts
import { PAGE_BY } from '@/lib/const'; import { getAllProducts } from '@/lib/shopify'; import { NextRequest, NextResponse } from 'next/server'; export async function GET(request: NextRequest) { const params = new URL(request.url).searchParams; const data = await getAllProducts({ variables: { first: PAGE_BY, ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/products/cart/route.ts
starters/shopify-next-tailwind/app/api/products/cart/route.ts
import { getFilteredAndSortedProducts } from '@/lib/shopify'; import { NextResponse } from 'next/server'; export async function GET() { const data = await getFilteredAndSortedProducts({ variables: { query: '', reverse: false, sortKey: 'BEST_SELLING', count: 4, }, }); return NextResponse.json({ pr...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/collections/route.ts
starters/shopify-next-tailwind/app/api/collections/route.ts
import { PAGE_BY } from '@/lib/const'; import { getAllCollections } from '@/lib/shopify'; import { NextRequest, NextResponse } from 'next/server'; export async function GET(request: NextRequest) { const params = new URL(request.url).searchParams; const data = await getAllCollections({ variables: { first: PAGE_...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/cart/route.ts
starters/shopify-next-tailwind/app/api/cart/route.ts
import { addToCart, updateCart } from '@/lib/shopify'; import { isShopifyError } from '@/lib/type-guards'; import { formatErrorMessage } from '@/lib/utils'; import { cookies } from 'next/headers'; import { NextRequest, NextResponse } from 'next/server'; export async function POST(req: NextRequest): Promise<Response> {...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/cart/delete/route.ts
starters/shopify-next-tailwind/app/api/cart/delete/route.ts
import { removeFromCart } from '@/lib/shopify'; import { isShopifyError } from '@/lib/type-guards'; import { formatErrorMessage } from '@/lib/utils'; import { cookies } from 'next/headers'; import { NextRequest, NextResponse } from 'next/server'; export async function POST(req: NextRequest): Promise<any> { const cart...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/cart/create/route.ts
starters/shopify-next-tailwind/app/api/cart/create/route.ts
import { createCart, getCart } from '@/lib/shopify'; import { Cart } from '@/lib/shopify/types'; import { isShopifyError } from '@/lib/type-guards'; import { formatErrorMessage } from '@/lib/utils'; import { NextRequest, NextResponse } from 'next/server'; export async function POST(req: NextRequest): Promise<Response>...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/cart/discount/route.ts
starters/shopify-next-tailwind/app/api/cart/discount/route.ts
import { isShopifyError } from '@/lib/type-guards'; import { cookies } from 'next/headers'; import { NextRequest, NextResponse } from 'next/server'; import { applyDiscountToCart } from '@/lib/shopify'; import { formatErrorMessage } from '@/lib/utils'; export async function PUT(req: NextRequest): Promise<Response> { c...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/api/search/route.ts
starters/shopify-next-tailwind/app/api/search/route.ts
import { PAGE_BY } from '@/lib/const'; import { getFeaturedCollections, getFeaturedProducts, getSearchedProducts, } from '@/lib/shopify'; import { NextRequest, NextResponse } from 'next/server'; export async function POST(request: NextRequest) { const params = new URL(request.url).searchParams; const data = awai...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/products/page.tsx
starters/shopify-next-tailwind/app/products/page.tsx
import { Grid } from '@/components/Grid'; import { ProductCard } from '@/components/ProductCard'; import { PageHeader, Section } from '@/components/Text'; import { getAllProducts } from '@/lib/shopify'; import LoadMoreProducts from './components/LoadMoreProducts'; import { PAGE_BY } from '@/lib/const'; export default ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/products/[productHandle]/page.tsx
starters/shopify-next-tailwind/app/products/[productHandle]/page.tsx
import ProductGallery from '@/components/ProductGallery'; import { ProductSwimlane } from '@/components/ProductSwimlane'; import { Heading, Section, Text } from '@/components/Text'; import { getProduct, getProductRecommendations } from '@/lib/shopify'; import ProductDetail from '../components/ProductDetails'; import { ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false
thisdot/starter.dev
https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/shopify-next-tailwind/app/products/[productHandle]/components/ProductForm.tsx
starters/shopify-next-tailwind/app/products/[productHandle]/components/ProductForm.tsx
import { AddToCartButton } from '@/components/AddToCartButton'; import { Button } from '@/components/Button'; import { Money } from '@/components/MoneyComponent'; import ShopPayButton from '@/components/ShopPayButton'; import { Product, ProductOption, ProductVariant } from '@/lib/shopify/types'; import { Heading, Text ...
typescript
MIT
593639aa39999fcb7e8f4cab65c6f768fd4a3a09
2026-01-05T04:59:58.752174Z
false