원클릭으로
create-example-app-with-integration
// This skill is used to create an example application for a web framework integration package and to test it with `mise test:examples`.
// This skill is used to create an example application for a web framework integration package and to test it with `mise test:examples`.
This skill is utilized when creating a web framework integration package. After examining the given framework, a feasibility assessment is conducted regarding the creation of an integration package. If implementation is feasible, the package is generated; if it is not possible, the rationale is provided to the user.
This skill should be used when adding new ActivityPub/JSON-LD vocabulary types to the @fedify/vocab package, defining new YAML vocabulary schema files, or updating existing vocabulary definitions in Fedify. Applies when implementing FEPs, extending ActivityStreams vocabulary, or adding third-party vocab types such as Mastodon extensions, Litepub types, or other fediverse vocabularies.
Look up a Fediverse Enhancement Proposal (FEP) and explain how to implement it with Fedify. Use when the user asks about a specific FEP by ID (e.g., FEP-8fcf, FEP-1b12) or wants to implement a fediverse standard in their Fedify application.
Help the user migrate Fedify code between versions. Use when the user needs to upgrade their Fedify version, fix breaking-change errors, or update deprecated API usage.
Fetch and explain Fedify documentation on a specific topic. Use when the user asks about Fedify API details, configuration options, or how a specific feature works. Fetches up-to-date docs from fedify.dev.
Guide the user through implementing an ActivityPub actor with Fedify. Use when the user needs to add or configure an actor dispatcher, set up key pairs, configure aliases, or handle actor-related requests.
| name | create-example-app-with-integration |
| description | This skill is used to create an example application for a web framework integration package and to test it with `mise test:examples`. |
| argument-hint | Provide the name of the web framework to create an example for. |
Follow these steps in order to create the example application and verify it works.
mise test:examplesTwo reference documents describe what the example must do and how it must look. Both are references only—do not create these files in the actual generated example app.
Defines the example's functional behavior. Consult it for:
getXForwardedRequest from x-forwarded-fetch.GET /, GET /users/…,
POST /post, POST /follow, POST /unfollow, GET /events, etc.)
with their expected request/response behavior./events endpoint keeps an open SSE
connection and broadcasts changes to the client.RequestContext to
bridge between the framework routing layer and the federation layer.src/federation.ts, src/store.ts) and the template files they are
based on (example/src/federation.ts,
example/src/store.ts).@logtape/logtape and src/logging.ts.Defines the example's visual presentation. Consult it for:
prefers-color-scheme detection.768px and mobile
adaptations.public/
(example/public/).Create an examples/framework/ app and write an example for the new
package. Copy the template files from example/ as-is and modify
as needed.
fedify-logo.svg rendering to pngUnless the framework itself prevents it, support both Deno
and Node.js environments. If Deno is supported, add a deno.json based on
example/deno.json; if Node.js is supported, add
package.json based on example/package.jsonc and
tsdown.config.ts. Depending on the supported environments, add the example
path to the workspace field in the root deno.json and to the packages
field in pnpm-workspace.yaml.
If the framework is backend-only and needs a frontend framework, and there is no natural pairing like solidstart-solid, use Hono.
If the framework does not have a prescribed entry point, use src/main.ts
as the application entry point. Define and export the framework app in
src/app.ts, then import and run it from the entry file. Import
src/logging.ts in the entry file to initialize @logtape/logtape.
When logging is needed, use the getLogger function from @logtape/logtape
to create a logger.
When configuring the example app server, disable host restrictions and allow all hosts so tunneled/public domains can access the app during development and tests.
Follow the specifications in ARCHITECTURE.md and DESIGN.md to implement the example. In particular:
src/app.ts per the “Middleware
integration” and “Reverse proxy support” sections of
ARCHITECTURE.md.src/federation.ts based on
example/src/federation.ts. Set up in-memory
stores in src/store.ts based on
example/src/store.ts.RequestContext as described
in the “Server-side data access” section.public/ directory (copy from
example/public/).mise test:examplesRegister the new example in examples/test-examples/mod.ts. Read the
comments above the example registry arrays in that file to determine
which array is appropriate and what fields are required. Follow the
patterns of existing entries.
Before running the tests, ensure that the tunneling service is usable.
The tests use the tunneling service pinggy.io to make the example app
accessible to the test suite. If the tunneling service is not usable,
the tests may never finish or may fail due to a connection error.
While developing the example, run only the new example to iterate quickly:
mise test:examples framework
where framework is the name field of the registered entry. Pass
--debug for verbose output if the test fails.
After the example is complete, run the full suite once to confirm nothing is broken:
mise test:examples
If the test:examples cannot be run, just run the server and test with curl:
curl -H "Accept: application/activity+json" http://localhost:0000/users/demo
Add keywords related to the framework in .hongdown.toml and cspell.json in
root path.
After implementation, run mise run fmt && mise check.
If there are lint or format errors, fix them and run the command again until
there are no errors.