Frontend
The frontend is a SPA (Single Page Application) built with Vite, React and shadcn/ui. It uses DuckDB WASM to query interface to the data that is stored in the storage layer.
Running the frontend locally
To run the frontend locally, you can use the following command within the frontend
directory :
npm run dev
This will start a local Vite development server, and open the application in your default browser.
Building the frontend
To build the frontend, you can use the following command within the frontend
directory:
npm run build
This will create a production build of the frontend and save it in the dist
directory.
Or, you can use the OwnStats CLI in the installation directory as well (see stack build frontend):
ownstats stack build frontend
Deploying the frontend to AWS
You can sync the built frontend to the S3 Bucket and CloudFront distribution by running the following command:
ownstats stack sync frontend
This will deploy the frontend to the S3 Bucket and invalidate the CloudFront distribution.