This is the Strapi CMS for managing content that will be rendered on the Interledger Developers Portal. The CMS automatically generates MDX files that are read by the Astro site.
- Press Management: Create and manage press releases, media mentions, and announcements
- Automatic MDX Generation: Content is automatically written to MDX files when published
- Draft & Publish Workflow: Content can be drafted and published when ready
- SQLite Database: Lightweight database for easy development and deployment
- Node.js >= 18.0.0 <= 22.x.x
- npm >= 6.0.0
The dependencies should already be installed. If not, run:
cd cms
npm installThe CMS is configured via environment variables in .env. Key settings:
PORT: CMS runs on port 1337 (default)DATABASE_CLIENT: Using better-sqlite3MDX_OUTPUT_PATH: Where MDX files are written (../src/content/press)
Start the development server:
cd cms
npm run developThe Strapi admin panel will be available at: http://localhost:1337/admin
On first run, you'll be prompted to create an admin user.
To build for production:
cd cms
npm run build
npm run startThe Press Item content type includes the following fields:
- Title (required): Headline of the press item
- Description (required): Short description or excerpt
- Publish Date (required): When the item was published
- Slug (required, auto-generated): URL-friendly identifier
- Publication (optional): Name of the publication (e.g., "TechCrunch")
- Publication Logo (optional): URL to the publication's logo image
- External URL (optional): Link to the external article
- Content (optional): Full article content (rich text)
- Featured (boolean): Whether to feature this item prominently
- Category (enum): Type of press item
press-release: Official press releasesmedia-mention: Coverage by external mediaannouncement: General announcements
When you publish or update a Press Item in Strapi:
- The lifecycle hooks in
src/api/press-item/content-types/press-item/lifecycles.tsare triggered - The content is converted to MDX format with frontmatter
- An MDX file is created/updated in
../src/content/press/with the slug as the filename - The Astro site automatically picks up the new content
MDX files are named using the slug: {slug}.mdx
Example: If slug is interledger-launches-new-platform, the file will be interledger-launches-new-platform.mdx
When you unpublish a Press Item in Strapi, the corresponding MDX file is automatically deleted.
The generated MDX files are consumed by the Astro site at /press. The press page:
- Displays all published press items sorted by date
- Shows featured items in a prominent card grid
- Lists regular items in a clean timeline format
- Includes a "Featured In" section with publication logos
- Start the CMS:
cd cms && npm run develop - Access Admin Panel: http://localhost:1337/admin
- Create Content: Add new Press Items through the UI
- Publish: When ready, publish the content
- View on Site: The content automatically appears at
/developers/press
cms/
├── config/ # Strapi configuration files
│ ├── admin.ts
│ ├── database.ts
│ ├── middlewares.ts
│ └── server.ts
├── src/
│ ├── api/
│ │ └── press-item/ # Press Item API
│ │ ├── content-types/
│ │ │ └── press-item/
│ │ │ ├── schema.json
│ │ │ └── lifecycles.ts # MDX generation logic
│ │ ├── controllers/
│ │ ├── routes/
│ │ └── services/
│ └── index.ts
├── .env # Environment variables
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md
- Rich Text Content: The content field supports rich text. It will be converted to markdown when generating MDX files.
- External Links: If you provide an
externalUrl, the press item will link to the external article instead of a local page. - Featured Items: Use the featured flag to highlight important press coverage.
- Publication Logos: For best results, use square logos with transparent backgrounds.
- Slugs: Slugs are auto-generated from the title but can be customized. Ensure they're unique.
- Check that the Press Item is published (not just saved as draft)
- Verify the
MDX_OUTPUT_PATHin.envpoints to the correct directory - Check file permissions on the
src/content/pressdirectory - Look for errors in the Strapi console output
The SQLite database is stored in .tmp/data.db. To reset:
rm -rf cms/.tmpThen restart Strapi. You'll need to create a new admin user.
- The
.envfile contains secrets - never commit it to version control - Change the default secrets in
.envbefore deploying to production - The CMS is configured to allow CORS from
localhost:1103(the Astro dev server) - Update
FRONTEND_ORIGINSin.envandconfig/middlewares.tsfor production
For issues related to:
- Strapi CMS: Check Strapi Documentation
- Content Issues: Check the Strapi console logs
- Astro Integration: Check the main README in the repository root