agentleFS
flisk-shflisk-sh/flisk-skills/skills/flisk-frontend/SKILL.md

flisk-frontend

Skill4 starsChanged 34 days agoMITView on GitHub

Add and run a frontend (storefront, SPA, admin app) in a Flisk stack and work with what Flisk generates for it - nginx config, Vite configs, tsconfig, `.env.frontend.autogenerated`, `env.ts` and the typed `api-client.ts` that calls the stack's backend - plus base paths behind Traefik. Use when adding a web app to a stack or when a frontend build, route or API call fails. To choose between React, Vue, Next.js and the other frameworks, see flisk-build-runtimes.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Write the app in the service directory.

    line 16
  2. Very specific:

    Do not hand-edit generated nginx, Vite or tsconfig files.

    line 34
  3. Very specific:

    If bun run build says a .autogenerated/vite.config...

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend services

Workflow

  1. Scaffold it: flisk resource storefront --type frontend --stack shop --yes (React by default; --framework vue and others, see flisk-build-runtimes). --base-path /shop sets the path it is served under (basePath in service.json).
  2. Write the app in the service directory. Call the backend through the generated api-client.ts (or the URL exported by env.ts) instead of hard-coding a host.
  3. flisk up shop builds it and serves it through nginx behind Traefik. Take the URL from flisk networks.
  4. Change ports, dependencies or the base path in service.json; flisk up regenerates the files.

What Flisk generates in .autogenerated/

FilePurpose
nginx.autogenerated.confserves the built app and routes API requests
Dockerfile.app.autogeneratedbuilds the image for the local stack
vite.config.frontend.autogenerated.ts, vite.config.build.autogenerated.tsdev server and production build
tsconfig.autogenerated.json, tsconfig.docker.autogenerated.jsonhost and container TypeScript settings
.env.frontend.autogenerated, env.ts, api-client.ts, api-index.tsAPI URL and a preconfigured client

Next.js (--framework next) has no Vite config and no nginx: it runs next dev in development and the standalone server for production.

Guardrails

  • Do not hand-edit generated nginx, Vite or tsconfig files; flisk up refuses to start when they drift.
  • If bun run build says a .autogenerated/vite.config... file does not exist yet, run flisk up once to generate it.
  • List of generated files: docs/generated-files.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.