Skip to content

Resources (UI)

The UI lives under src/resources/ and is served by the framework's Vite dev server with automatic API, WebSocket, and storage proxy.

Framework agnostic

The nexgen backend is UI-agnostic. The default template ships with Vue 3 + Pinia + Vue Router, but you can swap it for any Vite-compatible framework:

FrameworkPluginNotes
Vue 3 (default)@vitejs/plugin-vueShips with the template
React@vitejs/plugin-reactReplace plugin, rewrite main.tsx + App.tsx
Preact@vitejs/plugin-react (with React.createElement)Lightweight React alternative
Solidvite-plugin-solidJSX with fine-grained reactivity
Svelte@sveltejs/vite-plugin-svelte.svelte components
Astro@astrojs/vite-plugin-astroStatic-first, islands architecture

What to change

Only two files are framework-specific:

  1. vite.config.ts — swap @vitejs/plugin-vue for your framework's plugin
  2. src/main.ts — rewrite the entry point for your framework

Everything else (proxy, build output, aliases, __SOCKET_ENABLED__ define) stays the same. The API layer, auth, storage, and all backend services are consumed via HTTP — they don't care what UI framework you use.

Project structure

src/resources/
├── index.html              # HTML shell
├── vite.config.ts          # Vite dev server & build config
├── src/
│   ├── main.ts             # App entry — mounts Vue with all plugins
│   ├── App.vue             # Root component (<router-view />)
│   ├── plugins/            # Vue plugins (gum, pulse, dialog, axios, routeProgress, browserDetect)
│   ├── router/             # Vue Router configuration & guards
│   ├── stores/             # Pinia stores (auth, admin-ui)
│   ├── composables/        # Shared composable functions (useAuth)
│   ├── layouts/            # Page layouts (dashboard, auth)
│   ├── pages/              # Route-level page components
│   ├── components/         # Reusable UI components
│   ├── helpers/            # Utility functions (nformatter, utils)
│   └── assets/             # SCSS theme, CSS, images

Quick reference

PageWhat it covers
Entry Pointmain.ts, App.vue, index.html, plugin registration order
Vite ConfigDev server proxy, aliases, build output, SCSS options
RouterRoute definitions, auth guards, meta flags, route progress
PagesPage components, dashboard & auth examples
LayoutsDashboard layout (header, sidebar, footer) and auth layout
PluginsGum, Pulse, Dialog — dedicated guides with full API reference
StoresAuth store and admin-ui Pinia store
ComposablesuseAuth composable
ComponentsDataTable, Select, Datepicker, Button, Input, Modal, Toast, and more
HelpersNumber formatting and utility functions

Released under the MIT License.