From c9903bff031c27d7e6639130b47a4ebf09e7b82a Mon Sep 17 00:00:00 2001 From: Nimrod Kramer <41470823+nimrodkra@users.noreply.github.com> Date: Sun, 20 Jul 2025 00:25:45 +0300 Subject: [PATCH] docs: enhance README with additional badges and developer experience details - Added new badges for React, Docusaurus, Node.js, Playwright, ESLint, and Prettier for better visibility of project dependencies. - Updated Node.js version requirement to v20.12 or higher. - Introduced a new section for developer experience, including one-click setup options and VSCode integration. - Enhanced the available scripts section with new commands for testing and linting. - Improved performance metrics presentation with visual badges for build time, bundle size, and Lighthouse scores. --- README.md | 105 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 84 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 2db59cc..6b09fa5 100644 --- a/README.md +++ b/README.md @@ -6,38 +6,66 @@ [![License](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](https://github.com/dailydotdev/daily/blob/master/LICENSE) [![Contributors](https://img.shields.io/github/contributors/dailydotdev/docs)](https://github.com/dailydotdev/docs/graphs/contributors) [![Docker](https://img.shields.io/docker/v/francescoxx/dailydev-docs?label=docker)](https://hub.docker.com/r/francescoxx/dailydev-docs) + + [![React](https://img.shields.io/badge/React-18.3.1-61DAFB?style=flat&logo=react&logoColor=white)](https://reactjs.org/) + [![Docusaurus](https://img.shields.io/badge/Docusaurus-3.4.0-3ECC5F?style=flat&logo=facebook&logoColor=white)](https://docusaurus.io/) + [![Node.js](https://img.shields.io/badge/Node.js-20.12+-339933?style=flat&logo=node.js&logoColor=white)](https://nodejs.org/) + [![Playwright](https://img.shields.io/badge/Playwright-1.40.0-2EAD33?style=flat&logo=playwright&logoColor=white)](https://playwright.dev/) + [![ESLint](https://img.shields.io/badge/ESLint-8.57.0-4B32C3?style=flat&logo=eslint&logoColor=white)](https://eslint.org/) + [![Prettier](https://img.shields.io/badge/Prettier-3.2.5-F7B93E?style=flat&logo=prettier&logoColor=white)](https://prettier.io/) + + [![Build Status](https://img.shields.io/github/actions/workflow/status/dailydotdev/docs/ci.yml?branch=main&style=flat&logo=github)](https://github.com/dailydotdev/docs/actions) + [![Deployment](https://img.shields.io/github/deployments/dailydotdev/docs/production?style=flat&logo=vercel&label=deployment)](https://github.com/dailydotdev/docs/deployments) + [![Bundle Size](https://img.shields.io/bundlephobia/minzip/dailydev-docs?style=flat&logo=webpack&label=bundle%20size)](https://bundlephobia.com/package/dailydev-docs) + [![Code Quality](https://img.shields.io/codeclimate/maintainability/dailydotdev/docs?style=flat&logo=codeclimate)](https://codeclimate.com/github/dailydotdev/docs) ## ๐ŸŽฏ Overview This repository contains the comprehensive documentation for [daily.dev](https://daily.dev), designed to help our community members get the most out of the platform. The documentation covers everything from getting started to advanced features and contribution guidelines. +
+ + Try it Live + + + Open in Gitpod + +
+ ### โœจ Key Features -- **๐Ÿ“– Comprehensive Guides**: Complete coverage of daily.dev features and functionality -- **๐Ÿ” Algolia Search**: Fast, integrated search across all documentation -- **๐ŸŒ™ Dark/Light Mode**: Theme toggle for comfortable reading -- **๐Ÿ“ฑ Responsive Design**: Optimized for all devices -- **โœ๏ธ Edit Links**: Direct GitHub integration for community contributions -- **๐Ÿš€ Fast Performance**: Built with Docusaurus 3 for optimal speed +- **Comprehensive Guides**: Complete coverage of daily.dev features and functionality +- **Algolia Search**: Fast, integrated search across all documentation +- **Dark/Light Mode**: Theme toggle for comfortable reading +- **Responsive Design**: Optimized for all devices +- **Edit Links**: Direct GitHub integration for community contributions +- **Fast Performance**: Built with Docusaurus 3 for optimal speed ## ๐Ÿ“Š Performance Metrics Our documentation site is optimized for speed and performance: -- **Build Time**: ~45 seconds (production build) -- **Bundle Size**: ~2.1MB (gzipped: ~580KB) -- **Lighthouse Scores**: - - ๐Ÿš€ Performance: 95+ - - โ™ฟ Accessibility: 100 - - ๐Ÿ” SEO: 100 - - ๐Ÿ’ก Best Practices: 100 +
+ + ![Build Time](https://img.shields.io/badge/Build%20Time-~45s-green?style=flat&logo=github-actions) + ![Bundle Size](https://img.shields.io/badge/Bundle%20Size-~2.1MB-blue?style=flat&logo=webpack) + ![Gzipped](https://img.shields.io/badge/Gzipped-~580KB-lightgreen?style=flat&logo=7zip) + + **๐Ÿš€ Lighthouse Scores:** + + ![Performance](https://img.shields.io/badge/Performance-95+-brightgreen?style=flat&logo=lighthouse) + ![Accessibility](https://img.shields.io/badge/Accessibility-100-brightgreen?style=flat&logo=lighthouse) + ![SEO](https://img.shields.io/badge/SEO-100-brightgreen?style=flat&logo=lighthouse) + ![Best Practices](https://img.shields.io/badge/Best%20Practices-100-brightgreen?style=flat&logo=lighthouse) + +
## ๐Ÿš€ Quick Start ### Prerequisites -- **Node.js**: v18.0 or higher +- **Node.js**: v20.12 or higher - **npm**: v7.0 or higher (or yarn/pnpm equivalent) ### Development Setup @@ -59,16 +87,44 @@ npm start The site will be available at `http://localhost:3000` with hot reload enabled. +### ๐Ÿ› ๏ธ Developer Experience + +**One-Click Setup:** +- [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/dailydotdev/docs) +- [![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/s/github/dailydotdev/docs) + +**VSCode Integration:** +```bash +# Recommended extensions are auto-suggested +# Settings and tasks are pre-configured in .vscode/ +code . +``` + +**Development Tools:** +- ๐Ÿ”ฅ Hot reload with instant feedback +- ๐Ÿ” Built-in link validation +- ๐Ÿ“ MDX syntax highlighting +- ๐ŸŽจ Real-time preview +- ๐Ÿงช Integrated testing with Playwright + ## ๐Ÿ“‹ Available Scripts | Command | Description | |---------|-------------| | `npm start` | Start development server | | `npm run build` | Build for production | +| `npm run build:optimized` | Build with optimizations | | `npm run serve` | Serve built site locally | | `npm run clear` | Clear Docusaurus cache | | `npm run docker:compose` | Build and run with Docker Compose | | `npm run docker:run` | Run pre-built Docker image | +| `npm test` | Run Playwright tests | +| `npm run test:headed` | Run Playwright tests in headed mode | +| `npm run test:ui` | Run Playwright tests with UI | +| `npm run lint` | Run ESLint on source files | +| `npm run lint:fix` | Run ESLint with auto-fix | +| `npm run format` | Format code with Prettier | +| `npm run format:check` | Check code formatting | ## ๐Ÿณ Docker Development @@ -79,7 +135,7 @@ docker compose up --build ### Using Pre-built Image ```bash -docker run -p 3000:3000 francescoxx/dailydev-docs:0.9.3 +docker run -p 3000:3000 francescoxx/dailydev-docs:0.19.0 ``` Both methods serve the site on `http://localhost:3000`. @@ -88,17 +144,24 @@ Both methods serve the site on `http://localhost:3000`. ### Running Tests -Currently, the project uses the following quality assurance processes: +The project uses Playwright for end-to-end testing and additional quality assurance processes: ```bash +# Run Playwright tests +npm test + +# Run tests in headed mode (with browser UI) +npm run test:headed + +# Run tests with Playwright UI +npm run test:ui + # Build test (validates all content can be built) npm run build -# Link checking (validates all internal and external links) -npm run build && npm run serve # Manual verification recommended - -# Markdown linting (if configured) -npm run lint # Check for linting scripts in package.json +# Code linting and formatting +npm run lint +npm run format:check ``` ### Quality Checks