A template repository for starting a new React - Apollo project. (server + client)
Overview:
The React - Apollo Template is a repository that provides a quick and easy way to create React - Apollo projects. It includes the setup for both the client-side and server-side, including server-side rendering.
Features:
- Yarn workspaces: Allows for easier development by managing dependencies and scripts across multiple packages.
- Linting (ESLint): Sets up ESLint for the project and adds it to pre-commit hooks to enforce code quality standards.
- Testing (JEST): Configures JEST for unit testing and adds it to pre-commit hooks for automatic testing before committing code.
- Auto-updating NPM dependencies: Includes the
updtr command to easily update NPM dependencies with one command. - Server: Express setup: Sets up the Express framework for the server-side of the project.
- Server: Apollo-Server setup: Integrates and sets up Apollo-Server for GraphQL implementation on the server-side with example code.
- Server: Parcel middleware setup: Adds Parcel middleware to the server for bundling and serving client-side code.
- Server: Dockerized self-contained service: Provides a Docker container for the server, making deployment easier by creating a self-contained service.
- Client: React setup (latest): Sets up the latest version of React on the client-side.
- Client: Routing setup with examples: Configures routing on the client-side and provides example code for navigation.
- Client: Apollo (GraphQL) setup with examples: Configures Apollo for GraphQL implementation on the client-side and provides example code for making queries and mutations.
- Client: Hot-reloading with Parcel: Enables hot-reloading on the client-side using Parcel bundler for faster development.
- Client: Hashed bundles for easier caching in production: Uses hashed bundles for better caching in production, improving performance.
- Client: Tailwind CSS: Integrates Tailwind CSS for using utility-first CSS in the project.
Installation:
To install the React - Apollo Template, follow these steps:
- Clone the repository:
git clone <repository-url> - Navigate to the project directory:
cd <project-directory> - Install the dependencies using Yarn:
yarn install - Start the development server:
yarn dev
For production deployment, use the following steps:
- Build the client-side code:
yarn build - Start the production server:
yarn start
Make sure to replace <repository-url> with the actual URL of the repository and <project-directory> with the desired name of your project directory.
Summary:
The React - Apollo Template is a comprehensive repository that provides a ready-to-use setup for creating React - Apollo projects. It includes key features such as Yarn workspaces, linting, testing, auto-updating dependencies, server-side and client-side setups with various libraries and tools. The installation process is straightforward, allowing developers to quickly get started with their projects.