{"id":29395253,"url":"https://github.com/homelab-alpha/npm-workspaces-template","last_synced_at":"2026-04-09T11:01:25.637Z","repository":{"id":303238201,"uuid":"1014738083","full_name":"homelab-alpha/npm-workspaces-template","owner":"homelab-alpha","description":"A boilerplate for npm workspaces. Perfect for kickstarting a well organized, scalable project environment with a clear folder structure.","archived":false,"fork":false,"pushed_at":"2025-10-06T05:36:15.000Z","size":1137,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T07:25:14.058Z","etag":null,"topics":["boilerplate","client-server","full-stack","javascript","monorepo","nodejs","npm","npm-workspaces","starter","template","typescript","vue","web-development"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/homelab-alpha.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-06T10:14:05.000Z","updated_at":"2025-10-06T05:35:49.000Z","dependencies_parsed_at":"2025-07-06T14:39:00.048Z","dependency_job_id":"fb63e02f-ecf0-40e3-bdcf-7d3da8ffaaf8","html_url":"https://github.com/homelab-alpha/npm-workspaces-template","commit_stats":null,"previous_names":["homelab-alpha/npm-workspaces-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/homelab-alpha/npm-workspaces-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homelab-alpha%2Fnpm-workspaces-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homelab-alpha%2Fnpm-workspaces-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homelab-alpha%2Fnpm-workspaces-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homelab-alpha%2Fnpm-workspaces-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homelab-alpha","download_url":"https://codeload.github.com/homelab-alpha/npm-workspaces-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homelab-alpha%2Fnpm-workspaces-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278755161,"owners_count":26040034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","client-server","full-stack","javascript","monorepo","nodejs","npm","npm-workspaces","starter","template","typescript","vue","web-development"],"created_at":"2025-07-10T11:27:26.581Z","updated_at":"2026-04-09T11:01:25.631Z","avatar_url":"https://github.com/homelab-alpha.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm Workspaces Template\n\n[![Linting](https://github.com/homelab-alpha/npm-workspaces-template/actions/workflows/linting.yml/badge.svg)](https://github.com/homelab-alpha/npm-workspaces-template/actions/workflows/linting.yml)\n[![CodeQL](https://github.com/homelab-alpha/npm-workspaces-template/actions/workflows/codeql.yml/badge.svg)](https://github.com/homelab-alpha/npm-workspaces-template/actions/workflows/codeql.yml)\n[![Last commit](https://img.shields.io/github/last-commit/homelab-alpha/npm-workspaces-template?style=flat\u0026logo=github\u0026logoColor=96a1a9\u0026label=Last%20commit\u0026labelColor=313A41\u0026color=3955CD\u0026cacheSeconds=3600)](https://github.com/homelab-alpha/npm-workspaces-template/commits/main/)\n[![Repo Size](https://img.shields.io/github/repo-size/homelab-alpha/npm-workspaces-template?style=flat\u0026logo=github\u0026logoColor=96a1a9\u0026label=Repo%20size\u0026labelColor=313A41\u0026color=3955CD\u0026cacheSeconds=3600)](https://github.com/homelab-alpha/npm-workspaces-template/tree/main?tab=readme-ov-file#npm-workspaces-template)\n[![Changelog](https://img.shields.io/badge/Changelog-Keep%20a%20Changelog%20v1.1.0-313A41?style=flat\u0026logo=keepachangelog\u0026logoColor=96a1a9\u0026\u0026labelColor=313A41\u0026color=3955CD)](https://github.com/homelab-alpha/npm-workspaces-template/blob/main/CHANGELOG.md)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-3.0-313A41?style=flat\u0026logo=contributorcovenant\u0026logoColor=96a1a9\u0026\u0026labelColor=313A41\u0026color=3955CD)](https://github.com/homelab-alpha/npm-workspaces-template/blob/main/CODE_OF_CONDUCT.md)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-313A41?style=flat\u0026logo=conventionalcommits\u0026logoColor=96a1a9\u0026\u0026labelColor=313A41\u0026color=3955CD)](https://conventionalcommits.org)\n[![Semantic Versioning](https://img.shields.io/badge/SemVer-2.0.0-313A41?style=flat\u0026logo=semver\u0026logoColor=96a1a9\u0026\u0026labelColor=313A41\u0026color=3955CD)](https://github.com/semver/semver/blob/master/semver.md)\n\n\u003c!-- [![Downloads](https://img.shields.io/github/downloads/homelab-alpha/npm-workspaces-template/npm-workspaces-template?style=flat\u0026logo=github\u0026logoColor=96a1a9\u0026label=Downloads\u0026labelColor=313A41\u0026color=3955CD\u0026cacheSeconds=3600)](https://github.com/homelab-alpha/npm-workspaces-template/releases) --\u003e\n\nWelcome to the Homelab-Alpha npm Workspaces Template repository!\n\nThis project is a boilerplate for **Node.js** projects using **npm workspaces**.\nIt provides a structured setup with **client** and **server** workspaces for\nmodular full-stack development.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eTable of Contents\u003c/strong\u003e (click to expand)\u003c/summary\u003e\n  \u003cp\u003e\n    \u003ca href=\"#npm-workspaces-template\"\u003enpm Workspaces Template\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#project-progress\"\u003eProject Progress\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#to-do-list\"\u003eTo-Do List\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#client\"\u003eClient\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#docker\"\u003eDocker\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#server\"\u003eServer\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#documentation\"\u003eDocumentation\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#using-this-template\"\u003eUsing this Template\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-1-clone-the-repository\"\u003eStep 1: Clone the repository\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-2-navigate-to-the-project-directory\"\u003eStep 2: Navigate to the project directory\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-3-initialize-the-project\"\u003eStep 3: Initialize the project\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-4-install-project-dependencies\"\u003eStep 4: Install project dependencies\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#development\"\u003eDevelopment\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#local-development-npm-only\"\u003eLocal Development (npm Only)\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-1-start-the-development-servers\"\u003eStep 1: Start the development servers\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-2-access-the-application\"\u003eStep 2: Access the application\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#docker-and-docker-compose\"\u003eDocker and Docker Compose\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#building-and-running-the-application\"\u003eBuilding and Running the Application\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-1-build-docker-images\"\u003eStep 1: Build Docker Images\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-2-start-the-application\"\u003eStep 2: Start the Application\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-3-access-the-application\"\u003eStep 3: Access the Application\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-4-stop-the-application-and-remove-the-container-and-network\"\u003eStep 4: Stop the Application and remove the container and network\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#running-tests-with-docker-compose\"\u003eRunning Tests with Docker Compose\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-1-build-the-docker-image-and-run-the-tests-in-a-container\"\u003eStep 1: Build the Docker image and run the tests in a container\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#step-2-clean-up-resources\"\u003eStep 2: Clean up resources\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#linting-and-formatting\"\u003eLinting and Formatting\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#checking-code-style\"\u003eChecking Code Style\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#format-code-style\"\u003eFormat Code Style\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#fixing-code-style\"\u003eFixing Code Style\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#known-issues\"\u003eKnown Issues\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#currently-being-addressed\"\u003eCurrently Being Addressed\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#quick-installation\"\u003eQuick Installation\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#prerequisites-1\"\u003ePrerequisites\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#run-the-quick-script\"\u003eRun the Quick script\u003c/a\u003e\u003cbr\u003e\n    \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003cbr\u003e\n  \u003c/p\u003e\n\u003c/details\u003e\n\n## Project Progress\n\n\u003e [!WARNING]\n\u003e\n\u003e **Status:** Work in Progress (WIP)\n\u003e\n\u003e This project is currently under **active development**. Its structure,\n\u003e features, and content are subject to change **frequently and without notice**.\n\u003e At this time, **contributions are not being accepted**. Community\n\u003e contributions will be welcomed once the project reaches a more stable state.\n\n### To-Do List\n\n- [ ] Create a final prerelease checklist.\n\n#### Client\n\n- [ ] Pending tasks (to be defined).\n\n#### Docker\n\n- [ ] Pending tasks (to be defined).\n\n#### Server\n\n- [ ] Pending tasks (to be defined).\n\n#### Documentation\n\n- [ ] Remove the **Caution** notice once the project reaches a stable phase.\n- [ ] Create an `ROADMAP.md`\n- [ ] Update the `CHANGELOG.md`\n\n\u003cbr /\u003e\n\n## Features\n\nThis template offers the following key features:\n\n- **npm Workspaces**: Efficiently manages multi-package repositories.\n- **Automated Project Setup**: Includes an initialization script to automate the\n  initial configuration and setup process.\n- **Modular Workspaces**:\n  - **Frontend (Client)**: Built with **Vue.js 3**, **Vite**, and\n    **TypeScript**. Includes **Pinia** for state management and **Vue Router**\n    for routing.\n  - **Backend (Server)**: A lightweight **Express.js** server.\n- **Tooling**: Comes with **ESLint** and **Prettier** for code consistency, and\n  **Vitest** and **Playwright** for comprehensive testing.\n- **Docker Integration**: Containerized development and deployment with\n  **Docker** and **Docker Compose**.\n- **Multi-Stage Dockerfile**: Optimized `Dockerfile` for efficient builds and\n  smaller images.\n- **Environment-Specific Docker Compose**: Separate configurations for build,\n  test, and production environments.\n- **Easy Setup**: Quickly get started with full-stack **JavaScript**\n  development.\n- **Minimal Config**: Designed for fast, straightforward project initialization.\n\n\u003cbr /\u003e\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n- [Git](https://git-scm.com/downloads) (version: 2.50.0 or higher recommended)\n- [Node.js](https://nodejs.org/en/download/) (version: 22.17.0 or higher\n  recommended)\n- [npm](https://www.npmjs.com/get-npm) (version: 10.9.0 or higher recommended)\n- [Docker Desktop](https://www.docker.com/products/docker-desktop/) (includes\n  **Docker Engine** and **Docker Compose**)\n\n### Using this Template\n\nTo initialize a new project based on this template, follow these steps.\n\n\u003e [!NOTE]\n\u003e\n\u003e These steps are for creating a **new project**. If you want to contribute to\n\u003e this template itself, please see the [Contributing](#contributing) section.\n\n#### Step 1: Clone the repository\n\nOpen your terminal and run the following command:\n\n```bash\ngit clone https://github.com/homelab-alpha/npm-workspaces-template.git\n```\n\n#### Step 2: Navigate to the project directory\n\nChange into the newly cloned project directory:\n\n```bash\ncd npm-workspaces-template\n```\n\n#### Step 3: Initialize the project\n\n\u003e [!CAUTION]\n\u003e\n\u003e The `init.sh` script is designed exclusively for **Linux** environments.\n\u003e Support for **macOS** and **Windows** is planned for a future release.\n\nRun the `init.sh` script to prepare the npm workspaces for your new project.\nThis script handles the initial setup, including cleaning up template-specific\nfiles and configuring the project for use.\n\n```bash\n./scripts/init.sh\n```\n\nThis script will guide you through the following:\n\n- **Removing existing Git history**: The `.git` directory will be removed to\n  dissociate the new project from the template's Git history.\n- **Setting up a new Git repository** (Optional): You will be prompted to\n  initialize a new Git repository for your project.\n- **Updating project details**: The script will assist you in updating relevant\n  project details in the root, client and server `package.json` and Docker\n  Compose files.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e **Essential: Verify Project Setup**: After initialization, it is crucial to\n\u003e review and **if necessary** adjust project documentation and configuration\n\u003e files to align with your specific project requirements.\n\n\u003e [!NOTE]\n\u003e\n\u003e Install the [Renovate GitHub App](https://github.com/apps/renovate) if not\n\u003e already installed. It will help you keep your dependencies up to date\n\u003e automatically.\n\n#### Step 4: Install project dependencies\n\nFrom the root directory of your project, install all required dependencies:\n\n```bash\nnpm install\n```\n\n\u003cbr /\u003e\n\n## Development\n\nOnce the project is set up, you can use the following commands for development,\ntesting, and deployment.\n\n### Local Development (npm Only)\n\nTo run the project directly on your machine:\n\n#### Step 1: Start the development servers\n\nThis command will start both the client (**Vite**) and server (**Express.js**)\nin development mode.\n\n```bash\nnpm run dev\n```\n\n#### Step 2: Access the application\n\nThe application should be accessible in your web browser at\n[http://localhost:5173](http://localhost:5173).\n\n\u003cbr /\u003e\n\n## Docker and Docker Compose\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e The provided Docker configurations (`compose.build.yml`, `compose.prod.yml`,\n\u003e `compose.test.yml`, and `Dockerfile`) are designed primarily for **local\n\u003e development and testing**. Additional modifications may be necessary for a\n\u003e full production deployment.\n\nTo get the project running locally using **Docker** and **Docker Compose**,\nfollow these steps:\n\n### Building and Running the Application\n\nFollow the steps below to build Docker images and run the application in a local\nproduction-like environment.\n\n#### Step 1: Build Docker Images\n\nUse the build configuration file to create the necessary images:\n\n```bash\ndocker compose --file docker/compose.build.yml build\n```\n\n#### Step 2: Start the Application\n\nStart the production containers using:\n\n```bash\ndocker compose --file docker/compose.prod.yml up\n```\n\nTo run the containers in the background (detached mode), use:\n\n```bash\ndocker compose --file docker/compose.prod.yml up --detach\n```\n\n#### Step 3: Access the Application\n\nOnce the containers are running, access the app at:\n\n[http://localhost:5173](http://localhost:5173)\n\n#### Step 4: Stop the Application and remove the container and network\n\nTo stop containers running in the **foreground**, press `CTRL+C`, then run:\n\n```bash\ndocker compose --file docker/compose.prod.yml down\n```\n\nFor containers running in **detached mode**, just run:\n\n```bash\ndocker compose --file docker/compose.prod.yml down\n```\n\nThis command stops and removes the container and network, ensuring a clean state\nafter use.\n\n### Running Tests with Docker Compose\n\nTo execute the test suite inside a **Docker** container:\n\n#### Step 1: Build the Docker image and run the tests in a container\n\n```bash\ndocker compose --file docker/compose.test.yml up --build --abort-on-container-exit\n```\n\nThis command will build the test image, run the test command (e.g.,\n`npm run test --workspace=server`), and exit once the tests are complete.\n\n#### Step 2: Clean up resources\n\nAfter the tests are completed, run the following command to remove the container\nservice (`npm-workspaces-template-test`) and its network.\n\n```bash\ndocker compose --file docker/compose.test.yml down\n```\n\nThis command stops and removes the container and network that were created by\nthe `up` command, ensuring a clean state.\n\n\u003cbr /\u003e\n\n## Linting and Formatting\n\nThis project uses **ESLint** for code linting, **Prettier** for code and\nMarkdown file linting.\n\n### Checking Code Style\n\nTo check for any linting or formatting issues across all workspaces and Markdown\nfiles:\n\n```bash\nnpm run format:check\n```\n\nThis command will run `format:check` for both the `client` and `server`\nworkspaces, and then `markdown:format:check` for all Markdown files.\n\n### Format Code Style\n\nTo automatically fix any linting and formatting issues across all workspaces and\nMarkdown files:\n\n```bash\nnpm run format\n```\n\nThis command will run `format` for the `client` and `server` workspaces, and\n`markdown:format` for all Markdown files.\n\n### Fixing Code Style\n\nTo automatically fix most linting and formatting issues:\n\n```bash\nnpm run lint\n```\n\nThis command will run `lint` for both the `client` and `server` workspaces, and\nthen `markdown:lint` for all Markdown files.\n\n\u003cbr /\u003e\n\n## Contributing\n\nThis repository serves as a template. If you want to contribute to the\ntemplate's development, please follow these steps:\n\n1. Fork the repository\n2. Clone your forked repository:\n   `git clone https://github.com/your-username/npm-workspaces-template.git`\n3. Install the dependencies `npm ci`\n4. Create a new branch for your feature or bugfix\n5. Submit a pull request from your branch to our `main` branch\n\nFor more detailed guidelines, please refer to the\n[CODE OF CONDUCT](https://github.com/homelab-alpha/npm-workspaces-template/blob/main/CODE_OF_CONDUCT.md),\n[CONTRIBUTING](https://github.com/homelab-alpha/npm-workspaces-template/blob/main/CONTRIBUTING.md),\nand\n[Code Style and Standards Guide](https://github.com/homelab-alpha/npm-workspaces-template/blob/main/CODE_STYLE_AND_STANDARDS_GUIDES.md)\nfiles.\n\n\u003cbr /\u003e\n\n## Known Issues\n\nThe Homelab-Alpha team strives to provide a seamless experience. Below, we\ndocument any known bugs, limitations, or issues you might encounter while using\nthis template. This section will be regularly updated to reflect the latest\ninformation.\n\n### Currently Being Addressed\n\nNo known issues at this time.\n\nIf you discover a bug or experience an issue not listed here, please help us\nimprove by\n[opening an issue on GitHub](https://github.com/homelab-alpha/npm-workspaces-template/issues/new/choose).\n\n\u003cbr /\u003e\n\n## Quick Installation\n\nGet started in seconds by running the command below in your terminal. This\nsingle command streamlines the setup process for you.\n\nThis will:\n\n- Clone the **npm Workspaces Template** repository.\n- Run the included `init.sh` initialization script.\n- Re-evaluate the shell's current directory to reflect any changes made by the\n  initialization script.\n- Install all npm dependencies.\n- Launch **Visual Studio Code** in the project folder.\n- Open your default browser to [http://localhost:5173](http://localhost:5173).\n- Start the development servers for both the **client** and the **server** side.\n\n### Prerequisites\n\nYou need the following installed for the quick installation:\n\n- [Git](https://git-scm.com/downloads) (version: 2.50.0 or higher recommended)\n- [Node.js](https://nodejs.org/en/download/) (version: 22.17.0 or higher\n  recommended)\n- [npm](https://www.npmjs.com/get-npm) (version: 10.9.0 or higher recommended)\n- [Visual Studio Code](https://code.visualstudio.com/Download) (Optional)\n\n### Run the Quick script\n\nOpen your terminal and copy and paste the following code:\n\n```bash\n#!/usr/bin/env bash\n\n# Strict Mode\n# -e: Exit immediately if a command exits with a non-zero status.\n# -o pipefail: The return value of a pipeline is the status of the last command\n#    to exit with a non-zero status, or zero if no command exited with a\n#    non-zero status.\n# -u: Treat unset variables as an error when substituting.\n\nset -eo pipefail\nset -u\n\n# --- Initial Setup ---\necho # Blank line for spacing\necho \"Cloning repository...\"\ngit clone https://github.com/homelab-alpha/npm-workspaces-template.git\ncd npm-workspaces-template\n\necho # Blank line for spacing\necho \"Running initialization script...\"\n./scripts/init.sh\n# Re-evaluate shell's current directory to apply changes from init.sh\ncd .\n\n# --- OS-specific Command Setup ---\n# Set commands based on the detected Operating System to ensure compatibility.\nif [[ \"$OSTYPE\" == \"darwin\"* ]]; then # macOS\n  SLEEP_CMD=\"sleep 5\"\n  OPEN_CMD=\"open\"\nelif [[ \"$OSTYPE\" == \"msys\" || \"$OSTYPE\" == \"win32\" ]]; then # Windows\n  SLEEP_CMD=\"timeout /T 5 /NOBREAK \u003enul\"\n  OPEN_CMD=\"start\"\nelse # Linux\n  SLEEP_CMD=\"sleep 5\"\n  OPEN_CMD=\"xdg-open\"\nfi\n\n# --- Execution Sequence ---\necho # Blank line for spacing\necho \"Installing npm dependencies...\"\nnpm install\n\n# Launch Visual Studio Code if the 'code' command is available.\nif command -v code \u0026\u003e /dev/null; then\n  echo # Blank line for spacing\n  echo \"Launching Visual Studio Code...\"\n  code .\nelse\n  echo # Blank line for spacing\n  echo \"Visual Studio Code 'code' command not found, skipping.\"\n  eval \"$SLEEP_CMD\"\nfi\n\necho # Blank line for spacing\necho \"Opening application in browser at http://localhost:5173...\"\n$OPEN_CMD http://localhost:5173/\neval \"$SLEEP_CMD\"\n\necho # Blank line for spacing\necho \"Starting development server... (Press Ctrl+C to stop)\"\nnpm run dev\n```\n\n\u003e [!TIP]\n\u003e\n\u003e After completing the **Quick Installation**, your browser should automatically\n\u003e open to the application. You may need to refresh the page (using **F5** or\n\u003e **Ctrl+R**) to ensure the latest content is loaded; or if you encounter any\n\u003e issues, please open your web browser and navigate to\n\u003e [http://localhost:5173](http://localhost:5173) manually.\n\n\u003e [!NOTE]\n\u003e\n\u003e When using the **Quick Installation**, you may encounter extra logs at\n\u003e `Opening application in browser at http://localhost:5173...` in the terminal.\n\u003e These logs are from the browser and may include initial connection errors or\n\u003e additional messages when attempting to open `http://localhost:5173`. This is\n\u003e expected behavior, as the development server may not have fully started yet.\n\n\u003cbr /\u003e\n\n## License\n\nThis project is licensed under the **Apache License 2.0**. See the\n[LICENSE](https://github.com/homelab-alpha/npm-workspaces-template/blob/main/LICENSE)\nfile for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomelab-alpha%2Fnpm-workspaces-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomelab-alpha%2Fnpm-workspaces-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomelab-alpha%2Fnpm-workspaces-template/lists"}