Overview
The Vitamincodecov Test workflow is a comprehensive starter template for building web applications with Vite, React, and TypeScript. It includes various features and tools to enhance development productivity and maintain code quality. The template leverages popular libraries such as Tailwind CSS, ESLint, stylelint, Prettier, Vitest, Testing Library, and Cypress to enable efficient testing and styling practices. Additionally, it utilizes GitHub Actions for automatic dependency updates, CodeQL Analysis, running tests, and code coverage with Codecov. The template also provides a seamless deployment process to Vercel.com with pre-configured SPA fallback.
Features
- Vite with React, TypeScript and absolute imports: Utilize Vite as the build tool with React and TypeScript for efficient development and type safety. Absolute imports enable easier module imports.
- Tailwind CSS v3 with basic reset and Prettier plugin: Apply Tailwind CSS for styling, including a basic reset for form styles. The Prettier plugin automatically sorts classes for a clean and organized codebase.
- ESLint, stylelint, and Prettier integration: Enhance code quality with ESLint for linting JavaScript and TypeScript code, stylelint for enforcing consistent style rules, and Prettier for automatic code formatting. Integration with VSCode, Husky, and lint-staged ensures code is checked before committing.
- PWA with 17/17 Lighthouse score: Create a Progressive Web App (PWA) with a perfect 17/17 Lighthouse score, providing a smooth and engaging user experience.
- Unit and integration testing with Vitest and Testing Library: Write comprehensive unit and integration tests using Vitest and Testing Library to ensure the functionality and reliability of your application.
- E2E testing with Cypress: Perform end-to-end testing using Cypress, a fast and reliable testing framework, to simulate user interactions and catch potential bugs.
- GitHub Actions integration: Automate essential tasks such as dependency updates, CodeQL Analysis, running tests, and code coverage with GitHub Actions, ensuring consistent quality and reliability of the project.
- Seamless deployment to Vercel.com: Easily deploy your application to Vercel.com with pre-configured SPA fallback, allowing smooth transitions and efficient serving of your web application.
Installation
To get started with the Vitamincodecov Test workflow, follow these steps:
- Use this repository as a GitHub template or clone it to your machine using degit with an empty git history.
npx degit [repository-url]
- Install the project dependencies.
pnpm install
- Before starting coding, you may perform the following optional steps:
- If you don’t plan to use GitHub Actions, delete the .github directory.
- Clean up the cypress/e2e/index.spec.ts file.
- Change the favicon images (favicon.png, apple-touch-icon.png, android-chrome-192x192.png, android-chrome-512x512.png) to match your project branding. Consider using favicon.io for generating these assets.
- Remove the tests, api, and components folders, as well as the types.ts file from the src folder if you don’t need them.
- If you don’t plan to use react-query, remove the query client logic in the main.tsx file.
- Modify the title, description, and theme color in the index.html and vite.config.ts files. Optionally, remove the Inter font if not needed.
- Modify or delete the LICENSE file.
Summary
The Vitamincodecov Test workflow provides a comprehensive and opinionated starter template for developing web applications with Vite, React, and TypeScript. Its feature-rich setup includes essential tools and libraries, such as Tailwind CSS, ESLint, stylelint, and Prettier, to ensure high code quality and productivity. The template also includes robust testing capabilities with Vitest and Testing Library for unit and integration tests, as well as Cypress for end-to-end testing. GitHub Actions integration streamlines important tasks like dependency updates, code analysis, and code coverage. With seamless deployment to Vercel.com, the workflow offers a complete solution for building and shipping modern web applications.