-
Notifications
You must be signed in to change notification settings - Fork 17
next-react-query-tailwind readme content #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,68 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
# next-react-query-tailwind starter kit | ||
|
||
## Getting Started | ||
This starter kit features **Next.js**, **React Query**, and **Tailwind CSS**. | ||
|
||
First, run the development server: | ||
## Overview | ||
|
||
### Tech Stack | ||
|
||
- [Next.js v12.x](https://nextjs.org) | ||
- [React v17.x](https://reactjs.org) | ||
- [React Query v3.x](https://react-query.tanstack.com/) | ||
- [Tailwind CSS v3.x](https://tailwindcss.com/) | ||
|
||
### Included Tooling | ||
|
||
- [Jest](https://jestjs.io/) - Test runner | ||
- [Typescript](https://www.typescriptlang.org/) - Type checking | ||
- [Storybook](https://storybook.js.org/) - Component library | ||
- [Mock Service Worker](https://mswjs.io/) - Mock REST / GraphQL API | ||
- [ESLint](https://eslint.org/) - Code linting | ||
- [Prettier](https://prettier.io/) - Code formatting | ||
|
||
### Example Code | ||
|
||
- Next.js 'hello world' API endpoint `pages/api/hello.ts` with corresponding mock located in `msw/handlers/helloMock.ts`. | ||
- Greeting component `components/Greeting.tsx` that uses React Query to fetch data from the example hello endpoint. | ||
- An example Counter component `components/Counter.tsx` | ||
- Both example components are have co-located tests and stories. | ||
|
||
## Installation | ||
|
||
### CLI (Recommended) | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
npx create-starter-dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
- Follow the prompts to select the `next-react-query-tailwind` starter kit and name your new project. | ||
- `cd` into your project directory and run `npm install`. | ||
- Run `npm run dev` to start the development server. | ||
- Open your browser to `http://localhost:3000` to see the included example code running. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. | ||
### Manual | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
This requires a download of the entire starter.dev repository and extraction of the `next-react-query-tailwind` kit from the starters directory. | ||
|
||
## Learn More | ||
```bash | ||
git clone https://github.com/thisdot/starter.dev.git | ||
``` | ||
danecando marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
To learn more about Next.js, take a look at the following resources: | ||
- Copy and rename the `starters/next-react-query-tailwind` directory to the name of your new project. | ||
- `cd` into your project directory and run `npm install`. | ||
- Run `npm run dev` to start the development server. | ||
- Open your browser to `http://localhost:3000` to see the included example code running. | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
## Commands | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
- `npm run dev` - Starts the development server. | ||
- `npm run test` - Runs the unit tests. | ||
- `npm run storybook` - Starts the Storybook UI. | ||
- `npm run lint` - Runs ESLint on the project. | ||
- `npm run prettier` - Formats code for the entire project | ||
|
||
## Deploy on Vercel | ||
## Demo Implementation | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
[Repository](https://github.com/thisdot/starter.dev-showcases/tree/main/next-react-query-tailwind) | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
The demo for this starter kit is a partial implementation of some GitHub functionality. It uses the NextAuth library to authenticate users with their GitHub accounts and uses the GitHub GraphQL API with codegen and React Query to fetch data from the GitHub API. Check out the link above to learn more or check out the demo! | ||
danecando marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.