From 4101ef47ad701a4e3a4e5fbb5ef7abf89b00c7b0 Mon Sep 17 00:00:00 2001 From: Yassine Doghri <yassine@doghri.fr> Date: Mon, 12 Oct 2020 14:47:21 +0000 Subject: [PATCH] docs: add gitlab issue templates, code of conduct and contributing files - update prettier config for markdown file for better readability - fix some formatting issues --- .gitlab/issue_templates/bug.md | 36 ++++++ .gitlab/issue_templates/feature-request.md | 19 +++ .prettierrc.json | 6 + CODE_OF_CONDUCT.md | 128 +++++++++++++++++++ CONTRIBUTING.md | 136 +++++++++++++++++++++ DEPENDENCIES.md | 58 ++++++--- INSTALL.md | 32 +++-- README.md | 36 ++++-- docs/setup-development.md | 73 +++++++---- 9 files changed, 467 insertions(+), 57 deletions(-) create mode 100644 .gitlab/issue_templates/bug.md create mode 100644 .gitlab/issue_templates/feature-request.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md new file mode 100644 index 0000000000..96ae700d03 --- /dev/null +++ b/.gitlab/issue_templates/bug.md @@ -0,0 +1,36 @@ +### Describe the bug + +[Summarize the bug encountered concisely] + +### Steps to reproduce + +1. [First step] +2. [Second step] +3. [and so on...] + +### Expected behavior + +[What you expected to happen] + +### Actual behavior + +[What actually happened] + +### Relevant logs and/or screenshots + +Paste any relevant logs - please use code blocks (```) to format console output, +logs, and code as it's very hard to read otherwise. + +### Context + +- Castopod: [which version (or branch, if applicable) the bug is in] +- OS: [e.g. Ubuntu server] +- Browser: [e.g. chrome, safari] +- Web server: [eg. Apache] +- [any other relevant context...] + +### Possible fixes + +[If you can, link to the line of code that might be responsible for the problem] + +/label ~bug diff --git a/.gitlab/issue_templates/feature-request.md b/.gitlab/issue_templates/feature-request.md new file mode 100644 index 0000000000..1832dfb904 --- /dev/null +++ b/.gitlab/issue_templates/feature-request.md @@ -0,0 +1,19 @@ +### Is your feature request related to a problem? Please describe + +A clear and concise description of what the problem is. Ex. I'm always +frustrated when [...] + +### Describe the solution you'd like + +A clear and concise description of what you want to happen. + +### Describe alternatives you've considered + +A clear and concise description of any alternative solutions or features you've +considered. + +### Additional context + +Add any other context or screenshots about the feature request here. + +/label ~feature-request diff --git a/.prettierrc.json b/.prettierrc.json index e6b50d4cfc..194ebab74c 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -7,6 +7,12 @@ "phpVersion": "7.2", "singleQuote": true } + }, + { + "files": "*.md", + "options": { + "proseWrap": "always" + } } ] } diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..2b069532cb --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of + any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[abuse@podlibre.org](mailto:abuse@podlibre.org). All complaints will be reviewed +and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..b775cf861f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,136 @@ +# Contributing to Castopod + +Love Castopod and want to help? Thanks so much, there's something to do for +everybody! + +Please take a moment to review this document in order to make the contribution +process easy and effective for everyone involved. + +Following these guidelines helps to communicate that you respect the time of the +developers managing and developing this open source project. In return, they +should reciprocate that respect in addressing your issue or assessing patches +and features. + +## Using the issue tracker + +The [issue tracker](https://code.podlibre.org/podlibre/castopod/-/issues) is the +preferred channel for [bug reports](#bug-reports), +[features requests](#feature-requests) and +[submitting pull requests](#pull-requests). + +## Bug reports + +A bug is a _demonstrable problem_ that is caused by the code in the repository. +Good bug reports are extremely helpful - thank you! + +Guidelines for bug reports: + +1. **Use the issue search** — check if the issue has already been + reported. + +2. **Check if the issue has been fixed** — try to reproduce it using the + latest `main` branch in the repository. + +3. **Isolate the problem** — ideally create a + [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live + example. + +A good bug report shouldn't leave others needing to chase you up for more +information. Please try to be as detailed as possible in your report. What is +your environment? What steps will reproduce the issue? What browser(s) and OS +experience the problem? What would you expect to be the outcome? All these +details will help people to fix any potential bugs. + +> [Issue templates](https://docs.gitlab.com/ee/user/project/description_templates.html#using-the-templates) +> have been created for this project. You may use them to help you follow those +> guidelines. + +## Feature requests + +Feature requests are welcome. But take a moment to find out whether your idea +fits with the scope and aims of the project. It's up to _you_ to make a strong +case to convince the project's developers of the merits of this feature. Please +provide as much detail and context as possible. + +## Pull requests + +Good pull requests - patches, improvements, new features - are a fantastic help. +They should remain focused in scope and avoid containing unrelated commits. + +**Please ask first** before embarking on any significant pull request (e.g. +implementing features, refactoring code, porting to a different language), +otherwise you risk spending a lot of time working on something that the +project's developers might not want to merge into the project. + +Please adhere to the coding conventions used throughout a project (indentation, +accurate comments, etc.) and any other requirements (such as test coverage). + +Adhering to the following process is the best way to get your work included in +the project: + +1. [Fork](https://docs.gitlab.com/ee/gitlab-basics/fork-project.html) the + project, clone your fork, and configure the remotes: + +```bash +# Clone your fork of the repo into the current directory +git clone https://code.podlibre.org/<your-username>/castopod.git + +# Navigate to the newly cloned directory +cd castopod + +# Assign the original repo to a remote called "upstream" +git remote add upstream https://code.podlibre.org/podlibre/castopod.git +``` + +2. If you cloned a while ago, get the latest changes from upstream: + +```bash +git checkout main +git pull upstream main +``` + +3. Create a new topic branch (off the `main` branch) to contain your feature, + change, or fix: + +```bash +git checkout -b <topic-branch-name> +``` + +4. Commit your changes in logical chunks. Please adhere to these + [git commit message guidelines](https://conventionalcommits.org/) or your + code is unlikely be merged into the main project. Use Git's + [interactive rebase](https://help.github.com/articles/about-git-rebase/) + feature to tidy up your commits before making them public. + +5. Locally merge (or rebase) the upstream dev branch into your topic branch: + +```bash +git pull [--rebase] upstream main +``` + +6. Push your topic branch up to your fork: + +```bash +git push origin <topic-branch-name> +``` + +7. [Open a Pull Request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html#new-merge-request-from-a-fork) + with a clear title and description. + +**IMPORTANT**: By submitting a patch, you agree to allow the project owners to +license your work under the terms of the +[GNU AGPLv3](https://code.podlibre.org/podlibre/castopod/-/blob/main/LICENSE). + +## Collaborating guidelines + +There are few basic rules to ensure high quality of the project: + +- Before merging, a PR requires at least two approvals from the collaborators + unless it's an architectural change, a large feature, etc. If it is, then at + least 50% of the core team have to agree to merge it, with every team member + having a full veto right. (i.e. every single one can block any PR) +- A PR should remain open for at least two days before merging (does not apply + for trivial contributions like fixing a typo). This way everyone has enough + time to look into it. + +You are always welcome to discuss and propose improvements to this guideline. diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 1948629736..0075667615 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -4,28 +4,48 @@ Castopod uses the following components: PHP Dependencies: -- [Code Igniter 4](https://codeigniter.com) ([MIT License](https://codeigniter.com/user_guide/license.html)) -- [WhichBrowser/Parser-PHP](https://github.com/WhichBrowser/Parser-PHP) ([MIT License](https://github.com/WhichBrowser/Parser-PHP/blob/master/LICENSE)) -- [GeoIP2 PHP API](https://github.com/maxmind/GeoIP2-php) ([Apache License 2.0](https://github.com/maxmind/GeoIP2-php/blob/master/LICENSE)) -- [getID3](https://github.com/JamesHeinrich/getID3) ([GNU General Public License v3](https://github.com/JamesHeinrich/getID3/blob/2.0/licenses/license.gpl-30.txt)) -- [myth-auth](https://github.com/lonnieezell/myth-auth) ([MIT license](https://github.com/lonnieezell/myth-auth/blob/develop/LICENSE.md)) -- [commonmark](https://commonmark.thephpleague.com/) ([BSD 3-Clause "New" or "Revised" License](https://github.com/thephpleague/commonmark/blob/latest/LICENSE)) -- [phpdotenv](https://github.com/vlucas/phpdotenv) ([ BSD-3-Clause License ](https://github.com/vlucas/phpdotenv/blob/master/LICENSE)) -- [HTML To Markdown for PHP](https://github.com/thephpleague/html-to-markdown) ([MIT License](https://github.com/thephpleague/html-to-markdown/blob/master/LICENSE)) -- [podlibre/user-agents-php](https://github.com/podlibre/user-agents-php) ([MIT License](https://github.com/podlibre/user-agents-php/blob/main/LICENSE)) -- [podlibre/ipcat](https://github.com/podlibre/ipcat) ([GNU General Public License v3.0](https://github.com/podlibre/ipcat/blob/master/LICENSE)) +- [Code Igniter 4](https://codeigniter.com) + ([MIT License](https://codeigniter.com/user_guide/license.html)) +- [WhichBrowser/Parser-PHP](https://github.com/WhichBrowser/Parser-PHP) + ([MIT License](https://github.com/WhichBrowser/Parser-PHP/blob/master/LICENSE)) +- [GeoIP2 PHP API](https://github.com/maxmind/GeoIP2-php) + ([Apache License 2.0](https://github.com/maxmind/GeoIP2-php/blob/master/LICENSE)) +- [getID3](https://github.com/JamesHeinrich/getID3) + ([GNU General Public License v3](https://github.com/JamesHeinrich/getID3/blob/2.0/licenses/license.gpl-30.txt)) +- [myth-auth](https://github.com/lonnieezell/myth-auth) + ([MIT license](https://github.com/lonnieezell/myth-auth/blob/develop/LICENSE.md)) +- [commonmark](https://commonmark.thephpleague.com/) + ([BSD 3-Clause "New" or "Revised" License](https://github.com/thephpleague/commonmark/blob/latest/LICENSE)) +- [phpdotenv](https://github.com/vlucas/phpdotenv) + ([ BSD-3-Clause License ](https://github.com/vlucas/phpdotenv/blob/master/LICENSE)) +- [HTML To Markdown for PHP](https://github.com/thephpleague/html-to-markdown) + ([MIT License](https://github.com/thephpleague/html-to-markdown/blob/master/LICENSE)) +- [podlibre/user-agents-php](https://github.com/podlibre/user-agents-php) + ([MIT License](https://github.com/podlibre/user-agents-php/blob/main/LICENSE)) +- [podlibre/ipcat](https://github.com/podlibre/ipcat) + ([GNU General Public License v3.0](https://github.com/podlibre/ipcat/blob/master/LICENSE)) Javascript dependencies: -- [rollup](https://rollupjs.org/) ([MIT License](https://github.com/rollup/rollup/blob/master/LICENSE.md)) -- [tailwindcss](https://tailwindcss.com/) ([MIT License](https://github.com/tailwindcss/tailwindcss/blob/master/LICENSE)) -- [ProseMirror](https://prosemirror.net/) ([MIT License](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE)) -- [amCharts 4](https://github.com/amcharts/amcharts4) ([Free amCharts license](https://github.com/amcharts/amcharts4/blob/master/dist/script/LICENSE)) -- [Choices.js](https://joshuajohnson.co.uk/Choices/) ([MIT License](https://github.com/jshjohnson/Choices/blob/master/LICENSE)) +- [rollup](https://rollupjs.org/) + ([MIT License](https://github.com/rollup/rollup/blob/master/LICENSE.md)) +- [tailwindcss](https://tailwindcss.com/) + ([MIT License](https://github.com/tailwindcss/tailwindcss/blob/master/LICENSE)) +- [ProseMirror](https://prosemirror.net/) + ([MIT License](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE)) +- [amCharts 4](https://github.com/amcharts/amcharts4) + ([Free amCharts license](https://github.com/amcharts/amcharts4/blob/master/dist/script/LICENSE)) +- [Choices.js](https://joshuajohnson.co.uk/Choices/) + ([MIT License](https://github.com/jshjohnson/Choices/blob/master/LICENSE)) Other: -- [RemixIcon](https://remixicon.com/) ([Apache License 2.0](https://github.com/Remix-Design/RemixIcon/blob/master/License)) -- [OPAWG/User agent list](https://github.com/opawg/user-agents) ([by Open Podcast Analytics Working Group](https://github.com/opawg)) ([MIT license](https://github.com/opawg/user-agents/blob/master/LICENSE)) -- [client9/ipcat](https://github.com/client9/ipcat) ([GNU General Public License v3.0](https://github.com/client9/ipcat/blob/master/LICENSE)) -- [GeoLite2 City](https://dev.maxmind.com/geoip/geoip2/geolite2/) ([Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)](https://www.maxmind.com/en/geolite2/eula)) +- [RemixIcon](https://remixicon.com/) + ([Apache License 2.0](https://github.com/Remix-Design/RemixIcon/blob/master/License)) +- [OPAWG/User agent list](https://github.com/opawg/user-agents) + ([by Open Podcast Analytics Working Group](https://github.com/opawg)) + ([MIT license](https://github.com/opawg/user-agents/blob/master/LICENSE)) +- [client9/ipcat](https://github.com/client9/ipcat) + ([GNU General Public License v3.0](https://github.com/client9/ipcat/blob/master/LICENSE)) +- [GeoLite2 City](https://dev.maxmind.com/geoip/geoip2/geolite2/) + ([Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)](https://www.maxmind.com/en/geolite2/eula)) diff --git a/INSTALL.md b/INSTALL.md index 3f07f1aada..871f904bab 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,6 +1,7 @@ # How to install Castopod -Castopod was thought to be easy to install. Whether using dedicated or shared hosting, you can install it on most PHP-MySQL compatible web servers. +Castopod was thought to be easy to install. Whether using dedicated or shared +hosting, you can install it on most PHP-MySQL compatible web servers. - [Install instructions](#install-instructions) - [(optional) Manual configuration](#optional-manual-configuration) @@ -12,10 +13,14 @@ Castopod was thought to be easy to install. Whether using dedicated or shared ho ## Install instructions -0. Create a MySQL database for Castopod with a user having access and modification privileges (for more info, see [Web Server Requirements](#web-server-requirements)). -1. Download and unzip the Castopod package onto the web server if you haven’t already. +0. Create a MySQL database for Castopod with a user having access and + modification privileges (for more info, see + [Web Server Requirements](#web-server-requirements)). +1. Download and unzip the Castopod package onto the web server if you haven’t + already. - âš ï¸ Set the web server document root to the `public/` sub-folder. -2. Run the Castopod install script by going to the install wizard page (`https://your_domain_name.com/cp-install`) in your favorite web browser. +2. Run the Castopod install script by going to the install wizard page + (`https://your_domain_name.com/cp-install`) in your favorite web browser. 3. Follow the instructions on your screen. All done, start podcasting! @@ -24,7 +29,8 @@ All done, start podcasting! Before uploading Castopod files to your web server: -1. Rename the `.env.example` file to `.env` and update the default values with your own. +1. Rename the `.env.example` file to `.env` and update the default values with + your own. 2. Upload the Castopod files with `.env` 3. Go to `/cp-install` to finish the install process. @@ -35,7 +41,8 @@ Before uploading Castopod files to your web server: PHP version 7.2 or higher is required, with the following extensions installed: - [intl](http://php.net/manual/en/intl.requirements.php) -- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library +- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use + the HTTP\CURLRequest library - [mbstring](http://php.net/manual/en/mbstring.installation.php) Additionally, make sure that the following extensions are enabled in your PHP: @@ -48,11 +55,14 @@ Additionally, make sure that the following extensions are enabled in your PHP: > We recommend using [MariaDB](https://mariadb.org) -You will need the server hostname, database name, username and password to complete the installation process. If you do not have these, please contact your server administrator. +You will need the server hostname, database name, username and password to +complete the installation process. If you do not have these, please contact your +server administrator. #### Privileges -User must have at least these privileges on the database for Castopod to work: `ALTER`, `DELETE`, `EXECUTE`, `INDEX`, `INSERT`, `SELECT`, `UPDATE`. +User must have at least these privileges on the database for Castopod to work: +`ALTER`, `DELETE`, `EXECUTE`, `INDEX`, `INSERT`, `SELECT`, `UPDATE`. ### (Optional) Other recommendations @@ -62,9 +72,11 @@ User must have at least these privileges on the database for Castopod to work: ` ## Security concerns -Castopod is built on top of Codeigniter, a PHP framework that encourages [good security practices](https://codeigniter.com/user_guide/concepts/security.html). +Castopod is built on top of Codeigniter, a PHP framework that encourages +[good security practices](https://codeigniter.com/user_guide/concepts/security.html). -To maximize your instance safety and prevent any malicious attack, we recommend you update all your Castopod files permissions: +To maximize your instance safety and prevent any malicious attack, we recommend +you update all your Castopod files permissions: - `writable/` folder must be **readable** and **writable**. - `public/media/` folder must be **readable** and **writable**. diff --git a/README.md b/README.md index 0de0350ae9..620bc84666 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,36 @@ # Castopod -Castopod is an open-source podcast hosting solution for everyone. Whether you are a beginner, an amateur or a professional, you will get everything you need: create, upload, publish, manage server subscriptions (WebSub embedded server), connect to the usual directories (Apple, Google, Spotify…), connect to the Fediverse (ActivityPub, Mastodon, Pleroma…) and measure your audience (IAB 2.0 compliant) so that you can monetize your content. Take back control: interact with your audience on your plateform (like, share, comment), the social network IS the podcast. Of course you may also export to proprietary social networks(Twitter, Instagram, Youtube, Facebook). Castopod can be hosted on any PHP/MySQL server: Unzip it and you and other podcasters are ready to broadcast professionally. +Castopod is an open-source podcast hosting solution for everyone. Whether you +are a beginner, an amateur or a professional, you will get everything you need: +create, upload, publish, manage server subscriptions (WebSub embedded server), +connect to the usual directories (Apple, Google, Spotify…), connect to the +Fediverse (ActivityPub, Mastodon, Pleroma…) and measure your audience (IAB 2.0 +compliant) so that you can monetize your content. Take back control: interact +with your audience on your plateform (like, share, comment), the social network +IS the podcast. Of course you may also export to proprietary social +networks(Twitter, Instagram, Youtube, Facebook). Castopod can be hosted on any +PHP/MySQL server: Unzip it and you and other podcasters are ready to broadcast +professionally. ## Free -Castopod is a free and open-source solution (AGPL v3). Whether you choose to install it on your own server or have it hosted by a professional, all your data and analytics belong to you and you only. +Castopod is a free and open-source solution (AGPL v3). Whether you choose to +install it on your own server or have it hosted by a professional, all your data +and analytics belong to you and you only. ## Social Media -Castopod is a part of Fediverse (Mastodon, Pleroma, PixelFed, PeerTube…). Podcasters and their audience can post, subscribe, like, comment and share natively. Millions of users already on Fediverse will be able to interact seamlessly. +Castopod is a part of Fediverse (Mastodon, Pleroma, PixelFed, PeerTube…). +Podcasters and their audience can post, subscribe, like, comment and share +natively. Millions of users already on Fediverse will be able to interact +seamlessly. ## Flexible -Castopod is compatible with all Podcasts players and platforms (it can automatically generate an RSS feed). -Moreover Podcasters can choose to publish on Castopod while keeping their existing hosting solution (it can automatically generate posts from an existing RSS feed). +Castopod is compatible with all Podcasts players and platforms (it can +automatically generate an RSS feed). Moreover Podcasters can choose to publish +on Castopod while keeping their existing hosting solution (it can automatically +generate posts from an existing RSS feed).  @@ -21,8 +38,13 @@ Moreover Podcasters can choose to publish on Castopod while keeping their existi ## Documentation -You can check castopod's documentation for [setting up a development environment](./docs/setup-development.md). +You can check castopod's documentation for +[setting up a development environment](./docs/setup-development.md). ## Support -[Castopod](https://nlnet.nl/project/Castopod/) was funded through the [NGI0 Discovery](https://nlnet.nl/discovery/) Fund, a fund established by NLnet with financial support from the European Commission's [Next Generation Internet](https://www.ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825322. +[Castopod](https://nlnet.nl/project/Castopod/) was funded through the +[NGI0 Discovery](https://nlnet.nl/discovery/) Fund, a fund established by NLnet +with financial support from the European Commission's +[Next Generation Internet](https://www.ngi.eu/) programme, under the aegis of DG +Communications Networks, Content and Technology under grant agreement No 825322. diff --git a/docs/setup-development.md b/docs/setup-development.md index 5949b1b64a..b4be5229ee 100644 --- a/docs/setup-development.md +++ b/docs/setup-development.md @@ -14,11 +14,15 @@ ## Introduction -Castopod is a web app based on the `php` framework [CodeIgniter 4](https://codeigniter.com). +Castopod is a web app based on the `php` framework +[CodeIgniter 4](https://codeigniter.com). -To setup a dev environment, we use [Docker](https://www.docker.com/). A `docker-compose.yml` and `Dockerfile` are included in the project's root folder to help you kickstart your contribution. +To setup a dev environment, we use [Docker](https://www.docker.com/). A +`docker-compose.yml` and `Dockerfile` are included in the project's root folder +to help you kickstart your contribution. -> Know that you don't need any prior knowledge of Docker to follow the next steps. However, if you wish to use your own environment, feel free to do so! +> Know that you don't need any prior knowledge of Docker to follow the next +> steps. However, if you wish to use your own environment, feel free to do so! ## Prerequisites @@ -30,7 +34,8 @@ To setup a dev environment, we use [Docker](https://www.docker.com/). A `docker- git clone https://code.podlibre.org/podlibre/castopod.git ``` -2. Create a `.env` file with the minimum required config to connect the app to the database: +2. Create a `.env` file with the minimum required config to connect the app to + the database: ```ini CI_ENVIRONMENT = development @@ -41,12 +46,17 @@ database.default.username = podlibre database.default.password = castopod ``` -> _NB._ You can tweak your environment by setting more environment variables in your custom `.env` file. See the `env` for examples or the [CodeIgniter4 User Guide](https://codeigniter.com/user_guide/index.html) for more info. +> _NB._ You can tweak your environment by setting more environment variables in +> your custom `.env` file. See the `env` for examples or the +> [CodeIgniter4 User Guide](https://codeigniter.com/user_guide/index.html) for +> more info. -3. Add the repository you've cloned to docker desktop's `Settings` > `Resources` > `File Sharing`. +3. Add the repository you've cloned to docker desktop's `Settings` > + `Resources` > `File Sharing`. 4. Install castopod's php dependencies -> The project's php dependencies aren't included in the repository, you have to download them using the composer service defined in `docker-compose.yml` +> The project's php dependencies aren't included in the repository, you have to +> download them using the composer service defined in `docker-compose.yml` ```bash docker-compose run --rm composer install --ignore-platform-reqs @@ -54,7 +64,8 @@ docker-compose run --rm composer install --ignore-platform-reqs 5. Install castopod's js dependencies -> The project's js dependencies aren't included in the repository, you have to download them using the node service defined in `docker-compose.yml` +> The project's js dependencies aren't included in the repository, you have to +> download them using the node service defined in `docker-compose.yml` ```bash docker-compose run --rm node npm install @@ -89,11 +100,14 @@ docker ps -a > The `docker-compose up -d` command will boot 3 containers in the background: > -> - `castopod_app`: a php based container with codeigniter requirements installed -> - `castopod_mariadb`: a [mariadb](https://mariadb.org/) server for persistent data +> - `castopod_app`: a php based container with codeigniter requirements +> installed +> - `castopod_mariadb`: a [mariadb](https://mariadb.org/) server for persistent +> data > - `castopod_phpmyadmin`: a phpmyadmin server to visualize the mariadb database > -> _NB._ `./mariadb`, `./phpmyadmin` folders will be mounted in the project's root directory to persist data and logs. +> _NB._ `./mariadb`, `./phpmyadmin` folders will be mounted in the project's +> root directory to persist data and logs. ## Initialize and populate database @@ -146,9 +160,11 @@ This will add an active superadmin user with the following credentials: ## Install/Update app dependencies -Castopod uses `composer` to manage php dependencies and `npm` to manage javascript dependencies. +Castopod uses `composer` to manage php dependencies and `npm` to manage +javascript dependencies. -You can install / update the project's dependencies using both `composer` and `node` services: +You can install / update the project's dependencies using both `composer` and +`node` services: ```bash # install php dependencies @@ -158,7 +174,9 @@ docker-compose run --rm composer install --ignore-platform-reqs docker-compose run --rm composer update --ignore-platform-reqs ``` -> _NB._ composer commands look for the `composer.json` file to find castopod's php dependencies, all of which live in the `vendor/` folder. For more info, check out [Composer documentation](https://getcomposer.org/doc/). +> _NB._ composer commands look for the `composer.json` file to find castopod's +> php dependencies, all of which live in the `vendor/` folder. For more info, +> check out [Composer documentation](https://getcomposer.org/doc/). ```bash # install js dependencies @@ -168,11 +186,16 @@ docker-compose run --rm node npm install docker-compose run --rm node npm update ``` -> _NB._ npm commands look for the `package.json` file to find castopod's js dependencies, all of which live in the `node_modules/` folder. For more info, check out [NPM documentation](https://docs.npmjs.com/). +> _NB._ npm commands look for the `package.json` file to find castopod's js +> dependencies, all of which live in the `node_modules/` folder. For more info, +> check out [NPM documentation](https://docs.npmjs.com/). ## Start hacking -You're all set! Start working your magic by updating the project's files! Help yourself to the [CodeIgniter4 User Guide](https://codeigniter.com/user_guide/index.html) for more insights. +You're all set! Start working your magic by updating the project's files! Help +yourself to the +[CodeIgniter4 User Guide](https://codeigniter.com/user_guide/index.html) for +more insights. To see your changes, go to: @@ -205,18 +228,25 @@ docker-compose restart docker-compose down ``` -Check [docker](https://docs.docker.com/engine/reference/commandline/docker/) and [docker-compose](https://docs.docker.com/compose/reference/) documentations for more insights. +Check [docker](https://docs.docker.com/engine/reference/commandline/docker/) and +[docker-compose](https://docs.docker.com/compose/reference/) documentations for +more insights. ## Developing inside a Container -If you're working in VSCode, you can take advantage of the `./.devcontainer/` folder. It defines a development container with preinstalled VSCode extensions so you don't have to worry about them. The container will be loaded with php, composer and git: +If you're working in VSCode, you can take advantage of the `./.devcontainer/` +folder. It defines a development container with preinstalled VSCode extensions +so you don't have to worry about them. The container will be loaded with php, +composer and git: -1. Install the VSCode extension [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) +1. Install the VSCode extension + [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) 2. `Ctrl/Cmd + Shift + P` > `Open in container` The VSCode window will reload inside the dev container. -You can check that the required packages are running in the console (`Terminal` > `New Terminal`): +You can check that the required packages are running in the console +(`Terminal` > `New Terminal`): ```bash php -v @@ -226,4 +256,5 @@ composer -V git version ``` -For more info, see [VSCode Remote Containers](https://code.visualstudio.com/docs/remote/containers) +For more info, see +[VSCode Remote Containers](https://code.visualstudio.com/docs/remote/containers) -- GitLab