• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
dcm31

dcm31

moiPosterImproved

Tool to manage moi.md files for Val Town content
Public
Like
moiPosterImproved
Home
Code
6
backend
2
frontend
2
shared
2
README.md
moi.md
testfile_1745875710738.txt
Branches
12
Pull requests
8
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
4/30/2025
Viewing readonly version of main branch: v55
View latest version
README.md

MoiPoster - Val Town moi.md Manager

A tool to create and manage moi.md files for your Val Town vals.

Features

  • View all your vals
  • Edit and preview moi.md files with a built-in markdown editor
  • Auto-detect HTTP endpoints for vals
  • Field-by-field editing with improved input handling
  • Set priority tiers and custom tabs for build.moi integration
  • Exclude vals from the main Posts tab while keeping them in custom tabs
  • Automatic username population for author field
  • Preview live markdown changes
  • Filter by privacy settings (public, private, unlisted)
  • Automatically generate moi.md content based on val metadata

Structure

The project has the following components:

  • backend/ - Server-side code
    • index.ts - Main API routes using Hono
    • moiProcessor.ts - Utility functions for moi.md processing
  • frontend/ - Client-side code
    • components/ - React components
      • App.tsx - Main application component
      • Editor.tsx - Markdown editor component
      • ItemList.tsx - Component for displaying vals
      • MarkdownPreview.tsx - Markdown preview component
      • MoiEditor.tsx - Field-by-field editor with support for tier, tabs, and excludeFromPosts
    • index.tsx - Frontend entry point
  • shared/ - Shared code
    • types.ts - TypeScript type definitions
    • generators.ts - Functions to generate moi.md content

Usage

Visit the live endpoint to use the application.

API Endpoints

  • GET /api/vals - Get all vals (supports privacy filter)
  • GET /api/vals/:valId/moi - Get moi.md for a val
  • POST /api/vals/:valId/moi - Create/update moi.md for a val

moi.md Format

The generated moi.md files follow this format:

--- title: "Val Name" description: "Val description" imageUrl: "https://example.com/image.jpg" url: "https://val.town/..." author: "username" tags: ["val-town", "tag1", "tag2"] tier: 1.5 tabs: ["Projects", "Tutorials"] excludeFromPosts: true --- ## About Val description ## Usage ```typescript // Import this val import { valName } from "https://esm.town/v/username/valName"; // Example usage // ...

Notes

  • Created: YYYY-MM-DD
  • Last updated: YYYY-MM-DD
  • Type: script
  • Privacy: public

Advanced Configuration

  • Priority Tier: 1.5 (lower values appear first)
  • Custom Tabs: Projects, Tutorials
  • Exclude From Posts: Yes (controls visibility in main Posts tab)

## Enhanced Schema Support

This version of MoiPoster adds support for extended schema fields:

### Priority Tier

The `tier` field allows you to set the display priority in build.moi:

- Lower values (e.g., 1) appear before higher values (e.g., 3)
- Decimal values are supported (e.g., 0.5, 1.3, 2.7)
- Items with the same tier value maintain their original order

### Custom Tabs

The `tabs` field allows you to assign vals to custom tab categories:

- Vals can belong to multiple tabs by listing multiple tab names
- Tabs appear between the "Posts" and "Code" navigation items in build.moi
- Each tab contains only content explicitly assigned to it

### Exclude From Posts

The `excludeFromPosts` field lets you control visibility in the main Posts tab:

- When set to `true`, the val won't appear in the main Posts tab
- The val will still appear in any custom tabs specified in the `tabs` field
- The val will always appear in the Code tab regardless of this setting

## Integration with build.moi

This tool is designed to work seamlessly with the [build.moi](https://www.val.town/x/dcm31/buildDotMoi) project, which provides a modern showcase for Val Town profiles.

When you create moi.md files with this tool, they'll automatically be displayed in the build.moi interface, organized according to your tier and tabs configuration.

## License

MIT
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.