Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikitowsky/next-advanced-apollo-starter
Advanced, but minimalistic Next.js and Apollo starter
https://github.com/nikitowsky/next-advanced-apollo-starter
apollo authentication boilerplate developer-experience docker graphql jest jwt nextjs nginx react react-testing-library starter testing-library typescript universal vercel
Last synced: 27 days ago
JSON representation
Advanced, but minimalistic Next.js and Apollo starter
- Host: GitHub
- URL: https://github.com/nikitowsky/next-advanced-apollo-starter
- Owner: nikitowsky
- Created: 2019-06-01T17:40:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-25T06:46:45.000Z (about 1 year ago)
- Last Synced: 2024-08-08T18:02:42.516Z (4 months ago)
- Topics: apollo, authentication, boilerplate, developer-experience, docker, graphql, jest, jwt, nextjs, nginx, react, react-testing-library, starter, testing-library, typescript, universal, vercel
- Language: TypeScript
- Homepage:
- Size: 664 KB
- Stars: 276
- Watchers: 5
- Forks: 31
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-NextJs - next-advanced-apollo-starter
README
next-advanced-apollo-starter
Advanced and minimalistic Next.js and Apollo starter
What's included •
Getting Started •
Apollo usage •
Tests •
Docker usage## What's included
### Features
- Latest [Next.js](https://nextjs.org/) version.
- Latest packages updates.
- GraphQL [Apollo](https://www.apollographql.com/docs/react/essentials/get-started/) client with built-in
cookie-based [JWT](https://jwt.io/) token authentication.
- Works both via _Client-Side Rendering_ and _Server-Side Rendering_;
- [TypeScript](https://www.typescriptlang.org/) environment.
- [Normalize.css](https://necolas.github.io/normalize.css/) included.
- _No custom server_.### Developer experience
- Testing environment via [Jest](https://jestjs.io/)
and [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro).
- Configured [GraphQL Code Generator](https://www.the-guild.dev/graphql/codegen). Simply run `yarn codegen`.
- [Prettier](https://prettier.io/) for code formatting.
- Debug configuration for [VSCode](https://code.visualstudio.com/).
- [Docker](https://www.docker.com/) configuration to serve **production-ready** build with Nginx.## Getting started
No extra knowledge needed to get started, see [Next.js documentation](https://nextjs.org/docs).
## GraphQL Code Generation
Generated interfaces for co-located _.graphql_ files. See the [example](./src/graphql/queries).
```bash
yarn codegen
```## Apollo usage
- [Client-Side Rendering (CSR) example](./src/pages/users-csr.tsx).
- [Server-Side Rendering (SSR) example](./src/pages/users-ssr.tsx).## Tests
[Jest](https://jestjs.io/) is a great tool for testing. To run tests simply use `test` script from `package.json`:
```bash
yarn test
```---
Pretty much everything you need to know about project structure, SSR, etc., you can find in
the [official Next.js documentation](https://nextjs.org/docs).## Docker usage
To build and run Dockerized **production-ready** container, run:
```bash
docker-compose up --build
```