MCPcopy Index your code
hub / github.com/Lambdo-Labs/payloadcms-astro-template

github.com/Lambdo-Labs/payloadcms-astro-template @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
15 symbols 36 edges 13 files 1 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Payload CMS & Astro Template

This is a template for Payload CMS and Astro It is a simple blog template with a few pages and a blog post collection. It is fully typed with TypeScript.

Getting Started

  1. Clone this repository
  2. Run npm install
  3. set MONGODB_URI in backend/.env with a MongoDB connection string (run locally or use a service like MongoDB Atlas)
  4. Run cd backend && npm run dev to start the development server for payload
  5. In another terminal run cd frontend && npm run dev to start the development server for astro

Modify the Template

After changing any of the payload config in backend/src/payload.config.ts you will need to regenerate the types for the frontend. To do this, run npm run generate:types in the backend directory. Then add fetch functions with the new types to frontend/src/api.ts

Deploying

To deploy this template, there are a couple of options.

Deploying separately

The frontend and backend can be deployed separately. The frontend can be deployed to any static hosting service like Netlify or Vercel or CloudflarePage. The backend can be deployed to any Node.js hosting service like Heroku or Vercel.

Deploying together

The frontend and backend can be deployed together. Astro can be run as a node service with SSR enabled and can be called from the backend in the backend/src/server.ts file.

Documentation

Extension points exported contracts — how you extend this code

PayloadCollection (Interface)
(no doc)
frontend/src/types.ts
Config (Interface)
(no doc)
backend/src/payload-types.ts
CustomTypes (Interface)
(no doc)
frontend/src/types.ts
Category (Interface)
(no doc)
backend/src/payload-types.ts
Post (Interface)
(no doc)
backend/src/payload-types.ts
User (Interface)
(no doc)
backend/src/payload-types.ts
Tag (Interface)
(no doc)
backend/src/payload-types.ts

Core symbols most depended-on inside this repo

isObject
called by 3
backend/src/fields/slug.ts
format
called by 2
backend/src/fields/slug.ts
apiFetch
called by 1
frontend/src/api.ts
formatSlug
called by 1
backend/src/fields/slug.ts
deepMerge
called by 1
backend/src/fields/slug.ts
slug
called by 1
backend/src/fields/slug.ts
getPosts
called by 0
frontend/src/api.ts

Shape

Interface 8
Function 7

Languages

TypeScript100%

Modules by API surface

backend/src/payload-types.ts5 symbols
backend/src/fields/slug.ts5 symbols
frontend/src/types.ts2 symbols
frontend/src/api.ts2 symbols
backend/src/rich-text-export.ts1 symbols

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add payloadcms-astro-template \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page