You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
11
8
12
-
To spin up the project locally, follow these steps:
9
+
## 📦 Prerequisites
13
10
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
19
15
20
-
That's it! Changes made in `./src` will be reflected in your app.
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
+
```
25
28
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`
29
31
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
31
38
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`
33
45
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
+
```
35
50
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
+
```
38
55
39
-
### Deployment
56
+
## 📂 Folder Structure
40
57
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
42
62
43
-
## Questions
63
+
## 📜 Scripts
44
64
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))
46
69
47
-
## Contributors ✨
70
+
## ✨ Contributors
48
71
49
72
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
50
73
@@ -66,4 +89,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
66
89
67
90
<!-- ALL-CONTRIBUTORS-LIST:END -->
68
91
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