Go to file
2024-03-11 13:27:55 -03:00
.husky Clone starter 2024-03-07 15:31:41 +01:00
.vscode Clone starter 2024-03-07 15:31:41 +01:00
apps Working Docker build 🎉 2024-03-11 13:27:55 -03:00
packages/eslint-config-custom Clone starter 2024-03-07 15:31:41 +01:00
.dockerignore Attempt at docker building 2024-03-08 13:06:23 -03:00
.env.example Clone starter 2024-03-07 15:31:41 +01:00
.eslintrc.cjs Clone starter 2024-03-07 15:31:41 +01:00
.gitignore Clone starter 2024-03-07 15:31:41 +01:00
.npmrc Clone starter 2024-03-07 15:31:41 +01:00
.prettierignore Clone starter 2024-03-07 15:31:41 +01:00
.prettierrc Clone starter 2024-03-07 15:31:41 +01:00
CODE_OF_CONDUCT.md Clone starter 2024-03-07 15:31:41 +01:00
docker-compose.yml Working Docker build 🎉 2024-03-11 13:27:55 -03:00
Dockerfile Working Docker build 🎉 2024-03-11 13:27:55 -03:00
LICENSE.md Clone starter 2024-03-07 15:31:41 +01:00
package.json Clone starter 2024-03-07 15:31:41 +01:00
pnpm-lock.yaml Clone starter 2024-03-07 15:31:41 +01:00
pnpm-workspace.yaml Clone starter 2024-03-07 15:31:41 +01:00
README.md Update README 2024-03-11 16:23:55 +01:00
tsconfig.json Clone starter 2024-03-07 15:31:41 +01:00
turbo.json Clone starter 2024-03-07 15:31:41 +01:00

About

This project was bootstrapped with a turbopress

Useful docs

Why Astro?

Astro allow you to use your favorite UI components and libraries. Mix and match React, Preact, Svelte, Vue, SolidJS, AlpineJS, and Lit to build your own website.

Why PayloadCMS?

I need a headless CMS that is easy to use with TypeScript support. PayloadCMS work really well in this use case.

What's inside?

This Turborepo includes the following packages/apps:

Apps and Packages

  • api: a Payload app
  • web: an Astro app
  • eslint-config-custom: eslint configurations (includes eslint-config-prettier and eslint-configg-turbo)

Each package/app is 100% TypeScript.

Utilities

This Turborepo has some additional tools already setup for you:

Prerequisites

Install nodejs, pnpm and turborepo on your local machine

Develop

Create a .env file in the root folder, you can use the .env.example file as an example

I use pnpm for this project.

Run the following command:

pnpm installl
pnpm dev

By default, the payloadCMS will run on port 3000, and Astro will be served on port 3001.

Build & Serve (NodeJs)

pnpm build
pnpm serve

TypeScript support

To fully utilize the type safe features, manually generate the types for PayloadCMS by runng pnpm generate:types

Then, you can import the types easily as simple as

import type { User } from "@turbopress/api/types";