Skip to content

Latest commit

 

History

History
100 lines (67 loc) · 3.45 KB

README.md

File metadata and controls

100 lines (67 loc) · 3.45 KB

OpenShock Frontend

Documentation GitHub license GitHub Releases GitHub Sponsors Discord

master Build Status

This is the frontend for the OpenShock project that interfaces with the OpenShock API.

Technologies

Typescript Vite SvelteKit shadcn-ui Tailwind CSS

Available Commands

  • pnpm i - Install dependencies
  • pnpm run dev - Start the development server
  • pnpm run build - Build the project
  • pnpm run preview - Preview the built project
  • pnpx openapi-generator-cli generate - Generate the API client

Setup

To get started with development, you will need to have Node.js and pnpm installed.

We recommend using a version manager like Volta to manage your Node.js versions.

Install Node.js and pnpm

Install on Linux:

curl https://get.volta.sh | bash

Install on Windows:

winget install Volta.Volta

Then you can install the required Node.js and pnpm version by running a single command in the repository root directory:

volta install node
volta install pnpm

Install dependencies and build project

With Node.js installed, you can run the following commands to get started:

pnpm i
pnpm run build

Running locally

Running the frontend locally is as simple as this:

pnpm run dev

Hosts redirect

If you do not have a hosts file config for your domain and try to run the project you will get the following example message:

Please ensure that local.openshock.app resolves to 127.0.0.1 in your hosts file

On macOS and Linux, you can do this by running the following command:
echo "127.0.0.1 local.openshock.app" | sudo tee -a /etc/hosts

On Windows, you can do this by running the following command in PowerShell as an administrator:
Add-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value "127.0.0.1 local.openshock.app"

Then restart your development server

This action is required because of cookie policy, once you have done this you should be set!

Try closing and re-opening your development environment or console to refresh its cached system config.

Support

You can support the openshock dev team here: Sponsor OpenShock