- Added package.json to manage development scripts. - Updated restart-services.ps1 to call the new dev script for starting services. - Refactored start-admin.ps1, start-backend.ps1, start-frontend.ps1, and start-mcp.ps1 to utilize the dev script for starting respective services. - Enhanced stop-services.ps1 to improve process termination logic by matching command patterns.
2.1 KiB
2.1 KiB
termi-blog
Monorepo for the Termi blog system.
Structure
.
├─ admin/ # React + shadcn admin workspace
├─ frontend/ # Astro blog frontend
├─ backend/ # Loco.rs backend APIs and legacy Tera admin
├─ mcp-server/ # Streamable HTTP MCP server for articles/categories/tags
├─ .codex/ # Codex workspace config
└─ .vscode/ # Editor workspace config
Run
Recommended
From the repository root:
npm run dev
This starts frontend + admin + backend in a single Windows Terminal window with multiple tabs.
Common shortcuts:
npm run dev:mcp
npm run dev:frontend
npm run dev:admin
npm run dev:backend
npm run dev:mcp-only
npm run stop
npm run restart
PowerShell entrypoint
If you prefer direct scripts, use the single root entrypoint:
.\dev.ps1
.\dev.ps1 -WithMcp
.\dev.ps1 -Only frontend
.\dev.ps1 -Only admin
.\dev.ps1 -Only backend
.\dev.ps1 -Only mcp
If you want a single service to be opened as a new Windows Terminal tab instead of running in the current shell:
.\dev.ps1 -Only frontend -Spawn
Legacy aliases are still available and now just forward to dev.ps1:
.\start-frontend.ps1
.\start-backend.ps1
.\start-admin.ps1
.\start-mcp.ps1
Frontend
cd frontend
npm install
npm run dev
Admin
cd admin
npm install
npm run dev
Backend
cd backend
$env:DATABASE_URL="postgres://postgres:postgres%402025%21@10.0.0.2:5432/termi-api_development"
cargo loco start 2>&1
MCP Server
.\dev.ps1 -Only mcp
Default MCP endpoint:
http://127.0.0.1:5151/mcp
Default local development API key:
termi-mcp-local-dev-key
The MCP server wraps real backend APIs for:
- Listing, reading, creating, updating, and deleting Markdown posts
- Listing, creating, updating, and deleting categories
- Listing, creating, updating, and deleting tags
- Reading and updating public site settings
- Rebuilding the AI index
Repo Name
Recommended repository name: termi-blog