Deployment Process
Relevant source files
The following files were used as context for generating this wiki page:The Quant application is a modern, client-side CVSS score calculator built with the Astro web framework. As a static site, its deployment process is centered around building the static assets (HTML, CSS, JS) and hosting them on a web server. All scoring logic is executed in the user's browser, meaning there is no server-side backend for the core application functionality.
The official website is updated automatically with each new release, which implies a Continuous Integration/Continuous Deployment (CI/CD) pipeline. However, the specific configuration for this automated process is not detailed in the provided source files. This document outlines the defined steps for building the application and previewing it locally, which are the essential prerequisites for any deployment.
Sources: README.md:15, 68, 88-89, src/components/FAQAccordion.tsx:33-36, package.json:11, 21
Project Setup
Before the application can be built or deployed, the development environment must be set up. This involves cloning the repository and installing the necessary dependencies.
- Clone the repository:
git clone https://github.com/cyberpath-HQ/Quant.git cd Quant - Install dependencies: The project uses
pnpmfor package management.pnpm install
This will install all dependencies listed in package.json, including the Astro framework and other required libraries.
Sources: README.md:90-95, package.json
Build and Preview Workflow
The process of preparing the application for deployment involves building the static site and then previewing it locally to ensure the build was successful.
This diagram illustrates the local build and preview workflow.
Sources: README.md:103-107, package.json:6-7
Building for Production
The production build is initiated using the pnpm build command. This command executes astro build, which compiles the application into a set of static files optimized for production.
The output of this process is placed in the ./dist/ directory at the root of the project. This directory contains all the HTML, CSS, JavaScript, and other assets needed to run the application.
Sources: README.md:105, package.json:6
Previewing the Production Build
After a successful build, the pnpm preview command can be used to verify the production site locally. This command starts a local web server that serves the contents of the ./dist/ directory. This allows developers to test the optimized, production version of the site before it is deployed to a live environment.
By default, the preview is accessible at http://localhost:4321.
Sources: README.md:106, package.json:7
Available Scripts
The package.json file defines several scripts for managing the application lifecycle. These are executed using pnpm.
| Command | Action |
|---|---|
pnpm dev | Starts the local development server at localhost:4321. |
pnpm build | Builds the production-ready static site to the ./dist/ directory. |
pnpm preview | Previews the local production build before deployment. |
pnpm astro ... | Runs Astro CLI commands directly. |
pnpm lint | Runs ESLint for code quality checks. |
Sources: package.json:4-9, README.md:102-108
Production Deployment
The README.md file states that the official website is "updated automatically with every new release". This strongly indicates the use of a CI/CD pipeline that likely triggers on pushes or merges to the main branch.
The core of this automated process would be to:
- Execute the
pnpm installandpnpm buildcommands in a clean environment. - Deploy the contents of the generated
./dist/directory to a static hosting provider.
While the exact implementation of this pipeline (e.g., GitHub Actions workflow files) is not present in the provided source files, the pnpm build command is the key step that produces the deployable artifact.
Sources: README.md:88-89