blazejsewera / pocketbase-mantine-template

Full-stack application template using Pocketbase as backend and Vite + React + Mantine combo as frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pocketbase, Vite, React, and Mantine template

Full-stack application template using Pocketbase as backend, and Vite + React + Mantine combo as frontend.

Cheat sheet

  • make — download all dependencies (see Workspace setup below);
  • make -j2 d — full-stack development servers;
  • make t — ui component unit tests;
  • make tu — ui component update Jest snapshots;
  • make -j2 b — build ui/dist and Pocketbase simultaneously;
  • make s — run Pocketbase serving ui/dist under /;
  • make v — run only frontend Vite development server;
  • make cp — copies example config to a working copy and links it to ui;
  • make cc — cleans all working config files;
  • make c — clean all dist files (ui/dist and ./pocketbase).

Prerequisites

Quick start

Workspace setup

After installing prerequisites, you have to set up the workspace. The following commands will download a proper Node.js, enable it in the workspace, install Yarn, and download all the dependencies, both for ui and Go.

nvm install  # if using nvm
nvm use      # if using nvm
npm -g i yarn
make

Other commands

The following command will open a dev Vite server with hot reload, and a Pocketbase server alongside it.

make -j2 dev

or make -j2 d for short.

The following will only build and run the Pocketbase executable.

make pb

The following will build the static dist Vite package, and run a Pocketbase server that serves it under the root path (/).

make start

or make s for short.

It is an equivalent of:

make build pb

or make b pb for short.

The following command will unit test the ui components using Jest.

make test

or make t for short.

To update the snapshots when running component unit tests, run:

make test-update

or make tu for short.

To copy an example config file (app.config.example.json to app.config.json), which contains the backend (Pocketbase) host, run:

make copy-example-config

or make cp for short.

To clean all working config files, run:

make clean-config

or make cc for short.

To clean all dist files, i.e.: ui/dist and ./pocketbase, run:

make clean

or make c for short.

Credentials

Field Value
Email admin@sewera.dev
Pass panda-blog-scorer

Default URLs

The Pocketbase URL can be configured in app.config.json. Both backend and frontend will respect this configuration. See also make copy-example-config recipe.

Further reading

About

Full-stack application template using Pocketbase as backend and Vite + React + Mantine combo as frontend

License:MIT License


Languages

Language:TypeScript 56.1%Language:Go 19.4%Language:Makefile 17.4%Language:JavaScript 3.8%Language:HTML 3.3%