qwik-graphql-tailwind kit
This starter kit features Qwik, GraphQL and Tailwind CSS.
Overview
Tech Stack
Included Tooling
- Jest - Test runner
- Typescript - Type checking
- Storybook - Component library
- Mock Service Worker - Mock REST / GraphQL API
- ESLint - Code linting
- Prettier - Code formatting
Example Components
In this starters/qwik-graphql-tailwind/src/routes directory you will find the home, counter and data-fetching directories.
-
src/routes: Provides the directory based routing, which can include a hierarchy oflayout.tsxlayout files, and anindex.tsxfile as the page. Additionally,index.tsfiles are endpoints. Please see the routing docs for more info. -
src/components: Recommended directory for components. -
public: Any static assets, like images, can be placed in the public directory. Please see the Vite public directory for more info.
Installation
CLI (Recommended)
npm create @this-dot/starter -- --kit qwik-graphql-tailwind
or
yarn create @this-dot/starter --kit qwik-graphql-tailwind
- Follow the prompts to select the
qwik-graphql-tailwindstarter kit and name your new project. cdinto your project directory and runyarn.- Run
yarn startto start the development server. - Open your browser to
http://localhost:5173to see the included example code running.
Manual
git clone https://github.com/thisdot/starter.dev.git
- Copy and rename the
starters/qwik-graphql-tailwinddirectory to the name of your new project. cdinto your project directory and runyarn.- Run
yarn startto start the development server. - Open your browser to
http://localhost:5173to see the included example code running.
Commands
yarn start- Starts the development server.yarn dev- Equivalent toyarn start, but uses127.0.0.1instead oflocalhostwhen opening browser.yarn dev.debug- Attaches Node.js inspector.yarn build- Builds a compiled production version of your app. Equivalent toyarn qwik build.yarn build.client- Builds a compiled production version of your app without building types and running linting.yarn build.types- Runs tsc compiler.yarn preview- Builds your app and serves in in production mode on a local vite preview server.yarn build.preview- Builds your app in production mode to be used with vite preview server.yarn qwik- Invokes the Qwik CLI. Possible arguments:add- Add an integration to your app.build- Builds your app in production mode.build preview- Same asbuildbut for preview server.
yarn test- Runs the unit tests.yarn test.coverage- Runs the unit tests and generates a coverage report.yarn storybook- Starts the Storybook UI.yarn build-storybook- Builds storybook instance tostorybook-staticfolder.yarn lint- Runs ESLint on the project.yarn prettier- Formats code for the entire project.yarn prettier.check- Checks all project code to conform to prettier rules.
Demo Implementation
The demo application tries to implement some of GitHub’s pages and functionality. It uses the OAuth credentials in GitHub to authenticate users with their GitHub accounts and uses svelte’s fetch api to fetch data from the GitHub API. Check out the link above to learn more or check out the demo!