Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# prtyr 🚀
[![Built with Cookiecutter Plone Starter](https://img.shields.io/badge/built%20with-Cookiecutter%20Plone%20Starter-0083be.svg?logo=cookiecutter)](https://github.com/collective/cookiecutter-plone-starter/)
[![Black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Backend Tests](https://github.com/sramirez/prtyr/actions/workflows/backend.yml/badge.svg)](https://github.com/sramirez/prtyr/actions/workflows/backend.yml)
[![Frontend Tests](https://github.com/sramirez/prtyr/actions/workflows/frontend.yml/badge.svg)](https://github.com/sramirez/prtyr/actions/workflows/frontend.yml)
A new project using Plone 6.
## Quick Start 🏁
### Prerequisites ✅
Ensure you have the following installed:
- Python 3.11 🐍
- Node 20 🟩
- yarn 🧶
- Docker 🐳
### Installation 🔧
1. Clone the repository:
```shell
git clone git@github.com:sramirez/prtyr.git
cd prtyr
```
2. Install both Backend and Frontend:
```shell
make install
```
### Fire Up the Servers 🔥
1. Create a new Plone site on your first run:
```shell
make create-site
```
2. Start the Backend at [http://localhost:8080/](http://localhost:8080/):
```shell
make start-backend
```
3. In a new terminal, start the Frontend at [http://localhost:3000/](http://localhost:3000/):
```shell
make start-frontend
```
Voila! Your Plone site should be live and kicking! 🎉
### Local Stack Deployment 📦
Deploy a local `Docker Compose` environment that includes:
- Docker images for Backend and Frontend 🖼️
- A stack with a Traefik router and a Postgres database 🗃️
- Accessible at [http://prtyr.localhost](http://prtyr.localhost) 🌐
Execute the following:
```shell
make stack-start
make stack-create-site
```
And... you're all set! Your Plone site is up and running locally! 🚀
## Project Structure 🏗️
This monorepo consists of three distinct sections: `backend`, `frontend`, and `devops`.
- **backend**: Houses the API and Plone installation, utilizing pip instead of buildout, and includes a policy package named prtyr.
- **frontend**: Contains the React (Volto) package.
- **devops**: Encompasses Docker Stack, Ansible playbooks, and Cache settings.
### Why This Structure? 🤔
- All necessary codebases to run the site are contained within the repo (excluding existing addons for Plone and React).
- Specific GitHub Workflows are triggered based on changes in each codebase (refer to .github/workflows).
- Simplifies the creation of Docker images for each codebase.
- Demonstrates Plone installation/setup without buildout.
## Code Quality Assurance 🧐
To automatically format your code and ensure it adheres to quality standards, execute:
```shell
make format
```
Linters can be run individually within the `backend` or `frontend` folders.
## Internationalization 🌐
Generate translation files for Plone and Volto with ease:
```shell
make i18n
```
## Credits and Acknowledgements 🙏
Crafted with care by **This was generated by [cookiecutter-plone-starter](https://github.com/collective/cookiecutter-plone-starter) on 2024-07-31 13:20:13**. A special thanks to all contributors and supporters!