next-news
next-news copied to clipboard
Next news
Welcome to Next.js - Hygraph news starter, an open-source plug and play template and starter for you media apps or blogs! It's build on top of next-enterprise so it comes packed with functionalities designed to assist you in creating an app that is not only high-performing and maintainable but also enjoyable to use.

Table of Contents
-
Next.js Enterprise Boilerplate
- Table of Contents
- More resources
- 🎯 Getting Started
- 🚀 Deployment
- 📃 Scripts Overview
- 🤝 Contribution
- 💌 Support
- 📜 License
- Contributors
More resources
You can find more in depth dive into project's underlying architecture in the next-enteprise repository.
🎯 Getting Started
To get started with this boilerplate, follow these steps:
- Fork & clone repository:
## Don't forget to ⭐ star and fork it first :)
git clone https://github.com/<your_username)/next-news.git
- Install the dependencies:
yarn install --frozen-lockfile
- Provide required env variables:
# url of your site, used for SEO and sitemaps
NEXT_PUBLIC_SITE_URL="my-site.app"
# hygraph's graphql content api url - you can find it in API Acess tab on Hygraph
NEXT_PUBLIC_HYGRAPH_CONTENT_API_URL="https://region.hygraph.com/v2/projectId/environment"
# secret used for authenticating webhooks (generate it yourself)
HYGRAPH_WEBOOK_SECRET="my-secret-123"
Search engine - take it from your algolia project's config
NEXT_PUBLIC_ALGOLIA_API_ID=""
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY=""
Analytics - used for counting views on your articles. Needed for 'Trending Articles' section
GA_MEASUREMENT_ID=""
GA_PROPERTY_ID=""
# Base64 endoded service account containing:
# {
# "private_key: "private-key-value"
# "client_email": "[email protected]"
# }
GA_BASE64_SERVICE_ACCOUNT=""
- Run the development server:
yarn dev
- Open http://localhost:3000 with your browser to see the result.
🚀 Deployment
Easily deploy your Next.js app with Vercel by clicking the button below:
📃 Scripts Overview
The following scripts are available in the package.json
:
-
dev
: Starts the development server along with codegen watcher -
build
: Builds the app for production -
start
: Starts the production server -
lint
: Lints the code using ESLint -
lint:fix
: Automatically fixes linting errors -
prettier
: Checks the code for proper formatting -
prettier:fix
: Automatically fixes formatting issues -
analyze
: Analyzes the bundle sizes for Client, Server and Edge environments -
storybook
: Starts the Storybook server -
build-storybook
: Builds the Storybook for deployment -
test
: Runs unit and integration tests -
codegen
: Runs codegen on your public content api url -
e2e:headless
: Runs end-to-end tests in headless mode -
e2e:ui
: Runs end-to-end tests with UI -
format
: Formats the code with Prettier -
postinstall
: Applies patches to external dependencies -
preinstall
: Ensures the project is installed with Yarn -
coupling-graph
: Generates a coupling and cohesion graph for the components
🤝 Contribution
Contributions are always welcome! To contribute, please follow these steps:
- Fork the repository.
- Create a new branch with a descriptive name.
- Make your changes, and commit them using the Conventional Commits format.
- Push your changes to the forked repository.
- Create a pull request, and we'll review your changes.
Support
If you're looking for help or simply want to share your thoughts about the project, we encourage you to join our Discord community. Here's the link: https://blazity.com/discord. It's a space where we exchange ideas and help one another. Everyone's input is appreciated, and we look forward to welcoming you.
📜 License
This project is licensed under the MIT License. For more information, see the LICENSE file.
Contributors
Marcin Szczepaniak 💻 |
Max 💻 |
Bart Stefanski 💻 |
Jakub Jabłoński 🚇 |
|||
|