mikeyglitz/pantry-web
This hosts the frontend application for the Pocket Pantry application. The web frontend is developed using React in combination with Next.js to provide a seamless Progressive Web Application (PWA) experience that users can use to install the page to their phone as they would an app.
Configuration is provided through environment variables either through using .env
files
or by providing the environment through other means
(such as the -e
argument in docker run
or through Kubernetes deployment environment)
Variable | Description |
---|---|
AUTH_URL | URL of the authentication server (i.e. https://example.com/auth) |
AUTH_REALM_NAME | Realm name to authenticate against |
AUTH_SECRET | Secret value used to hash JWTs |
AUTH_CLIENT_ID | Authentication client ID |
AUTH_CLIENT_SECRET | Authentication client secret |
GRAPHQL_ENDPOINT | Base URL to the backend GraphQL API |
DEFAULT_PAGE_SIZE | Number - Default page size to page search results as |
The project configured to be run inside of a virtual environment through use of the Visual Studio Code devcontainers. Assuming a developer has Visual Studio Code installed with the Remote:DevContainers extension installed, when the developer opens the project in Visual Studio Code, they will be presented with the option to reopen the project inside of a development container.
Should the developer opt to open the project in a devcontainer, Visual Studio code will then go about installing all the requisite IDE extensions and development tools.
Pocket Pantry is a web application built on top of Node.js. The project provides the following NPM scripts:
Script Name | Description |
---|---|
start | Starts the production server. This script is only used when build has been run |
build | Builds the production server |
lint | Lints the code for syntax correctness using ESlint |
test | Launches the Jest launcher to continuously execute unit tests |
test:ci | Launches the Jest launcher to run tests individually and terminate when tests are complete |
dev | Starts the development server at port 3000 |
docker pull mikeyglitz/pantry-web