-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create / update package readme's
- Loading branch information
1 parent
c6b679e
commit 509b510
Showing
8 changed files
with
62 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build/ | ||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
# cms | ||
# @yestheory.family/cms | ||
|
||
This project was created using create-payload-app using the blank template. | ||
This package contains the Payload CMS hosted at https://admin.yestheory.family. | ||
|
||
## How to Use | ||
## Important commands | ||
|
||
`yarn dev` will start up your application and reload on any changes. | ||
- `yarn dev` runs the CMS in development mode, restarting on changes | ||
- `yarn seed` inserts some basic data including an initial user based on the .env file into the database | ||
- `yarn generate:types` generates TypeScript types based on the collection definitions (can be imported | ||
as `import { type GeneratedTypes } from "payload";`) | ||
|
||
### Docker | ||
## Requirements | ||
|
||
If you have docker and docker-compose installed, you can run `docker-compose up` | ||
|
||
To build the docker image, run `docker build -t my-tag .` | ||
|
||
Ensure you are passing all needed environment variables when starting up your container via `--env-file` or setting them with your deployment. | ||
|
||
The 3 typical env vars will be `DATABASE_URI`, `PAYLOAD_SECRET`, and `PAYLOAD_CONFIG_PATH` | ||
|
||
`docker run --env-file .env -p 3000:3000 my-tag` | ||
- Needs both the database and typesense running to start | ||
- Needs Node.js Backend launched after it to authenticate requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
playwright-report/ | ||
test-results/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
# e2e | ||
# @yestheory.family/e2e | ||
|
||
This package contains [Playwright](https://playwright.dev/) tests that run in the pipeline to ensure proper | ||
functionality of the all the moving parts. | ||
|
||
## Important commands | ||
|
||
- `yarn playwright test` runs the testsuite against a currently running setup | ||
|
||
## Requirements | ||
|
||
- A functional web application on port `http://localhost:3000` (can be changed using the env variable `FRONTEND_URL`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# @yestheory.family/scripts | ||
|
||
This package contains one-off scripts that are not bundled into any running application code. | ||
|
||
## Important commands | ||
|
||
- `yarn tsx path/to/script` runs the given script | ||
|
||
## Requirements | ||
|
||
- Depend on the script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# server | ||
# @yestheory.family/server | ||
|
||
This package contains the Node.js Backend that acts as a data juggler between all the different parts of the | ||
application. It uses [Prisma ORM](https://prisma.io) for connecting to the database. | ||
|
||
## Important commands | ||
|
||
- `yarn dev` runs the backend in development mode, restarting on changes | ||
- `yarn prisma <prisma command>` interact with the database | ||
- `yarn prisma db push` pushes the current schema into the database without migrations (used during development) | ||
- `yarn prisma migrate dev` creates a new migration for the project (required for PRs when the schema changes) | ||
|
||
## Requirements | ||
|
||
- A running CMS (required because the backend stitches the CMS' schema) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
# Preact example | ||
# @yestheory.family/web | ||
|
||
<!-- TODO Clean this from Preact mentions --> | ||
This package contains the Next.js Frontend that is displayed to the user when visiting https://yestheory.family. | ||
|
||
This example uses [Preact](https://github.com/preactjs/preact) instead of React. It's a React like UI framework which is fast and small. | ||
## Important commands | ||
|
||
## How to use | ||
- `yarn codegen` regenerates code based on the .graphql files in the package | ||
- `yarn dev` runs the frontend in development mode, hot-reloading on changes (runs `yarn codegen` on first start) | ||
- `yarn storybook` runs Storybook in development mode, hot-reloading on changes | ||
|
||
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: | ||
## Requirements | ||
|
||
```bash | ||
npx create-next-app --example using-preact using-preact-app | ||
# or | ||
yarn create next-app --example using-preact using-preact-app | ||
``` | ||
*These requirements are for running the actual frontend; they don't apply to running Storybook* | ||
|
||
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). | ||
|
||
### Aliasing react -> preact | ||
|
||
Using `preact` with `next.js` depends on aliasing react packages to preact ones (like `@preact/compat`). This is done directly in the [`package.json`](./package.json) dependencies. | ||
|
||
### next-plugin-preact | ||
|
||
This example was [updated](https://github.com/vercel/next.js/pull/18588) to use [`next-plugin-preact`](https://github.com/preactjs/next-plugin-preact) and now requires minimal configuration, if you want to add preact without a plugin, or see how it works, head to the previous [`next.config.js`](https://github.com/vercel/next.js/blob/629884af7d3ced97b8c2ec7aebdfb1a3a5d808f0/examples/using-preact/next.config.js). | ||
- A running backend (required because the codegen fetches its schema from there) | ||
- Typesense running when searching through group-chats |