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/solidstart-tanstackquery-tailwind-modules/src/root.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/root.tsx | // @refresh reload
import { Suspense } from 'solid-js';
import {
Body,
ErrorBoundary,
FileRoutes,
Head,
Html,
Meta,
Routes,
Scripts,
Title,
} from 'solid-start';
import './root.css';
import { QueryClient, QueryClientProvider } from '@tanstack/solid-query';
export default function Root() {
const qu... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/entry-client.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/entry-client.tsx | import { mount, StartClient } from 'solid-start/entry-client';
mount(() => <StartClient />, document);
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/mock/serverSetup.ts | starters/solidstart-tanstackquery-tailwind-modules/src/mock/serverSetup.ts | import { setupServer } from 'msw/node';
import greetingHandler from './greetingHandler';
const server = setupServer(greetingHandler);
export { server };
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/mock/greetingHandler.ts | starters/solidstart-tanstackquery-tailwind-modules/src/mock/greetingHandler.ts | import { rest } from 'msw';
const greetingHandler = rest.get(
'https://api.starter.dev/.netlify/functions/server/hello',
(_, res, ctx) => {
return res(ctx.status(200), ctx.text('Hi Learners'));
}
);
export default greetingHandler;
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/routes/index.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/routes/index.tsx | import { A } from 'solid-start';
export default function Home() {
return (
<>
<header class="flex justify-center items-center text-white my-5 mx-auto bg-blue-500 w-full lg:w-[75%] p-4 text-lg ">
SolidStart - Tanstack Query - Tailwind CSS - CSS Modules Kit
</header>
<div class="flex fle... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/routes/[...404].tsx | starters/solidstart-tanstackquery-tailwind-modules/src/routes/[...404].tsx | import { A } from 'solid-start';
export default function NotFound() {
return (
<main class="text-center mx-auto text-gray-700 p-4">
<h1 class="max-6-xs text-6xl text-sky-700 font-thin uppercase my-16">
Not Found
</h1>
<p class="mt-8">
Visit{' '}
<a
href="https:... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/routes/api-example.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/routes/api-example.tsx | import { Greeting } from '~/components/FetchExample';
import PageHeader from '~/components/PageHeader';
import PageFooter from '~/components/PageFooter';
export default function ApiExample() {
return (
<>
<PageHeader>SolidStart Tanstack Query Fetch Data from API</PageHeader>
<Greeting />
<PageF... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/routes/counter.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/routes/counter.tsx | import CounterExample from '~/components/CounterExample/Counter';
import PageFooter from '~/components/PageFooter';
import PageHeader from '~/components/PageHeader';
export default function Counter() {
return (
<>
<PageHeader>Increment, Decrement and Reset Button Example</PageHeader>
<CounterExample ... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/PageHeader.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/PageHeader.tsx | const PageHeader = (props: { children: string }) => (
<h1 class="w-full lg:w-[50%] border-b-4 border-b-blue-500 text-center text-[1.5rem] my-8 mx-auto pb-3">
{props.children}
</h1>
);
export default PageHeader;
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/PageFooter.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/PageFooter.tsx | import { A } from 'solid-start';
const PageFooter = () => {
return (
<footer class="mt-8 flex justify-center">
<A
href="/"
class="transition-colors delay-100 underline text-blue-600 text-lg mt-8"
>
Return Home
</A>
</footer>
);
};
export default PageFooter;
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/Greeting.spec.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/Greeting.spec.tsx | import { render } from '@solidjs/testing-library';
import {
describe,
expect,
it,
beforeAll,
afterAll,
afterEach,
beforeEach,
} from 'vitest';
import 'whatwg-fetch';
import { server } from '../../mock/serverSetup';
import { Greeting } from '.';
import { Router } from '@solidjs/router';
import { QueryClien... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/Greeting.stories.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/Greeting.stories.tsx | import { Router } from '@solidjs/router';
import { Greeting } from '.';
import { QueryClient, QueryClientProvider } from '@tanstack/solid-query';
import greetingHandler from '../../mock/greetingHandler';
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnMount: true,
staleTim... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/Greeting.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/Greeting.tsx | import { useLocation } from '@solidjs/router';
import greetingFetcher from './greetingFetcher';
import { createEffect, createSignal, Match, Switch } from 'solid-js';
import { createQuery } from '@tanstack/solid-query';
const Greeting = () => {
const [message, setMessage] = createSignal<string>('');
const location ... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/greetingFetcher.ts | starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/greetingFetcher.ts | const greetingFetcher = async (message: string) => {
const encodedMessage = encodeURIComponent(message);
const endpoint = `https://api.starter.dev/.netlify/functions/server/hello?greeting=${encodedMessage}`;
return await fetch(endpoint).then((result) => result.text());
};
export default greetingFetcher;
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/index.ts | starters/solidstart-tanstackquery-tailwind-modules/src/components/FetchExample/index.ts | export { default as 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/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/Counter.spec.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/Counter.spec.tsx | import { describe, expect, it } from 'vitest';
import { fireEvent, render, screen } from '@solidjs/testing-library';
import CounterExample from './Counter';
describe('CounterExample', () => {
it('should mount', async () => {
const wrapper = await render(() => <CounterExample />);
expect(wrapper).toBeTruthy()... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/Counter.stories.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/Counter.stories.tsx | import Counter from './Counter';
export default {
title: 'Component/Counter',
};
const Template = () => <Counter />;
export const Default = Template.bind({});
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/CounterStore.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/CounterStore.tsx | import { createSignal } from 'solid-js';
import { CounterData } from './types';
const [count, setCount] = createSignal<number>(0);
const increase = () => setCount(count() + 1);
const decrease = () => setCount(count() - 1);
const reset = () => setCount(0);
const counterData: CounterData = {
count: count,
actionBu... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/types.ts | starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/types.ts | import { Accessor } from 'solid-js';
export type ActionButtonsData = {
label: string;
action: () => void;
};
export type CounterData = {
count: Accessor<number>;
actionButtons: ActionButtonsData[];
};
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/Counter.tsx | starters/solidstart-tanstackquery-tailwind-modules/src/components/CounterExample/Counter.tsx | import { For } from 'solid-js';
import { counterData } from './CounterStore';
import { ActionButtonsData } from './types';
export default function CounterExample() {
return (
<div class="flex flex-wrap lg:flex-nowrap justify-center gap-14 items-center">
<strong data-testId={'counter'} class="text-xl">
... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/App.tsx | starters/cra-rxjs-styled-components/src/App.tsx | import { Routes, Route } from 'react-router-dom';
import { Homepage } from '@/components/Homepage';
import { Counter } from '@/components/Counter';
import { FetchExample } from '@/components/FetchExample';
export default function App() {
return (
<Routes>
<Route path="/" element={<Homepage />} />
<Ro... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/reportWebVitals.ts | starters/cra-rxjs-styled-components/src/reportWebVitals.ts | import { ReportHandler } from 'web-vitals';
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry)... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/setupTests.ts | starters/cra-rxjs-styled-components/src/setupTests.ts | // jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/index.tsx | starters/cra-rxjs-styled-components/src/index.tsx | import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import './index.css';
import reportWebVitals from './reportWebVitals';
import App from './App';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<Re... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/react-app-env.d.ts | starters/cra-rxjs-styled-components/src/react-app-env.d.ts | /// <reference types="react-scripts" />
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Counter/Counter.test.tsx | starters/cra-rxjs-styled-components/src/components/Counter/Counter.test.tsx | import { render, screen, fireEvent } from '@testing-library/react';
import { Counter } from './Counter';
import { MemoryRouter } from 'react-router-dom';
describe('Increment Counter', () => {
it('should increase by 1 when clicking button', () => {
render(<Counter />, { wrapper: MemoryRouter });
const curren... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Counter/Counter.stories.tsx | starters/cra-rxjs-styled-components/src/components/Counter/Counter.stories.tsx | import { ComponentMeta } from '@storybook/react';
import { Counter } from './Counter';
export default {
title: 'Example/Counter',
component: Counter,
} as ComponentMeta<typeof Counter>;
const Template = () => <Counter />;
export const IncrementButton = Template.bind({});
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Counter/Counter.tsx | starters/cra-rxjs-styled-components/src/components/Counter/Counter.tsx | import { useState } from 'react';
import {
CounterContainer,
CounterButton,
Header,
CounterButtonContainer,
CurrentCountText,
ReturnHomeLink,
HomeLinkDiv,
} from './Counter.styles';
export function Counter() {
const [count, setCount] = useState(0);
return (
<CounterContainer>
<Header>Incre... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Counter/index.ts | starters/cra-rxjs-styled-components/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/cra-rxjs-styled-components/src/components/Counter/Counter.styles.tsx | starters/cra-rxjs-styled-components/src/components/Counter/Counter.styles.tsx | import styled from 'styled-components';
import { Link } from 'react-router-dom';
export const CounterContainer = styled.div`
width: 60%;
margin: 10px auto;
`;
export const Header = styled.h1`
padding: 15px 0;
font-size: 2rem;
text-align: center;
border-bottom: 5px solid rgb(29 78 216);
`;
export const Co... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Homepage/Homepage.test.tsx | starters/cra-rxjs-styled-components/src/components/Homepage/Homepage.test.tsx | import { render, screen } from '@testing-library/react';
import { Homepage } from './Homepage';
import { MemoryRouter } from 'react-router-dom';
test('renders header text on the page', () => {
render(<Homepage />, { wrapper: MemoryRouter });
const header = screen.getByText(
'Create React App, RxJS and styled-c... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Homepage/Homepage.stories.tsx | starters/cra-rxjs-styled-components/src/components/Homepage/Homepage.stories.tsx | import { ComponentMeta } from '@storybook/react';
import { Homepage } from './Homepage';
export default {
title: 'Example/Homepage',
component: Homepage,
} as ComponentMeta<typeof Homepage>;
const Template = () => <Homepage />;
export const Header = Template.bind({});
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Homepage/Homepage.styles.tsx | starters/cra-rxjs-styled-components/src/components/Homepage/Homepage.styles.tsx | import styled from 'styled-components';
import { Link } from 'react-router-dom';
export const HeaderContainer = styled.header`
margin: 20px auto;
width: 60%;
`;
export const Header = styled.h1`
color: #fff;
padding: 1rem;
font-size: 1.5rem;
font-weight: 600;
border: none;
text-align: center;
border-... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Homepage/index.tsx | starters/cra-rxjs-styled-components/src/components/Homepage/index.tsx | export { Homepage } from './Homepage';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/Homepage/Homepage.tsx | starters/cra-rxjs-styled-components/src/components/Homepage/Homepage.tsx | import {
HeaderContainer,
Header,
ExampleLink,
ButtonLinkDiv,
} from './Homepage.styles';
export function Homepage() {
return (
<HeaderContainer>
<Header>Create React App, RxJS and styled-components Starter kit</Header>
<ButtonLinkDiv>
<ExampleLink to="/button-example">
See B... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/FetchExample/FetchExample.tsx | starters/cra-rxjs-styled-components/src/components/FetchExample/FetchExample.tsx | import {
FetchExampleContainer,
HeaderContainer,
Header,
HomeLinkDiv,
ReturnHomeLink,
Message,
Loader,
} from './FetchExample.styles';
import { useState, useEffect } from 'react';
import { fromFetch } from 'rxjs/fetch';
export const FetchExample = () => {
const [message, setMessage] = useState<string>(... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/FetchExample/FetchExample.test.tsx | starters/cra-rxjs-styled-components/src/components/FetchExample/FetchExample.test.tsx | import fetch from 'jest-fetch-mock';
beforeEach(() => {
fetch.resetMocks();
});
test('returns a string result', () => {
fetch.mockResponseOnce('Hello, from This Dot Labs!');
const onResponse = jest.fn();
const onError = jest.fn();
return fetch(
'https://api.starter.dev/.netlify/functions/server/hello?g... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/FetchExample/FetchExample.styles.tsx | starters/cra-rxjs-styled-components/src/components/FetchExample/FetchExample.styles.tsx | import styled from 'styled-components';
import { Link } from 'react-router-dom';
export const FetchExampleContainer = styled.div`
text-align: center;
`;
export const HeaderContainer = styled.header`
margin: 20px auto;
width: 40%;
`;
export const Header = styled.h1`
padding: 15px 0;
font-size: 2rem;
text-... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/FetchExample/index.ts | starters/cra-rxjs-styled-components/src/components/FetchExample/index.ts | export { FetchExample } from './FetchExample';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/cra-rxjs-styled-components/src/components/FetchExample/FetchExample.stories.tsx | starters/cra-rxjs-styled-components/src/components/FetchExample/FetchExample.stories.tsx | import { ComponentMeta, Story } from '@storybook/react';
import { rest } from 'msw';
import { FetchExample } from './FetchExample';
export default {
title: 'Example/Fetch Example',
component: FetchExample,
} as ComponentMeta<typeof FetchExample>;
const Template: Story = () => <FetchExample />;
export const Loadi... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/jest.config.ts | starters/serverless-framework-apollo-contentful/jest.config.ts | import { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts'],
coverageReporters: ['html', 'json', 'lcov', 'text', 'clover'],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/codegen.ts | starters/serverless-framework-apollo-contentful/codegen.ts | import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
overwrite: true,
schema: './src/schema/index.ts',
generates: {
'src/generated/graphql.ts': {
plugins: ['typescript', 'typescript-resolvers'],
config: { contextType: '../handlers/graphql#MyContext' },
},
'./graphql... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/scripts/seed.ts | starters/serverless-framework-apollo-contentful/scripts/seed.ts | import { create } from '../src/models/Technology';
import * as dotenv from 'dotenv';
// load dotenv config
dotenv.config();
// Add some dummy data to the database
(async () => {
console.log('Seeding database...');
await create({
displayName: 'GraphQL',
description:
'GraphQL provides a strong-typing system t... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/getById.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/getById.ts | import { getEnvironment } from '../../utils/contentful';
import TechnologyModel from './TechnologyModel';
export default async function getById(id: string) {
const environment = await getEnvironment();
const entry = await environment.getEntry(id);
return new TechnologyModel(entry);
}
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/TechnologyModel.spec.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/TechnologyModel.spec.ts | import TechnologyModel from './TechnologyModel';
import { Entry } from 'contentful-management';
jest.mock('../../utils/contentful');
describe('TechnologyModel', () => {
const entry = {
publish: jest.fn(),
update: jest.fn(),
isDraft: () => false,
fields: {
displayName: { 'en-US': 'OLD_NAME' },
descripti... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/getById.spec.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/getById.spec.ts | import { getEnvironment } from '../../utils/contentful';
import { Environment } from 'contentful-management';
import getById from './getById';
import MockedFn = jest.MockedFn;
jest.mock('../../utils/contentful');
describe('get', () => {
describe('when there is a technology with id MOCK', () => {
const getEntry = j... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/TechnologyModel.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/TechnologyModel.ts | import { Entry } from 'contentful-management';
const fieldNames = ['url', 'description', 'displayName'] as const;
type FieldName = (typeof fieldNames)[number];
export type TechnologyFields = { [field in FieldName]?: string | null };
export default class TechnologyModel {
public get id() {
return this.entry.sys.id;... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/create.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/create.ts | import { getEnvironment } from '../../utils/contentful';
import TechnologyModel, { TechnologyFields } from './TechnologyModel';
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
export default async function create(data: WithRequired<TechnologyFields, 'displayName'>) {
const environment = await get... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/create.spec.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/create.spec.ts | import create from './create';
import { Environment } from 'contentful-management';
import { getEnvironment } from '../../utils/contentful';
import TechnologyModel from './TechnologyModel';
import MockedFn = jest.MockedFn;
jest.mock('../../utils/contentful');
describe('create', () => {
describe('when passed valid te... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/getAll.spec.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/getAll.spec.ts | import { getEnvironment } from '../../utils/contentful';
import { Environment } from 'contentful-management';
import getAll from './getAll';
import MockedFn = jest.MockedFn;
jest.mock('../../utils/contentful');
describe('getAll', () => {
describe('when there are 2 mocked technologies', () => {
beforeAll(() => {
... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/index.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/index.ts | export { default } from './TechnologyModel';
export { default as create } from './create';
export { default as getById } from './getById';
export { default as getAll } from './getAll';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/models/Technology/getAll.ts | starters/serverless-framework-apollo-contentful/src/models/Technology/getAll.ts | import { getEnvironment } from '../../utils/contentful';
import TechnologyModel from './TechnologyModel';
export default async function getAll(limit?: number | null, skip?: number | null) {
try {
const environment = await getEnvironment();
const entries = await environment.getEntries({
content_type: 'technolog... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/getQueueUrl.spec.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/getQueueUrl.spec.ts | import { getClient } from './client';
import { GetQueueUrlCommand } from '@aws-sdk/client-sqs';
import { getQueueUrl } from './getQueueUrl';
const MOCK_JOB_QUEUE = 'MOCK_JOB_QUEUE';
const MOCK_QUEUE_URL = 'MOCK_QUEUE_URL';
const MOCK_ERROR_MESSAGE = 'MOCK_ERROR_MESSAGE';
const MOCK_GET_CLIENT = getClient as jest.Mock... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/client.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/client.ts | import { SQSClient, SQSClientConfig } from '@aws-sdk/client-sqs';
import { isOffline } from './is-offline';
export const getClient = (): SQSClient => {
let cachedClient: SQSClient | null = null;
const SQS_PORT = process.env.SQS_PORT || 9324;
if (cachedClient) {
return cachedClient;
}
const config: SQSClientCo... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/is-offline.spec.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/is-offline.spec.ts | import { isOffline } from './is-offline';
describe('.isOffline', () => {
describe('when called', () => {
describe('and IS_OFFLINE enviroment variable value', () => {
const CASES: [string, string | undefined, boolean][] = [
['true', 'true', true],
['false', 'false', false],
['not set', undefined, fals... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/sendMessage.spec.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/sendMessage.spec.ts | import { SendMessageCommand, SendMessageCommandOutput } from '@aws-sdk/client-sqs';
import { ResponseMetadata } from '@aws-sdk/types/dist-types';
import { Message, sendMessage, SendMessageResult } from './sendMessage';
import { getClient } from './client';
import { getQueueUrl } from './getQueueUrl';
const MOCK_GET_CL... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/is-offline.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/is-offline.ts | /**
* Utility function for checking where functions are being run locally via serverless offline
* or if they're running on infrastructure. Helpful for detecting which connection string to use.
*
* @returns boolean are we running locally or on infra?
*/
export const isOffline = (): boolean => process.env.IS_OFFLIN... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/getQueueUrl.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/getQueueUrl.ts | import { GetQueueUrlCommand } from '@aws-sdk/client-sqs';
import { getClient } from './client';
export const getQueueUrl = async (): Promise<string | undefined> => {
const queueName = process.env.JOB_QUEUE;
if (!queueName) {
throw new Error('Unable to find queue.');
}
const command = new GetQueueUrlCommand({
... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/sendMessage.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/sendMessage.ts | import { SendMessageCommand, SendMessageCommandOutput } from '@aws-sdk/client-sqs';
import { getClient } from './client';
import { getQueueUrl } from './getQueueUrl';
export type Message = {
[key: string]: string | number | boolean | null;
};
export type SendMessageResult = {
success: boolean;
data: SendMessageCom... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/index.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/index.ts | export { sendMessage } from './sendMessage';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/sqs/client.spec.ts | starters/serverless-framework-apollo-contentful/src/utils/sqs/client.spec.ts | import { SQSClient, SQSClientConfig } from '@aws-sdk/client-sqs';
import { isOffline } from './is-offline';
import { getClient } from './client';
jest.mock('./is-offline', () => ({
isOffline: jest.fn(),
}));
const MOCK_IS_OFFLINE = isOffline as jest.Mock;
jest.mock('@aws-sdk/client-sqs', () => {
return {
SQSClie... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/redis/redis.ts | starters/serverless-framework-apollo-contentful/src/utils/redis/redis.ts | import Keyv from 'keyv';
const {
REDIS_PORT = 6379,
REDIS_HOST = '127.0.0.1',
REDIS_USER = 'default',
REDIS_PASS = '',
} = process.env;
export const redisClient = new Keyv(
`redis://${REDIS_USER}:${REDIS_PASS}@${REDIS_HOST}:${REDIS_PORT}`
);
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/redis/redis-healthcheck.ts | starters/serverless-framework-apollo-contentful/src/utils/redis/redis-healthcheck.ts | import { redisClient } from './redis';
export const getRedisHealth = async () => {
try {
await redisClient.get('');
return true;
} catch {
return false;
}
};
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts | starters/serverless-framework-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts | import { getRedisHealth } from './redis-healthcheck';
import { redisClient } from './redis';
const MOCK_REDIS_CLIENT_GET = redisClient.get as jest.Mock;
jest.mock('./redis', () => ({
redisClient: {
get: jest.fn(),
},
}));
describe('.healthcheck', () => {
describe('when connection is successful', () => {
let re... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/redis/index.ts | starters/serverless-framework-apollo-contentful/src/utils/redis/index.ts | export { redisClient } from './redis';
export { getRedisHealth } from './redis-healthcheck';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/redis/redis.spec.ts | starters/serverless-framework-apollo-contentful/src/utils/redis/redis.spec.ts | import assert from 'assert';
import Keyv from 'keyv';
import { redisClient } from './redis';
jest.mock('./redis', () => {
// Original env snapshot
const _originalEnv = process.env;
process.env = {
REDIS_PORT: '1234',
REDIS_HOST: 'MOCK_HOST',
REDIS_USER: 'MOCK_USER',
REDIS_PASS: 'MOCK_PASS',
};
// Require ... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/test/mocks/aws-lambda-handler-context.ts | starters/serverless-framework-apollo-contentful/src/utils/test/mocks/aws-lambda-handler-context.ts | import { Context } from 'aws-lambda';
export const mockAWSLambdaHandlerContext = (callbackWaitsForEmptyEventLoop?: boolean): Context => ({
callbackWaitsForEmptyEventLoop: Boolean(callbackWaitsForEmptyEventLoop),
functionName: 'MOCK_functionName',
functionVersion: 'MOCK_functionVersion',
invokedFunctionArn: 'MOCK_i... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/test/mocks/sqs-record.ts | starters/serverless-framework-apollo-contentful/src/utils/test/mocks/sqs-record.ts | import { SQSEvent, SQSRecord, SQSRecordAttributes } from 'aws-lambda';
const mockSQSRecordAttributes = (messageId: string): SQSRecordAttributes => ({
ApproximateReceiveCount: `${messageId}__ApproximateReceiveCount`,
SentTimestamp: `${messageId}__SentTimestamp`,
SenderId: `${messageId}__SenderId`,
ApproximateFirstR... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/test/mocks/graphql.ts | starters/serverless-framework-apollo-contentful/src/utils/test/mocks/graphql.ts | import {
GraphQLObjectType,
GraphQLOutputType,
GraphQLResolveInfo,
GraphQLSchema,
Kind,
OperationTypeNode,
} from 'graphql';
import { addPath } from 'graphql/jsutils/Path';
export const mockGraphQLResolveInfo = (): GraphQLResolveInfo => ({
fieldName: '',
fieldNodes: [],
returnType: {} as GraphQLOutputType,
p... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/test/mocks/index.ts | starters/serverless-framework-apollo-contentful/src/utils/test/mocks/index.ts | export * from './aws-lambda-handler-context';
export * from './sqs-record';
export * from './graphql';
export * from './contentful';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/test/mocks/contentful/entry.ts | starters/serverless-framework-apollo-contentful/src/utils/test/mocks/contentful/entry.ts | import { Entry, EntryProps, KeyValueMap, SysLink } from 'contentful-management';
const mockSysLink = (): SysLink => ({
sys: {
type: 'MOCK_SYSLINK_TYPE',
linkType: 'MOCK_SYSLINK_LINK_TYPE',
id: 'MOCK_SYSLINK_ID',
},
});
export const mockEntry = (id: string, fields: KeyValueMap): Entry => ({
sys: {
space: mo... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/test/mocks/contentful/index.ts | starters/serverless-framework-apollo-contentful/src/utils/test/mocks/contentful/index.ts | export * from './entry';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/contentful/contentful.spec.ts | starters/serverless-framework-apollo-contentful/src/utils/contentful/contentful.spec.ts | import { createClient, Environment } from 'contentful-management';
import { getEnvironment } from './contentful';
const dummyEnvironment = {
accessToken: 'DUMMYTOKEN',
};
const mockCreateClient = createClient as jest.Mock;
jest.mock('contentful-management', () => ({
createClient: jest.fn().mockReturnValue({
getS... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/contentful/index.ts | starters/serverless-framework-apollo-contentful/src/utils/contentful/index.ts | export { getEnvironment } from './contentful';
export { getContentfulHealth } from './contentful-healthcheck';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/contentful/contentful-healthcheck.spec.ts | starters/serverless-framework-apollo-contentful/src/utils/contentful/contentful-healthcheck.spec.ts | import { getEnvironment } from './contentful';
import { getContentfulHealth } from './contentful-healthcheck';
const MOCK_GET_ENVIRONMENT = getEnvironment as jest.Mock;
jest.mock('./contentful', () => ({
getEnvironment: jest.fn(),
}));
describe('.healthcheck', () => {
describe('when connection is successful', () =>... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/contentful/contentful-healthcheck.ts | starters/serverless-framework-apollo-contentful/src/utils/contentful/contentful-healthcheck.ts | import { getEnvironment } from './contentful';
export const getContentfulHealth = async () => {
try {
await getEnvironment();
return true;
} catch {
return false;
}
};
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/utils/contentful/contentful.ts | starters/serverless-framework-apollo-contentful/src/utils/contentful/contentful.ts | import { createClient, Environment } from 'contentful-management';
import * as dotenv from 'dotenv';
// load dotenv config
dotenv.config();
const client = createClient({
accessToken: `${process.env.CONTENTFUL_CONTENT_MANAGEMENT_API_TOKEN}`,
});
export async function getEnvironment(): Promise<Environment> {
const s... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/handlers/sqs-handler.spec.ts | starters/serverless-framework-apollo-contentful/src/handlers/sqs-handler.spec.ts | import { handler } from './sqs-handler';
import { mockSQSEvent, mockAWSLambdaHandlerContext } from '../utils/test/mocks';
const MOCK_RECORDS_COUNT = 2;
const MOCK_SQS_EVENT = mockSQSEvent(MOCK_RECORDS_COUNT);
const MOCK_CONTEXT = mockAWSLambdaHandlerContext();
const MOCK_CALLBACK = jest.fn();
describe('.handler', ()... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/handlers/healthcheck.ts | starters/serverless-framework-apollo-contentful/src/handlers/healthcheck.ts | import { APIGatewayProxyHandler } from 'aws-lambda';
import { getContentfulHealth } from '../utils/contentful';
import { getRedisHealth } from '../utils/redis';
export type HealthCheckResult = {
cacheDatabase: boolean;
contentful: boolean;
};
export const handler: APIGatewayProxyHandler = async () => {
const resul... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/handlers/sqs-generate-job.ts | starters/serverless-framework-apollo-contentful/src/handlers/sqs-generate-job.ts | import { APIGatewayProxyHandler } from 'aws-lambda';
import { sendMessage } from '../utils/sqs';
export const handler: APIGatewayProxyHandler = async (event) => {
const body = JSON.parse(event.body || '{}');
const resp = await sendMessage({
id: Math.ceil(Math.random() * 100),
message: body.message,
});
return... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/handlers/healthcheck.spec.ts | starters/serverless-framework-apollo-contentful/src/handlers/healthcheck.spec.ts | import { APIGatewayProxyEvent, Context, Callback, APIGatewayProxyResult } from 'aws-lambda';
import { handler, HealthCheckResult } from './healthcheck';
import { getContentfulHealth } from '../utils/contentful';
import { getRedisHealth } from '../utils/redis';
const MOCK_GET_CONTENTFUL_HEALTH = getContentfulHealth as ... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/handlers/graphql.ts | starters/serverless-framework-apollo-contentful/src/handlers/graphql.ts | import { ApolloServer, BaseContext } from '@apollo/server';
import { startServerAndCreateLambdaHandler } from '@as-integrations/aws-lambda';
import { KeyvAdapter } from '@apollo/utils.keyvadapter';
import { resolvers, typeDefs } from '../schema';
import { redisClient } from '../utils/redis';
import TechnologyModel from... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/handlers/sqs-handler.ts | starters/serverless-framework-apollo-contentful/src/handlers/sqs-handler.ts | import { SQSHandler } from 'aws-lambda';
export const handler: SQSHandler = async (event) => {
const recordHandler = async (record: { body: string }) => {
console.log('Job Message:', JSON.stringify(record.body));
};
// Ensuring we await on all the promises is super important to avoid
// accidentally killing the... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/handlers/sqs-generate-job.spec.ts | starters/serverless-framework-apollo-contentful/src/handlers/sqs-generate-job.spec.ts | import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
import { handler } from './sqs-generate-job';
import { sendMessage } from '../utils/sqs';
import { mockAWSLambdaHandlerContext } from '../utils/test/mocks';
const MOCK_API_EVENT: APIGatewayProxyEvent = {
body: JSON.stringify({ message: 'Hello ... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/schema/index.ts | starters/serverless-framework-apollo-contentful/src/schema/index.ts | import { mergeResolvers, mergeTypeDefs } from '@graphql-tools/merge';
import { technologyResolvers, technologyTypeDefs } from './technology';
export const typeDefs = mergeTypeDefs([technologyTypeDefs]);
export const resolvers = mergeResolvers([technologyResolvers]);
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/schema/technology/technology.resolvers.ts | starters/serverless-framework-apollo-contentful/src/schema/technology/technology.resolvers.ts | import { Resolvers, Technology } from '../../generated/graphql';
import { create, getAll, getById } from '../../models/Technology';
import { GraphQLError } from 'graphql/error';
export const technologyResolvers: Resolvers = {
Query: {
technology: async (_parent, { id }) => {
return getById(id) as Promise<Technol... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/schema/technology/technology.typedefs.ts | starters/serverless-framework-apollo-contentful/src/schema/technology/technology.typedefs.ts | import gql from 'graphql-tag';
export const technologyTypeDefs = gql`
type Technology {
id: ID!
displayName: String!
description: String
url: String
}
type Query {
"Technology: GET"
technology(id: ID!): Technology
technologies(offset: Int, limit: Int): [Technology!]
}
type Mutation {
"Technology... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/schema/technology/technology.resolver.spec.ts | starters/serverless-framework-apollo-contentful/src/schema/technology/technology.resolver.spec.ts | import { technologyResolvers } from './technology.resolvers';
import { create, getAll, getById } from '../../models/Technology';
import TechnologyModel from '../../models/Technology/TechnologyModel';
import assert from 'assert';
import {
Maybe,
MutationCreateTechnologyArgs,
MutationUpdateTechnologyArgs,
RequireFiel... | typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/src/schema/technology/index.ts | starters/serverless-framework-apollo-contentful/src/schema/technology/index.ts | export { technologyTypeDefs } from './technology.typedefs';
export { technologyResolvers } from './technology.resolvers';
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
thisdot/starter.dev | https://github.com/thisdot/starter.dev/blob/593639aa39999fcb7e8f4cab65c6f768fd4a3a09/starters/serverless-framework-apollo-contentful/.jest/set-env-vars.ts | starters/serverless-framework-apollo-contentful/.jest/set-env-vars.ts | const MOCK_ENV_VARS = {
CONTENTFUL_CONTENT_MANAGEMENT_API_TOKEN: 'MOCK_CONTENTFUL_CONTENT_MANAGEMENT_API_TOKEN',
CONTENTFUL_SPACE_ID: 'MOCK_CONTENTFUL_SPACE_ID',
CONTENTFUL_ENVIRONMENT: 'MOCK_CONTENTFUL_ENVIRONMENT',
};
process.env = { ...process.env, ...MOCK_ENV_VARS };
| 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/deps.ts | starters/deno-oak-denodb/deps.ts | /**
* Exports all project dependencies from the file.
*/
export * as log from 'https://deno.land/std@0.177.0/log/mod.ts';
export { Application, Router, Context } from 'https://deno.land/x/oak@v11.1.0/mod.ts';
export type { Middleware } from 'https://deno.land/x/oak@v11.1.0/mod.ts';
export { DataTypes, Database, Mode... | 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/dev_deps.ts | starters/deno-oak-denodb/dev_deps.ts | /**
* Exports all project devDependencies from the file
*/
export { assert, assertEquals } from 'https://deno.land/std@0.177.0/testing/asserts.ts';
export { testing } from 'https://deno.land/x/oak@v11.1.0/mod.ts';
export { assertSpyCall, assertSpyCalls, spy, stub, resolvesNext } from 'https://deno.land/std@0.177.0/t... | 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/tools/generate_type_definition.ts | starters/deno-oak-denodb/tools/generate_type_definition.ts | import { CodegenConfig, generate } from 'npm:@graphql-codegen/cli';
import 'npm:@graphql-codegen/typescript';
import 'npm:@graphql-codegen/typescript-resolvers';
const config: CodegenConfig = {
schema: './src/graphql/schema/technology.ts',
generates: {
'./src/graphql/interfaces/codegen.ts': {
plugins: ['typescr... | 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/main.ts | starters/deno-oak-denodb/src/main.ts | import { Application, applyGraphQL, oakCors, Router } from '../deps.ts';
import { db } from './db/db.ts';
import { technologyResolvers } from './graphql/resolvers/resolvers.ts';
import { technologyTypes } from './graphql/schema/technology.ts';
import { corsAllowedOrigins } from './util/cors_allowed_origins.ts';
import ... | 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/util/cors_allowed_origins.ts | starters/deno-oak-denodb/src/util/cors_allowed_origins.ts | import { CORS_ALLOWED_ORIGINS } from '../config/environment.ts';
/**
* Extracts list of allowed origins for CORS.
* @returns {string[]}
*/
export function corsAllowedOrigins(): string[] {
return CORS_ALLOWED_ORIGINS ? CORS_ALLOWED_ORIGINS.split(',') : [];
}
| 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/util/logger.ts | starters/deno-oak-denodb/src/util/logger.ts | import { log } from '../../deps.ts';
import { LOG_LEVEL } from '../config/environment.ts';
const environmentLogLevel = LOG_LEVEL as log.LevelName;
await log.setup({
handlers: {
console: new log.handlers.ConsoleHandler(environmentLogLevel, {
formatter: '{datetime} {levelName} {msg}',
}),
},
loggers: {
def... | 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/cache/use_cache.ts | starters/deno-oak-denodb/src/cache/use_cache.ts | import { Cache } from './cache.ts';
export type GetFreshValue<T> = {
(): Promise<T> | T;
};
export async function useCache<T>(
cacheKey: string,
cache: Cache,
callback: GetFreshValue<T>,
): Promise<T> {
const cacheTechnology = await cache.readItem<T>(cacheKey);
if (cacheTechnology) {
return cacheTechnology;
... | 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/cache/mod.ts | starters/deno-oak-denodb/src/cache/mod.ts | import { Cache } from './cache.ts';
export const cache = new Cache();
await cache.connectToRedis();
| 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/cache/cache.ts | starters/deno-oak-denodb/src/cache/cache.ts | import { connect, Redis, SetOpts } from '../../deps.ts';
import { REDIS_CACHE_HOST, REDIS_CACHE_PORT } from '../config/environment.ts';
import { logger } from '../util/logger.ts';
const redisHostname = REDIS_CACHE_HOST || 'localhost';
const redisPort = REDIS_CACHE_PORT ? parseInt(REDIS_CACHE_PORT) : 6379;
export clas... | 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/interfaces/graphql_interfaces.ts | starters/deno-oak-denodb/src/graphql/interfaces/graphql_interfaces.ts | import { Cache } from '../../cache/cache.ts';
export interface GraphqlContext {
cache: Cache;
}
| typescript | MIT | 593639aa39999fcb7e8f4cab65c6f768fd4a3a09 | 2026-01-05T04:59:58.752174Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.