Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM/llms.txt

Use this file to discover all available pages before exploring further.

SEAM is a vanilla JavaScript SPA served by a lightweight Node.js HTTP server — there is no bundler or build step required for JavaScript. The only build process you need to run is the Tailwind CSS compilation, which can run in watch mode alongside the server in a second terminal.

Prerequisites

Before you start, make sure you have the following in place:
  • Node.js 18 or later — the --watch flag used by the dev script requires Node 18+.
  • A running backend API — SEAM expects a REST API at http://localhost:3001/api/v1 by default. Start your backend server before opening the app.

Installing dependencies

Clone the repository and install the dev dependencies (Tailwind CSS, PostCSS, and Nodemon):
npm install

NPM scripts

All available scripts are defined in package.json:
ScriptCommandPurpose
startnode server.jsRun the production-like server on port 3000, no auto-restart
devnode --watch server.jsRun the server with Node’s built-in file watcher; restarts on any .js change
dev:watchnode --watch server.jsAlias for dev — identical built-in watch behaviour
dev:nodemonnodemon server.jsRun the server with Nodemon (watches server.js and js/**/*.js)
build:cssnode build-tailwind.mjsOne-shot Tailwind CSS build — reads css/tailwind-base.css, writes css/tailwind.css
build:css:watchtailwindcss -i ./css/tailwind-base.css -o ./css/tailwind.css --watchRebuild css/tailwind.css automatically on every template change

Running for development

The recommended development workflow uses two terminals running in parallel — one for CSS watching and one for the server.
1

Start the Tailwind CSS watcher

Open your first terminal and start the CSS watcher. It will rebuild css/tailwind.css every time you change a Tailwind class in any HTML or JavaScript file:
npm run build:css:watch
You should see Tailwind confirm it is watching. Leave this terminal open.
2

Start the development server

Open a second terminal and start the Node.js server with the file watcher:
npm run dev
The server starts on port 3000. Open http://localhost:3000 in your browser.
3

Open the app

Navigate to http://localhost:3000. The built-in server handles all SPA routing by falling back to index.html for any path without a file extension, so hash-based navigation (#/home, #/usuarios, etc.) works out of the box.
Never open index.html directly in your browser using the file:// protocol. SEAM uses native ES Modules (type: "module" in package.json), which browsers block when loaded from the filesystem. Always use the Node.js server or another local HTTP server.

Changing the API base URL

SEAM reads the backend URL from a single file. Open js/config/api.js and update the API_BASE constant to match your backend:
js/config/api.js
export const API_BASE = 'http://localhost:3001/api/v1';
Change the value and save the file — the dev script will restart the server automatically, and all ApiClient calls will use the new base URL immediately.

Changing the server port

The port is defined as a constant at the top of server.js:
server.js
const PORT = 3000;
Update PORT to any available port and restart the server. Remember to update any backend CORS configuration if it whitelists the frontend origin explicitly.

One-shot CSS build

If you only need to compile CSS once (for example, before a deployment), run:
npm run build:css
build-tailwind.mjs uses PostCSS with @tailwindcss/postcss to process css/tailwind-base.css and write the output to css/tailwind.css. On success it prints:
✓ CSS compiled successfully to ./css/tailwind.css

Build docs developers (and LLMs) love