Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Gatsby | 54,737 | 393 | 929 | 2 days ago | 225 | July 25, 2023 | 280 | mit | JavaScript | |
The best React-based framework with performance, scalability and security built in. | ||||||||||
Query | 36,430 | 5 | 1,173 | 6 hours ago | 491 | January 25, 2023 | 43 | mit | TypeScript | |
🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query. | ||||||||||
React Admin | 22,932 | 212 | 154 | 2 days ago | 239 | July 21, 2023 | 100 | mit | TypeScript | |
A frontend Framework for building B2B applications running in the browser on top of REST/GraphQL APIs, using ES6, React and Material Design | ||||||||||
React Starter Kit | 22,101 | 1 | 7 | a month ago | 23 | March 07, 2016 | 5 | mit | TypeScript | |
The web's most popular Jamstack front-end template (boilerplate) for building web applications with React | ||||||||||
Hey | 21,237 | 9 hours ago | 72 | agpl-3.0 | TypeScript | |||||
Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿 | ||||||||||
Saleor | 19,110 | 8 hours ago | 633 | bsd-3-clause | Python | |||||
Saleor Core: the high performance, composable, headless commerce API. | ||||||||||
Redwood | 16,343 | 18 | 13 hours ago | 3,293 | September 24, 2022 | 491 | mit | TypeScript | ||
The App Framework for Startups | ||||||||||
Refine | 14,750 | 48 | a day ago | 199 | March 14, 2023 | 31 | mit | TypeScript | ||
Build your React-based CRUD applications, without constraints. 🌟 Star to support our work! | ||||||||||
Blitz | 13,060 | 3 | 17 | a day ago | 482 | July 20, 2023 | 216 | mit | TypeScript | |
⚡️ The Missing Fullstack Toolkit for Next.js | ||||||||||
Payload | 12,280 | 5 | 83 | a day ago | 376 | July 31, 2023 | 89 | mit | TypeScript | |
The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS. |
This project is a clone of hacker news rewritten with universal JavaScript, using React and GraphQL. It is intended to be an example or boilerplate to help you structure your projects using production-ready technologies.
React - (UI Framework)
GraphQL - (Web Data API)
Apollo - (GraphQL Client/Server)
Next - (Routing, SSR, Hot Module Reloading, Code Splitting, Build tool uses Webpack)
TypeScript - (Static Types)
Webpack - (Module Bundler)
PostCSS - (CSS Processing)
Node.js - (Web Server)
Express - (Web App Server)
Passport - (Authentication)
ESLint - (Coding Best Practices/Code Highlighting)
Jest - (Tests)
Docker - (Container Deployment)
Optional - Yarn or Pnpm Package Manager - (Better Dependencies)
Front End
react
)typescript
)@apollo/client
)next
)Server
node
& express
)apollo-server
)apollo-server-express
)apollo-server-express
)apollo-server-express
)passport
)next
)next
)next
)docker
)Dev/Test
next
)jest
)apollo-server-express
)pnpm
/yarn
)eslint
)
server.ts
is the entry point. It uses Express and passes requests to Next. Next SSR renders the pages using getServerSideProps()
hook from Apollo helper. Therefore the app makes GraphQL requests on the client or server.
When the client loads the page it preloads next pages code from any <Link href="/">
. When the client navigates to the next page it only needs to make one GraphQL query to render. Great!
See more: Next.js, Apollo GraphQL Client
GraphQL: GraphQL-Tools by Apollo or GraphQL docs
Each web page has a React component in pages
. Server code is in server
. Shared code that runs on client or server is in src
. Do not import from server
or pages
in src
to avoid running code in the wrong environment.
The project root contains config files such as TypeScript, Babel, ESLint, Docker, Flow, NPM, Yarn, Git.
You can download and run the repo with one command to rule them all:
git clone https://github.com/clintonwoo/hackernews-react-graphql.git && cd hackernews-react-graphql && npm install && npm start
Running the app in dev mode is fully featured including hot module reloading:
npm install
npm start
To run in production mode:
npm run build:prod && npm run start:prod
The project runs out of the box with default settings (/src/config.ts
). You can include a .env file in your project root to configure settings (this is the 'dotenv' npm package). The .env file is included in .gitignore.
npm test
This project uses Jest and can do snapshot testing of React components. Whenever a component is changed, please update the snapshots using npm test -- -u
or npx jest --updateSnapshot
.
npm run build:prod
: NextJS app with entry point server.ts
that uses Node.js/Express. Uses TypeScript compiler to transpile project src to build.
OR
npm run build-docker
Docker Container: Builds a docker container using Dockerfile.
NextJS lets us make a powerful static website but you need to consider if you need server side rendering.
npm run build-static-website
: Builds static website to /build/static
. Use a static web server eg. NGINX/Github Pages.
Pull requests are welcome. File an issue for ideas, conversation or feedback.
After you ★Star this project, follow @ClintonDAnnolfo on Twitter.