Skip to content

Blazity/next-news

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next news

Project intro image

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.


Blazity Discord Banner

Table of Contents

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:

  1. Fork & clone repository:
## Don't forget to ⭐ star and fork it first :)
git clone https://github.com/<your_username)/next-news.git
  1. Install the dependencies:
yarn install --frozen-lockfile
  1. 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": "service-account-email@project.iam.gserviceaccount.com"
# }
GA_BASE64_SERVICE_ACCOUNT=""
  1. Run the development server:
yarn dev
  1. 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:

Vercel

📃 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:

  1. Fork the repository.
  2. Create a new branch with a descriptive name.
  3. Make your changes, and commit them using the Conventional Commits format.
  4. Push your changes to the forked repository.
  5. 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
Marcin Szczepaniak

💻
Max
Max

💻
Bart Stefanski
Bart Stefanski

💻
Jakub Jabłoński
Jakub Jabłoński

🚇
Add your contributions