Feature/vibes docs#181
Open
jermbo wants to merge 26 commits into
Open
Conversation
…lContext - Added TanStack Query for managing server state, replacing the previous useFetch hook and related logic in GlobalContext. - Updated package dependencies to use specific versions, including React 19 and TanStack libraries. - Refactored API data fetching to utilize new hooks (useApiList, useApiCategories) for improved data handling. - Removed obsolete useFetch hook and cleaned up GlobalContext to only manage UI state. - Adjusted TypeScript configuration for module resolution and updated engine requirements in package.json. - Documented the modernization plan for the frontend, outlining future phases for routing and styling improvements.
- Integrated TanStack Router, replacing React Router for improved routing capabilities. - Removed the previous App component and routes configuration, transitioning to a file-based routing structure. - Updated components to utilize the new routing system, including Link and useParams from TanStack Router. - Added route definitions for main application pages, enhancing type safety and maintainability. - Introduced a generated route tree for better organization and access to routes. - Updated package.json to include necessary TanStack Router dependencies.
- Converted styles from SCSS to CSS, creating a more streamlined and maintainable structure. - Removed obsolete SCSS files and functions, reducing complexity and improving performance. - Updated component imports to reference new CSS files instead of SCSS. - Introduced design tokens for consistent styling across the application. - Enhanced the organization of styles by separating concerns into distinct CSS files for better readability.
- Introduced @fontsource packages for Montserrat Alternates and Roboto to eliminate render-blocking requests. - Updated styles.css to import self-hosted font files, enhancing loading speed and layout stability.
- Updated main.tsx to enable smooth cross-page animations using the View Transitions API. - Refactored APISearch, Nav, APIList, About, Docs, Home, StyleGuide components to use semantic HTML elements (e.g., <search>, <nav>, <section>) for better accessibility and SEO. - Improved input elements with appropriate ARIA attributes and placeholders for enhanced user experience. - Introduced responsive styles and transitions for a more cohesive design across different screen sizes.
- Added .nvmrc to specify Node.js version 26 for consistency across environments. - Updated GitHub Actions workflow to include separate jobs for server and client, both using Node.js 26. - Enhanced CI to install server dependencies and run tests, ensuring compatibility and reliability. - Introduced a Server Modernization Plan document outlining phases for upgrading dependencies and improving architecture. - Updated Dockerfile to use Node.js 26, aligning with the new environment standards. - Added baseline response snapshots for regression testing during future upgrades.
- Updated dependencies in package.json and package-lock.json to specific versions for better stability and performance. - Replaced json-graphql-server with a custom jsonRouter for enhanced flexibility in API routing. - Simplified API endpoint setup by removing unused code and improving data verification logic. - Introduced a new utility for creating JSON-based routers, allowing for CRUD operations on JSON files.
- Deleted unused API entries for Bitcoin and Rick and Morty from apiList.js and GeneratedAPIList.js. - Removed bitcoin.json and its backup, streamlining the API structure. - Updated checkdiff.sh to eliminate checks for removed JSON files. - Enhanced coffee.json with improved descriptions and ingredient translations for better clarity. - Corrected historical inaccuracies in presidents.json, including name and term adjustments for several presidents.
- Changed health check command in docker-compose.yml to point to the /health endpoint. - Deleted GraphQL references from various files, including API descriptions and component props, to streamline the API focus on RESTful endpoints. - Removed unused GraphQL links from apiList.js and related files, enhancing clarity and reducing confusion for users.
- Introduced 'Get Coffee' and 'Get Coffee Single' APIs for retrieving coffee details. - Added 'Update Coffee Single' API for modifying coffee information. - Created 'opencollection.yml' to manage API metadata and extensions.
- Eliminated all references to GraphQL across documentation files, including PRD, server documentation, and modernization plan. - Streamlined API focus to emphasize RESTful endpoints, enhancing clarity for users. - Updated technical constraints and future improvement sections to reflect the removal of GraphQL features.
- Introduced 'Get Coffee' and 'Get Coffee Single' APIs for retrieving coffee details. - Added 'Update Coffee Single' API for modifying coffee information. - Created new opencollection.yml for endpoint configuration and removed the old opencollection.yml file.
- Added a new Playground component utilizing CodeMirror for code editing and execution within a sandboxed iframe. - Replaced the previous Sandpack integration in APIDetails with the new Playground for a more streamlined user experience. - Updated package.json to include necessary CodeMirror dependencies and removed Sandpack-related packages. - Introduced Playground.css for styling the new component, enhancing the visual layout and user interaction.
- Introduced a new JsonTree component for displaying JSON data in a collapsible format within the Playground. - Updated Playground.css to include styles for the new JsonTree component and improved overall layout with new tab and button styles. - Enhanced the Playground component to support snippet loading and improved code editing experience with better state management.
- Updated the Node.js version requirement in package.json to 26 for compatibility. - Modified the Dockerfile to install only production dependencies using `npm ci --omit=dev`, reducing image size. - Changed the application start command to use `npm start` for production readiness. - Enhanced the server's security by running as a non-root user and setting the NODE_ENV to production. - Removed the express-slow-down dependency from package.json and package-lock.json for a leaner setup.
…files - Deleted the existing ESLint configuration file and replaced it with a new OXLint configuration file for improved linting capabilities. - Updated the Dockerfile to set the NODE_ENV to production and changed the command to serve the production build. - Removed the CodepenWrapper component and the useLocalStorage hook as they were no longer needed. - Enhanced the API details page to handle loading and error states more effectively. - Refactored the API list page to optimize filtering logic using useMemo for better performance. - Made various accessibility improvements across components, including aria attributes for better screen reader support. - Cleaned up CSS styles for better layout and responsiveness.
… page header - Wrapped the loading message in a header element for better semantic structure in the APIDetails component. - Added a minimum height to the page header in CSS to improve layout consistency.
- Enhanced the CONTRIBUTING.md file with a link to the project wiki for better guidance on project architecture and data lifecycle. - Improved the README.md to clarify the purpose of SampleAPIs and how to use the service, including updated code examples and documentation links. - Removed outdated sections and streamlined the content for better readability and user engagement. - Added a new section in the README for documentation navigation to assist users in finding relevant information quickly.
- Bumped the version number to 3.0.0 in package.json files for the main application, client, and server to reflect the latest release.
- Introduced a new section for proposed features in the documentation, outlining various enhancements aimed at improving the learning experience with SampleAPIs. - Added individual documentation pages for each proposed feature, including Auth Training Wheels, Error Practice Routes, Guided Challenges, HTTP Inspector, Multi-Language Snippets, Query Builder, Response Shape Viewer, Scratch Endpoints, and Shareable Playground Links. - Each proposal includes a description, problem statement, proposed solution, fit with current code, effort and risk assessment, and open questions for further consideration.
…avior - Added details to the error responses documentation regarding the behavior of writes to unknown resources, specifying that they return a `400` status when validation fails. - Updated the CRUD and validation documentation to include information about handling writes to resources with no existing records. - Clarified the pagination documentation to specify that the `Link` header only includes applicable URLs based on the current page. - Expanded the testing documentation to include a new section on response baseline snapshots for regression testing.
- Added a new package-lock.json file for the client to manage dependencies. - Updated the server's package-lock.json to reflect version changes and clean up unused dependencies. - Removed package-lock.json from .gitignore to ensure it is tracked in version control.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SampleAPIs 3.0 — Modernization, Playground, and Documentation
Summary
This is a major 3.0.0 release that modernizes the client and server, replaces the old json-server/GraphQL stack with an owned REST router, adds an in-browser CodeMirror Playground, and introduces a full project wiki under
docs/.Client
useFetch/useLocalStoragehooks)@fontsourcelocalStoragepersistence, and starter snippetsServer
jsonRouter(json-server-compatible CRUD, async disk I/O, per-file write locking)GraphQL_Basics.md, client images, server routes/tests)/healthendpointbitcoin,rickandmortycustom-apisroute and generated API list plumbingDocumentation & ops
docs/(architecture, API surface, data lifecycle, client features, operations, contributing, ADRs, future-feature proposals).nvmrc); CI split into separate server-test and client-build jobs on Node 26Breaking changes
bitcoinandrickandmortyAPIs removedTest plan
npm install && npm run dev— client at:4444, API at:5555docker compose up— both services healthy, client waits on server healthchecknpm testinserver/(Jest suite + baseline snapshots)npm run buildandnpm run lintinclient/coffee) — POST/PUT/PATCH/DELETE persist and/resetitrestores/bitcoin,/rickandmorty, GraphQL routesdocs/README.md— links resolve, matches current code paths