An open API service indexing awesome lists of open source software.

https://github.com/plone/plone.org

Plone.org
https://github.com/plone/plone.org

plone

Last synced: about 2 months ago
JSON representation

Plone.org

Awesome Lists containing this project

README

          

# Plone.org Site

[![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/)
[![Code analysis](https://github.com/plone/plone.org/actions/workflows/code-analysis.yml/badge.svg)](https://github.com/plone/plone.org/actions/workflows/code-analysis.yml)
[![Backend testing.plone.org CI and Deploy](https://github.com/plone/plone.org/actions/workflows/backend-testing.yaml/badge.svg)](https://github.com/plone/plone.org/actions/workflows/backend-testing.yaml)
[![Frontend testing.plone.org CI and deploy](https://github.com/plone/plone.org/actions/workflows/frontend-testing.yml/badge.svg)](https://github.com/plone/plone.org/actions/workflows/frontend-testing.yml)

The main destination for Plone

## Quick start

### Development Setup

- Python 3.11
- Node 16
- yarn
- Docker
- Postgres 14

### Create database

```shell
createdb ploneorg
createuser ploneorg
```

### Install

```shell
git clone git@github.com:plone/plone.org.git
cd plone.org
make install
```

### Start

Start the Backend (http://localhost:8080/)

```shell
make start-backend
```

Start the Frontend (http://localhost:3000/)

```shell
make start-frontend
```

## Structure

This monorepo is composed by two distinct codebases: backend and frontend.

- **backend**: API (Backend) Plone installation using pip (not buildout). Includes a policy package named ploneorg
- **frontend**: React (Volto) package named frontend

### Reasoning

- Repo contains all codebase needed to run the site (excluding existing addons for Plone and React).
- Github Workflows are triggered based on changes on each codebase (see .github/workflows)
- Easier to create Docker images for each codebase
- Showcase Plone installation/setup without buildout

## Linters and Formatting

There are some hooks to run lint checks on the code. If you want to automatically format them, you can run

`make format`

in the root folder or especifically in each backend or frontend folders.

Linters commands are available in each backend and frontend folder.

## Acceptance tests

There are `Makefile` commands in place:

`build-test-acceptance-server`: Build Acceptance Backend Server Docker image that it's being used afterwards. Must be run before running the tests, if the backend code has changed.

`start-test-acceptance-server`: Start server fixture in docker (previous build required)

`start-test-acceptance-frontend`: Start the Core Acceptance Frontend Fixture in dev mode

`test-acceptance`: Start Core Cypress Acceptance Tests in dev mode

## Filestorage based backend alternative

The default setup assumes for local development you also have a PostgreSQL server running. As a convenience an example docker compose file is provided in the project root for such a service. If you prefer to use filestorage, you can look in the backend directory its Makefile and
look at the alternative 'build-dev-fs' target, which depends on 'config-fs'. The difference with the normal 'config' target is the usages of
instance-filestorage.yaml instead of instanc.yaml. These files are used as input for the application server scaffolding and switch the storage
layer to either relstorage/postgresql or direct/filestorage.

For both storages, if you want to develop for plone.org and need a copy of the data, you will need to as another community member (preferably from the website-team or the AI-team) for a database dump.

## Credits

**This was generated by [cookiecutter-plone-starter](https://github.com/collective/cookiecutter-plone-starter) on 2022-10-14 12:14:12**