Skip to content

Commit 4224a74

Browse files
Han2-RoMrGreenTea
andauthored
Han2 ro/docs/write readme (#57)
* Update README.md Co-authored-by: Jonas <jonas@bulik.dev>
1 parent 23abb7c commit 4224a74

2 files changed

Lines changed: 53 additions & 30 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
DATABASE_URI=mongodb://127.0.0.1/payload-template-blank
1+
DATABASE_URI=mongodb://127.0.0.1/website-cms
22
PAYLOAD_SECRET=YOUR_SECRET_HERE

README.md

Lines changed: 52 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,73 @@
1-
# Payload Blank Template
1+
# CMS for YoungVision.org - Built with Payload CMS
2+
23
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
34
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
45
<!-- ALL-CONTRIBUTORS-BADGE:END -->
56

6-
A blank template for [Payload](https://github.com/payloadcms/payload) to help you get up and running quickly. This repo may have been created by running `npx create-payload-app@latest` and selecting the "blank" template or by cloning this template on [Payload Cloud](https://payloadcms.com/new/clone/blank).
7-
8-
See the official [Examples Directory](https://github.com/payloadcms/payload/tree/main/examples) for details on how to use Payload in a variety of different ways.
9-
10-
## Development
7+
This is the content management system (CMS) for [youngvision.org](https://www.youngvision.org/) ([repository](https://github.com/YoungVision-eV/website)), built using [Payload CMS](https://payloadcms.com/). It is currently used to create and manage the events displayed on our website.
118

12-
To spin up the project locally, follow these steps:
9+
## 📦 Prerequisites
1310

14-
1. First clone the repo
15-
1. Then `cd website-cms && cp .env.example .env`
16-
1. Next `pnpm install && pnpm run dev` (or `docker-compose up`, see [Docker](#docker))
17-
1. Now `open http://localhost:3000/admin` to access the admin panel
18-
1. Create your first admin user using the form on the page
11+
Before you begin, ensure you have the following installed:
12+
- Node.js (v16 or higher)
13+
- pnpm
14+
- docker / podman
1915

20-
That's it! Changes made in `./src` will be reflected in your app.
16+
## 🏃 Getting Started
2117

22-
### Docker
18+
1. **Clone the repository**
19+
```bash
20+
git clone https://github.com/YoungVision-eV/website-cms.git
21+
cd website-cms
22+
```
2323

24-
Alternatively, you can use [Docker](https://www.docker.com) to spin up this project locally. To do so, follow these steps:
24+
1. **Install dependencies**
25+
```bash
26+
pnpm install
27+
```
2528

26-
1. Follow [steps 1 and 2 from above](#development), the docker-compose file will automatically use the `.env` file in your project root
27-
1. Next run `docker-compose up`
28-
1. Follow [steps 4 and 5 from above](#development) to login and create your first admin user
29+
1. **Environment Setup**
30+
- Copy the `.env.example` file to `.env`
2931

30-
That's it! The Docker instance will help you get up and running quickly while also standardizing the development environment across your teams.
32+
1. **MongoDB Setup**
33+
- Start MongoDB for example with Docker:
34+
```bash
35+
docker run --name mongodb-website-cms -p 27017:27017 mongo:latest
36+
```
37+
- If needed update the `DATABASE_URI` in the `.env` file
3138

32-
## Production
39+
1. **Development**
40+
- Start the development server:
41+
```bash
42+
pnpm dev
43+
```
44+
- The CMS will be available at `http://localhost:3000/admin`
3345

34-
To run Payload in production, you need to build and serve the Admin panel. To do so, follow these steps:
46+
1. **Build for Production**
47+
```bash
48+
pnpm build
49+
```
3550

36-
1. First invoke the `payload build` script by running `pnpm run build` in your project root. This creates a `./build` directory with a production-ready admin bundle.
37-
1. Then run `pnpm run serve` to run Node in production and serve Payload from the `./build` directory.
51+
1. **Start Production Server**
52+
```bash
53+
pnpm serve
54+
```
3855

39-
### Deployment
56+
## 📂 Folder Structure
4057

41-
The easiest way to deploy your project is to use [Payload Cloud](https://payloadcms.com/new/import), a one-click hosting solution to deploy production-ready instances of your Payload apps directly from your GitHub repo. You can also deploy your app manually, check out the [deployment documentation](https://payloadcms.com/docs/production/deployment) for full details.
58+
- `src/collections/` - Collection definitions
59+
- `src/seed/` - Script and media for seeding sample data
60+
- `src/payload.config.ts` - Payload configuration
61+
- `src/server.ts` - Express server
4262

43-
## Questions
63+
## 📜 Scripts
4464

45-
If you have any issues or questions, reach out to us on [Discord](https://discord.com/invite/payload) or start a [GitHub discussion](https://github.com/payloadcms/payload/discussions).
65+
- `pnpm dev` - Start development server
66+
- `pnpm build` - Build for production
67+
- `pnpm serve` - Start production server
68+
- `pnpm generate:types` - Generate TypeScript types (which are used in the [Frontend](https://github.com/YoungVision-eV/website/blob/main/src/data/payload-types.ts))
4669

47-
## Contributors
70+
## Contributors
4871

4972
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
5073

@@ -66,4 +89,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
6689

6790
<!-- ALL-CONTRIBUTORS-LIST:END -->
6891

69-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
92+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

0 commit comments

Comments
 (0)