Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Move docs to `documentation/`, reduce duplication and update content (#766)
Dhruv Bhanushalib95b3b600f00
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 5c45adbb7..def137b5f 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -1,20 +1,97 @@-## ✨ Welcome+↖️ Table of Contents++# WelcomeThank you for your interest in Openverse! We're so excited to bring new-contributors into the fold in WordPress, Openverse and FOSS in general.+contributors into the fold in Openverse, WordPress and FOSS in general. This+document is a set of guidelines to help you contribute to this project.++## Code of Conduct++You should read and agree to abide by the [code of conduct](CODE_OF_CONDUCT.md)+before contributing to WordPress projects. This applies to all Openverse+repositories because Openverse is a WordPress Foundation project.++## Keep in touch++Don't hesitate to ask for help; if you're stuck, we're here for you! You can+ping us via any of our [communication channels](README.md#keep-in-touch).++## Code and code-related contributions++### Get started++Detailed help for contributing code can be found in the+[developer documentation](https://wordpress.github.io/openverse/), which also+includes the following subfolders.++- [Storybook](https://wordpress.github.io/openverse/storybook/) (UI components)+- [Tailwind Config Viewer](https://wordpress.github.io/openverse/tailwind/)+ (design tokens)++The following resources are preferred reading for starting your Openverse+contribution journey in the code and code-related space.++- [GitHub contribution practices](https://wordpress.github.io/openverse/reference/github_contribution_practices.html)+- [Dev flow](https://wordpress.github.io/openverse/reference/code_contribution_practices.html)+- [General setup guide](https://wordpress.github.io/openverse/guides/general_setup.html)+- [Quickstart guide](https://wordpress.github.io/openverse/guides/quickstart.html)++#### Friendly notes++It's totally acceptable to work on more than one+["good first issue"](https://github.com/WordPress/openverse/issues?q=is:issue+is:open+sort:updated-desc+label:%22good+first+issue%22).++On GitHub, you can ping us on any issue you would like to work on or triaging+and on PRs that you've opened or are giving feedback on. You can ping a specific+person using their GitHub handle, or even the entire Openverse team using+`@WordPress/openverse-maintainers`.-## ❤️ Code of Conduct+### Text and documentation-Please be aware that as a project of the WordPress Foundation, Openverse follows-[the WordPress Etiquette](https://wordpress.org/about/etiquette/), a code of-conduct that you should read and agree to abide by before contributing to-WordPress projects. This applies to all Openverse repositories.+Our documentation and copy text could always use improvement. If you spot any+scope for improvement, from the smallest punctuation error to the largest+factual inaccuracy, you can file an issue or fix an already open one.-See the [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) file for details.+- [Good first issues with the "📄 aspect: text" label](https://github.com/WordPress/openverse/issues?q=is:issue+is:open+sort:updated-desc+label:%22good+first+issue%22+label:%22%F0%9F%93%84+aspect:+text%22)+- [Issues wanting help with the "📄 aspect: text" label](https://github.com/WordPress/openverse/issues?q=is:issue+is:open+sort:updated-desc+label:%22help+wanted%22+label:%22%F0%9F%93%84+aspect:+text%22)-## 🎨 Design contributions+### Bug reproduction & triage-### How to contribute with design+Openverse has a large list of open bugs. In many cases these bugs can be out of+date, or their reproduction criteria may no longer be accurate. It is useful+information for maintainers to know whether the issue mentioned can still be+reproduced on recent versions of the code or if the issue can no longer be+replicated.++- [Issues with the "🛠 goal: fix" label](https://github.com/WordPress/openverse/issues?q=is:open+is:issue+label:%22%F0%9F%9B%A0+goal:+fix%22)++### Pull request review++New contributors are welcome and invited to provide feedback on pull requests.+You can start by just asking questions! It's great to get to know the project+and helps PR authors by uncovering unspoken or undocumented assumptions that+exist about the project. It is frequently folks who know the least about and are+newest to a project that ask the most helpful questions in this regard.++- [Non-draft open PRs](https://github.com/WordPress/openverse/pulls?q=is:pr+is:open+-is:draft)++### Programming++Any issues labeled as "good first issue" or "help wanted" in our repositories+are all up for grabs. Just add a comment tagging the maintainers using+`@WordPress/openverse-maintainers` on the issue with questions or requesting the+issue be assigned to you when you're ready to work on it.++- [Good first issues](https://github.com/WordPress/openverse/issues?q=is:issue+is:open+sort:updated-desc+label:%22good+first+issue%22)+- [Issues wanting help](https://github.com/WordPress/openverse/issues?q=is:issue+is:open+sort:updated-desc+label:%22help+wanted%22)++## Non-code contributions++If programming is not your cup of tea, there are ways to contribute to Openverse+that do not involve working with code at all. Some of them are listed below.++### DesignIf you'd like to contribute to the design, feel free to propose a solution to anexisting problem labeled with@@ -57,7 +134,7 @@ referenceas a guide for how to describe your solution and to understand how thediscussion evolves before implementation begins.-## 📖 Translation contributions+### TranslationsYou can also contribute to Openverse by translating it.@@ -68,7 +145,7 @@ A getting started guide for translating on GlotPress (the software behind[translate.wordpress.org](http://translate.wordpress.org)) is here:[https://make.wordpress.org/polyglots/handbook/translating/glotpress-translate-wordpress-org/#getting-started](https://make.wordpress.org/polyglots/handbook/translating/glotpress-translate-wordpress-org/#getting-started)-## ☁️ Provider contributions+### ProvidersOpenverse is powered by upstream providers of openly licensed media. You canhelp expand Openverse by identifying sources of Creative Commons licensed@@ -80,207 +157,23 @@ You can use the[New Source Suggestion for Openverse](https://github.com/WordPress/openverse-catalog/issues/new?assignees=&labels=%F0%9F%9A%A6+status%3A+awaiting+triage%2C%F0%9F%A7%B9+status%3A+ticket+work+required%2C%E2%98%81%EF%B8%8F+provider%3A+any&template=new_source_suggestion.yml&title=%3CSource+name+here%3E)issue template to submit whatever sources you find.-## 💻️ Code contributions+### Feedback-### ⛳️ How to contribute with code+Feedback like reporting bugs and missing features is big help for Openverse. We+want Openverse to be a bug-free app with great user experience and providing+feedback is a way to put any shortcomings on our radar and get them resolved.-Any issues labeled as "good first issue" or "help wanted" in our repositories-are all up for grabs. Just add a comment with `@WordPress/openverse-maintainers`-on the issue with questions or requesting the issue be assigned to you when-you're ready to work on it. We also regularly discuss Openverse development-issues outside the meeting times (like debugging problems we're having while-working through an issue).--### ⛺ Keeping in Touch--For folks who'd like to be involved in our regular development conversations,-please feel free to join us in the WordPress make chat-([https://make.wordpress.org/chat/](https://make.wordpress.org/chat/)). You'll-find us in the #openverse channel, of course! We have weekly community meetings-to discuss ongoing work and assign new issues and, every four weeks, a-prioritization meeting to review our current projects and roadmap. The sessions-are on Tuesdays at 15:00 UTC-([https://everytimezone.com/s/d1d42c7b](https://everytimezone.com/s/d1d42c7b))-and all are welcome! Attendance is not mandatory to contribute, however.--You can also keep in touch with-[progress](https://github.com/orgs/WordPress/projects/3) and the latest updates-to the project with our-[WordPress contributor group](https://make.wordpress.org/openverse/).--### 🎯 Choosing an issue--Below is a link to a list of issues that encompass a variety of different-technologies, from Airflow to Django to GitHub Actions to Vue.js. You're welcome-to take on any of the issues. Most require development environment set up, but-some do not. Expect development environment set up to take 1 to 2 hours-depending on experience and how much software you've already got installed. If-you have git, a text editor/IDE, Python or Node and Docker set up, things will-go a little more smoothly. If not, that's totally fine! We're here to help and-our repositories all have README files that should include helpful instructions-for self-guided environment set up.--Once you've picked an issue to work on, please leave a comment saying so on the-issue and include `@openverse-maintainers` in the comment. That way one of us-will get a notification and can assign the issue to you.--### 🤓 Initial set up--#### 🪟 Note for Windows users--Windows Subsystem for Linux can be a much more versatile and familiar-environment for software development on Windows. Everything from installing-`git` and other dependencies to using command line tools that will be familiar-to the wider community of software developers are more likely to be easier under-WSL. While some parts of some Openverse projects may be able to be developed-under native Windows, you will have a much smoother time with WSL as our command-runners (`just` and `pnpm`) assume a unix-type environment (Linux and macOS). We-would like to support native Windows development, but we do not currently have-any active contributors who use Windows on a daily basis and do not have the-time to spend supporting it. Likewise, many other OSS projects will not be-configured to allow easy local development under Windows. WSL can help there as-well.--Installation instructions for WSL on Windows 10 and 11 can be found-[here on Microsoft's official documentation website](https://docs.microsoft.com/en-us/windows/wsl/install).--Of course, if you would like to contribute to Openverse by making our projects-work natively on Windows, PRs for this are always welcome.--### ✍️ General set up--Skip any steps you've already completed on your own. This is meant as an-exhaustive list for brand-new devs who might not have these tools yet.--1. Install `git`- - Most Linux distributions and macOS will already have this installed. Open- up your terminal app and type `which git`. If the response is anything- other than `git not found` then you've already got it installed.- - If you need to install it, follow the official instructions here:- https://git-scm.com/downloads-1. Install a text editor.- - [VSCode](https://code.visualstudio.com/) is an option with good- out-of-the-box support for our entire stack.- - [PyCharm](https://www.jetbrains.com/pycharm/) is another very popular- option with lots of bells and whistles.- - [Sublime Text](https://www.sublimetext.com/) is a minimalistic option that- can get you off the ground quickly with lots of room for expansion through- it's package system.- - [vim](https://www.vim.org/) and- [emacs](https://www.gnu.org/software/emacs/) are ubiquitous terminal-based- options.-1. Create a GitHub account <https://github.com/signup>-1. Install pyenv or Anaconda- - These tools make it simpler to manage multiple different versions of Python- on a single machine. This is useful for contributing to multiple projects,- each of which may be using a different specific version of Python.- - Skip this if you only want to do a JavaScript issue- - https://github.com/pyenv/pyenv- - https://www.anaconda.com/products/individual-1. Install volta- - Similar to pyenv/Anaconda but for Node.js- - Skip this if you only want to do a Python issue- - https://volta.sh/-1. Install Docker- - Skip this if you only want to do a JavaScript issue- - Windows with WSL:- https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers#install-docker-desktop- - All other scenarios (macOS, Linux, Native Windows):- https://docs.docker.com/engine/install/-1. Choose an issue from the list below and add a comment as described in the- second paragraph of the "Choosing an issue" section above-1. Fork the repository for the issue you chose- - Go to the repository page on GitHub and find the "Fork" button in the upper- corner of the page. Click this and GitHub will guide you through the- process of forking the repository-1. Clone the repository into your computer- - On the page for your fork, find the "<> Code" dropdown button. Click it and- copy the link provided under the "Local" tab of the dropdown.- - Open up your terminal app and type `git clone <copied URL>` replacing- `<copied URL>` with the URL you copied from the GitHub website.-1. Follow the environment set up instructions in the README or CONTRIBUTING- document in the repository-1. Start working on the issue you chose 🎉--### 🏃 Good first issues--Most of these issues are potentially able to be completed in less than 4 hours,-development environment set up included. It may take significantly more or less-than 4 hours depending on experience and how smoothly development environment-set up goes. Unfortunately sometimes dev env set up can sometimes be tricky! In-these cases it would be helpful to the Openverse project to share your-experience in an issue so we can try to remove any roadblocks for future-contributors. **You can make meaningful contributions to the project in the form-of valuable feedback about the development experience!**--[List of Good First Issues](https://github.com/issues?q=is%3Aopen+is%3Aissue+repo%3AWordPress%2Fopenverse-catalog+repo%3AWordPress%2Fopenverse+repo%3AWordPress%2Fopenverse-api+repo%3AWordPress%2Fopenverse-frontend+label%3A%22good+first+issue%22+label%3A%22help+wanted%22+-label%3A%22%E2%9B%94+status%3A+blocked%22+-label%3A%22%F0%9F%94%92+staff+only%22+)--### 🤗 Friendly note for new comers--1. It is totally ok and even encouraged to do more than one- "[good first issue](https://github.com/issues?q=is%3Aopen+is%3Aissue+repo%3AWordPress%2Fopenverse-catalog+repo%3AWordPress%2Fopenverse+repo%3AWordPress%2Fopenverse-api+repo%3AWordPress%2Fopenverse-frontend+label%3A%22good+first+issue%22+label%3A%22help+wanted%22+-label%3A%22%E2%9B%94+status%3A+blocked%22+-label%3A%22%F0%9F%94%92+staff+only%22+)"-2. All are welcome to write issues and the Openverse maintainers have deep- gratitude for those who do. If you see something that could be worked on,- each repository has a set of issue templates to help you get started writing- issues:- - [`WordPress/openverse-frontend`](https://github.com/wordpress/openverse-frontend/issues/new/choose)- - [`WordPress/openverse-api`](https://github.com/wordpress/openverse-api/issues/new/choose)- - [`WordPress/openverse-catalog`](https://github.com/wordpress/openverse-catalog/issues/new/choose)- - [`WordPress/openverse`](https://github.com/wordpress/openverse/issues/new/choose)-3. New contributors are welcome and invited to provide feedback on pull- requests. You can start by just asking questions! It's great to get to know- the project and helps PR authors by uncovering unspoken or undocumented- assumptions that exist about the project. It is frequently folks who know the- least about and are newest to a project that ask the most helpful questions- in this regard.-4. Don't hesitate to ask for help! In- [WordPress Make Slack](https://make.wordpress.org/chat/) or in a draft PR, if- you're stuck, we're here for you. Everyone is learning and thinking things- through all the time. Each Openverse repository has an `@` alias you can ping- for help in any issue or pull request, draft or otherwise:- - `@WordPress/openverse-api`- - `@WordPress/openverse-catalog`- - `@WordPress/openverse-frontend`- - etc.-5. On the technical side, there are a ton of- [`just`](https://github.com/casey/just) recipes to help you out. If you run- `just` on its own in any Openverse repository, it will show you what recipes- are available and what they do. `just lint`, `just test`, `just recreate`, we- all run these so frequently!- ```- # Run `just` in any of the Openverse repositories to see a list of available commands.- # This example is for the `WordPress/openverse` repository.- > just- Available recipes:- default # Show all available recipes- install # Install Python dependencies in Pipenv environments and JS dependencies- precommit # Setup pre-commit as a Git hook- lint # Run pre-commit to lint and reformat all files- ```--## 🏔️ Other non-code contributions--There are a number of other ways to contribute to the project that don't involve-writing Python or Javascript.--### 📑 Text improvements--Our documentation and copy text could always use improvement! The following-links can be useful for finding text issues to tackle:--- [Good first issues with the label “aspect: text”](https://href.li/?https://github.com/issues?q=is%3Aopen+is%3Aissue+repo%3AWordPress%2Fopenverse-catalog+repo%3AWordPress%2Fopenverse+repo%3AWordPress%2Fopenverse-api+repo%3AWordPress%2Fopenverse-frontend+label%3A%22good+first+issue%22+label%3A%22help+wanted%22+-label%3A%22%E2%9B%94+status%3A+blocked%22+-label%3A%22%F0%9F%94%92+staff+only%22+label%3A%22%F0%9F%93%84+aspect%3A+text%22)-- [All issues with the label “aspect: text”](https://href.li/?https://github.com/issues?q=is%3Aopen+is%3Aissue+repo%3AWordPress%2Fopenverse-catalog+repo%3AWordPress%2Fopenverse+repo%3AWordPress%2Fopenverse-api+repo%3AWordPress%2Fopenverse-frontend+-label%3A%22%E2%9B%94+status%3A+blocked%22+-label%3A%22%F0%9F%94%92+staff+only%22+label%3A%22%F0%9F%93%84+aspect%3A+text%22+)--### 🩹 Bug reproduction & triage--Openverse has a large list of open bugs:-[all issues with the label "goal: fix"](https://github.com/issues?q=is%3Aopen+is%3Aissue+repo%3AWordPress%2Fopenverse-catalog+repo%3AWordPress%2Fopenverse+repo%3AWordPress%2Fopenverse-api+repo%3AWordPress%2Fopenverse-frontend+-label%3A%22%E2%9B%94+status%3A+blocked%22+-label%3A%22%F0%9F%94%92+staff+only%22+label%3A%22%F0%9F%9B%A0+goal%3A+fix%22).-In many cases these bugs can be out of date, or their reproduction criteria may-no longer be accurate. It's useful information for maintainers to know whether-the issue mentioned can still be reproduced on recent versions of the code or if-the issue can no longer be replicated.--### 🫱🏿🫲🏽 Recruit+You can report bugs, request features and see all other forms of feedback we+would like to receive by+[submitting a new issue](https://github.com/WordPress/openverse/issues/new/choose)+on GitHub. All are welcome to write issues and the Openverse maintainers have+deep gratitude for those who do. Note that you will need a GitHub account to+create new issues.++You can also provide feedback via any of our other+[communication channels](README.md#keep-in-touch).++### ReferralsIf you know folks who have expertise in any of the above areas who you thinkmight be interested in contributing to open source, send them our way! We'rediff --git a/README.md b/README.mdindex d34192e6c..2e08f6703 100644--- a/README.md+++ b/README.md@@ -44,6 +44,27 @@ This repository also contains the following directories.- [Templates](templates/) | Common scaffolding code that is rendered and syncedto the catalog repo+## Keep in touch++You can keep in touch with the project via the following channels:++- GitHub+ - [Issues](https://github.com/WordPress/openverse/issues/)+ - [PRs](https://github.com/WordPress/openverse/pulls/)+ - [Discussions](https://github.com/WordPress/openverse/discussions/)+ - [Project Board](https://github.com/orgs/WordPress/projects/3)+- [Community Site](https://make.wordpress.org/openverse/)+- #openverse channel in the+ [Making WordPress Slack](https://make.wordpress.org/chat/)+ - Weekly Development Chat (@+ [Tuesday 15:00 UTC](https://everytimezone.com/s/d1d42c7b))+ - Monthly Prioritisation Meeting++## Documentation++To use the Openverse API, please refer to the+[API consumer documentation](https://api.openverse.engineering/v1/).+## ContributingPull requests are welcome! Feel free todiff --git a/api/justfile b/api/justfileindex 75dde26b7..c7f132703 100644--- a/api/justfile+++ b/api/justfile@@ -16,8 +16,8 @@ _all-up:just ../_all-up# Install dependencies-install:- pipenv install --dev+install *args="--dev":+ pipenv install {{ args }}########### Health #diff --git a/api/meta_docs/CONTRIBUTING.md b/api/meta_docs/CONTRIBUTING.mddeleted file mode 100644index c7adb3e29..000000000--- a/api/meta_docs/CONTRIBUTING.md+++ /dev/null@@ -1,122 +0,0 @@-# Contributing to Openverse--Thank you for your interest in contributing to Openverse! This document is a set-of guidelines to help you contribute to this project.--## Code of Conduct--By participating in this project, you are expected to uphold our-[Code of Conduct](../../CODE_OF_CONDUCT.md).--## Project Documentation--Please consult the [README](README.md) file at the root of this repository. Also-see the [project documentation guidelines](./DOCUMENTATION_GUIDELINES.md) if you-are interested in improving our documentation.--### Bugs--If you find a bug, please open an issue in this repository describing the bug.-You can file a bug-[here](https://github.com/WordPress/openverse-api/issues/new?template=bug_report.md).-You will see a bug report template with the required information you should-provide.--After that, don't forget to tag the issue with the "Bug" label.--### Proposing changes or new features--Feel free to-[open an issue](https://github.com/WordPress/openverse-api/issues/new/choose) to-discuss any new features or to propose any changes.--### Pull requests--Before you start writing code, make sure there is an issue open. Pull requests-without a link to an existing issue won't be merged.--If you want to get started contributing code to this project but don't know-exactly what to work on, we compiled a good list of issues labeled as-[`good first issue`](https://github.com/wordpress/openverse-api/labels/good%20first%20issue)-which are small in scope and not so complex to solve. There are also issues-labeled as-[`help wanted`](https://github.com/wordpress/openverse-api/labels/help%20wanted)-which can be a bit more complex but are good examples of things we are currently-accepting help from the community.--Any code modifications will have to be accompanied by the appropriate unit-tests. This will be checked and verified during code review. Once the Pull-Request is opened, our CI server will run the unit test suite and run a code-linter to verify that the code follows the coding guidelines.--## Running the tests--### How to Run API live integration tests--You can check the health of a live deployment of the API by running the live-integration tests.--1. Change directory to `openverse_api`--```-cd openverse_api-```--1. Install all dependencies for Openverse API--```-pipenv install-```--Note: The following non-Python libraries or binaries are transient dependencies-which will also need to be present on your computer for the project to run and-install as expected:--- `librdkafka`-- `exempi`-- `audiowaveform`--3. Launch a new shell session--```-pipenv shell-```--4. Run API live integration test--```-./test/run_test.sh-```--### How to Run Ingestion Server tests--You can ingest and index some dummy data using the Ingestion Server API.--1. Change directory to ingestion server--```-cd ingestion_server-```--2. Install all dependencies for Ingestion Server API--```-pipenv install-```--3. Launch a new shell session--```-pipenv shell-```--4. Run the integration tests--```-python3 test/integration_tests.py-```--## Questions or Thoughts?--Feel free to [join us on Slack](https://make.wordpress.org/chat/) and discuss-the project with the engineers and community members on #openverse.diff --git a/api/meta_docs/README.md b/api/meta_docs/README.mddeleted file mode 100644index dd03ea2d1..000000000--- a/api/meta_docs/README.md+++ /dev/null@@ -1,77 +0,0 @@-<img src="https://github.com/WordPress/openverse/raw/main/brand/banner.svg" width="100%"/>--<p align="center">- <a href="https://github.com/orgs/WordPress/projects/3">Project Board</a> | <a href="https://make.wordpress.org/openverse/">Community Site</a> | <a href="https://make.wordpress.org/chat/">#openverse @ Slack</a> | <a href="https://make.wordpress.org/openverse/handbook/">Handbook</a> | <a href="https://www.figma.com/file/w60dl1XPUvSaRncv1Utmnb/Openverse-Releases">Figma Mockups</a> | <a href="https://www.figma.com/file/GIIQ4sDbaToCfFQyKMvzr8/Openverse-Design-Library">Figma Design Library</a>-</p>--# Openverse API--## Purpose--This repository is primarily concerned with back end infrastructure like-datastores, servers, and APIs. The pipeline that feeds data into this system can-be found in the-[Openverse Catalog repository](https://github.com/WordPress/openverse-catalog).-A front end web application that interfaces with the API can be found at the-[Openverse frontend repository](https://github.com/WordPress/openverse-frontend).--## Getting started--Our quickstart guide and other documentation can be found in our-[developer docs](https://wordpress.github.io/openverse-api/guides/quickstart.html)-(or within the repo at-[`./api/docs/guides/quickstart.md`](../docs/guides/quickstart.md)). Our API-documentation can also be found at-[https://api.openverse.engineering](https://api.openverse.engineering).--## System architecture----### Basic flow of data--Search data is ingested from upstream sources provided by the-[data pipeline](https://github.com/WordPress/openverse-catalog). As of the time-of writing, this includes data from Common Crawl and multiple 3rd party APIs.-Once the data has been scraped and cleaned, it is transferred to the upstream-database, indicating that it is ready for production use.--Every week, the latest version of the data is automatically bulk copied-("ingested") from the upstream database to the production database by the-Ingestion Server. Once the data has been downloaded and indexed inside of the-database, the data is indexed in Elasticsearch, at which point the new data can-be served up from the Openverse API servers.--### Description of subprojects--- **api/**: a Django Rest Framework API server For a full description of its- capabilities, please see the- [browsable documentation](https://api.openverse.engineering).-- **ingestion_server/**: a service for downloading and indexing search data once- it has been prepared by the Openverse Catalog--## Contributing--Pull requests are welcome! Feel free to-[join us on Slack](https://make.wordpress.org/chat/) and discuss the project-with the engineers and community members on #openverse.--You are welcome to take any open issue in the tracker labeled-[`help wanted`](https://github.com/WordPress/openverse-api/labels/help%20wanted)-or-[`good first issue`](https://github.com/WordPress/openverse-api/labels/good%20first%20issue);-**there's no need to ask for permission in advance**. Other issues are open for-contribution as well, but may be less accessible or well-defined in comparison-to those that are explicitly labeled.--See the [CONTRIBUTING](CONTRIBUTING.md) file for details.--## Acknowledgments--Openverse, previously known as CC Search, was conceived and built at-[Creative Commons](https://creativecommons.org). We thank them for their-commitment to open source and openly licensed content, with particular thanks to-previous team members @ryanmerkley, @janetpkr, @lizadaly, @sebworks, @pa-w,-@kgodey, @annatuma, @mathemancer, @aldenstpage, @brenoferreira, and @sclachar,-along with their-[community of volunteers](https://opensource.creativecommons.org/community/community-team/).diff --git a/documentation/conf.py b/documentation/conf.pyindex a099884f5..6fa093d70 100644--- a/documentation/conf.py+++ b/documentation/conf.py@@ -13,6 +13,7 @@ author = "Openverse <[email protected]>"# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configurationextensions = ["myst_parser"]+myst_heading_anchors = 6 # Add anchors to all headers, this is disabled by default.source_suffix = {".rst": "restructuredtext", ".md": "markdown"}diff --git a/documentation/guides/api/develop.md b/documentation/guides/api/develop.mdnew file mode 100644index 000000000..6f2e65da2--- /dev/null+++ b/documentation/guides/api/develop.md@@ -0,0 +1,3 @@+# Development guide++Here's the comprehensive guide for developing the Openverse API.diff --git a/documentation/guides/api/index.md b/documentation/guides/api/index.mdnew file mode 100644index 000000000..e961259a5--- /dev/null+++ b/documentation/guides/api/index.md@@ -0,0 +1,7 @@+# API++```{toctree}+:maxdepth: 1++test+```diff --git a/documentation/guides/api/test.md b/documentation/guides/api/test.mdnew file mode 100644index 000000000..a00071479--- /dev/null+++ b/documentation/guides/api/test.md@@ -0,0 +1,19 @@+# Testing guide++Once you've made some changes to the codebase, it is important to run tests.++## Steps++1. Ensure you've gone through the [quickstart guide](../quickstart.md). Ensure+ that the Docker daemon is running.++2. Run the tests.++ ```console+ $ just api/test+ ```++ ```{note}+ Since the tests are executed inside Docker, Python dependencies need not be+ installed.+ ```diff --git a/documentation/guides/frontend/develop.md b/documentation/guides/frontend/develop.mdnew file mode 100644index 000000000..696ed2f78--- /dev/null+++ b/documentation/guides/frontend/develop.md@@ -0,0 +1,3 @@+# Development guide++Here's the comprehensive guide for developing the Openverse frontned.diff --git a/documentation/guides/frontend/index.md b/documentation/guides/frontend/index.mdnew file mode 100644index 000000000..1fe2e42ce--- /dev/null+++ b/documentation/guides/frontend/index.md@@ -0,0 +1,7 @@+# Frontend++```{toctree}+:maxdepth: 1++test+```diff --git a/documentation/guides/frontend/test.md b/documentation/guides/frontend/test.mdnew file mode 100644index 000000000..282451f0c--- /dev/null+++ b/documentation/guides/frontend/test.md@@ -0,0 +1,23 @@+# Testing guide++Once you've made some changes to the codebase, it is important to run tests.++## Steps++1. Ensure you've gone through the [quickstart guide](../quickstart.md).++2. Run unit tests for the frontend.++ ```console+ $ just frontend/run test:unit+ ```++ ````{note}+ Unit tests are automatically run by pre-commit before Git push, if you've set+ up pre-commit's Git hooks by running the following command.++ ```console+ $ just precommit+ ```++ ````diff --git a/documentation/guides/general_setup.md b/documentation/guides/general_setup.mdnew file mode 100644index 000000000..7d98ea91e--- /dev/null+++ b/documentation/guides/general_setup.md@@ -0,0 +1,225 @@+# General setup guide++This is an exhaustive list for new developers. Feel free to skip the steps that+you have already done on your own.++## Operating system++```{caution}+Openverse development is currently supported only for UNIX-type environments+(Linux and macOS). Windows is not supported natively, but PRs that enable+Openverse development on Windows, or improve the experience, are welcome.+```++```{tip}+We recommend Windows Subsystem for Linux (WSL) as a viable option.+```++Windows Subsystem for Linux can be a much more versatile and familiar+environment for software development on Windows. Everything from installing+`git` and other dependencies to using command line tools that will be familiar+to the wider community of software developers are more likely to be easier under+WSL. While some parts of some Openverse projects may be able to be developed+under native Windows, you will have a much smoother time with WSL as our command+runners (`just` and `pnpm`) assume a UNIX-type environment (Linux and macOS).++Installation instructions for WSL on Windows 10 and 11 can be found in+Microsoft's+[official documentation](https://docs.microsoft.com/en-us/windows/wsl/install).++## Required setup++The following setup steps are needed to set up a local copy of Openverse and do+not prepare you to contribute code to the project.++### Git++Openverse is Git-tracked. To clone Openverse locally, you will need to install+`git`. Most Linux distributions and macOS will already have this installed, even+if it's not always the latest version. To know if you have Git installed, run+the following command.++```console+$ git --version+```++If you see `git version x.y.z`, you have Git installed. If you see an error, you+need to install it by following the+[official instructions](https://git-scm.com/downloads).++### Python++```{note}+This is only needed for working with the Python stack outside of Docker and for+Python automations.+```++We use Python 3 in the backend of our stack. So to work with that part of the+codebase, you will need Python installed. Most Linux distributions and macOS+will already have this installed, even if it's not always the latest version. To+know if you have Python (specifically version 3) installed, run the following+command.++```console+$ python3 --version+```++If you see `Python x.y.z`, you have Python installed. If you see an error, you+need to install it using [pyenv](https://github.com/pyenv/pyenv) or by following+the [official instructions](https://www.python.org/downloads/).++#### Pipenv++Pipenv helps us provision dependencies for our Python packages and automatically+set up a virtualenv, provided you have the version of Python mentioned in the+`Pipfile` installed and accessible locally.++You can install Pipenv by following the+[official instructions](https://pipenv.pypa.io/en/latest/install/#installing-pipenv).++### Node.js++```{note}+This is only needed for working with the frontend and for Node.js automations.+```++We use Node.js in the frontend of our stack. So to work with that part of the+codebase, you will need Node.js installed. To know if you have Node.js+installed, run the following command.++```console+$ node --version+```++If you see `vx.y.z`, you have Node.js installed. If you see an error, you need+to install it using [nvm](https://github.com/nvm-sh/nvm) or by following the+[official instructions](https://nodejs.org/en/download/).++#### Corepack++Corepack helps manage package managers for a project. In any Node.js workspace,+like the [`WordPress/openverse`](https://github.com/WordPress/openverse/)+monorepo for example, Corepack will automatically invoke the right version of+the specified package manager, also installing it if needed and not present.++It's a part of Node.js and present in Node.js versions v14.19.0 and v16.9.0+onwards. So no installation is needed.++### Docker++```{note}+This is only needed for working with the Python stack. The Node.js stack runs+on the host.+```++Our Python packages are published as Docker images to make it easier to work+with them locally during development and also make it easier to deploy new+versions in production.++If you run WSL on Windows, you can+[set up Docker Desktop](https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers#install-docker-desktop).+If not, you can use one of the many+[installation methods](https://docs.docker.com/engine/install/) officially+supported by Docker.++#### Docker Compose++Docker Compose makes it easy to orchestrate multiple services which we put to+use by orchestrating the external services and also the API, ingestion server+and indexer workers locally during development.++Docker Compose is a part of the Docker Desktop installation. To know if you have+Docker Compose installed, run the following command.++```console+$ docker compose version+```++If you see `Docker Compose version vx.y.z`, you have Docker Compose installed.+If you see an error, you need to install it by following the+[official instructions](https://docs.docker.com/compose/install/).++### `just`++We use `just` as our command runner. It makes it easier to run cumbersome+commands that are generally needed a lot during development, like bringing up+our backend services or linting the codebase.++`just` can be [installed](https://github.com/casey/just#installation) for a host+of operating systems via their respective pacakge managers.++````{tip}+If you run `just` inside the Openverse root repo without a recipe name, you can+see a huge list of all the different recipes present in the project.++```console+$ cd openverse/+$ just+```+````++## Development dependencies++The following setup steps are needed to not just setup Openverse but to also+contribute code to the project.++### GitHub++The source code for Openverse is hosted on GitHub. To contribute to Openverse,+you will also need to [sign up](https://github.com/signup) for a GitHub account.+It's free, and considering how much OSS development happens on GitHub, almost+essential.++#### GitHub CLI++It's not necessary, but we recommended to install the GitHub CLI in your+development environment because it makes it convenient to work with GitHub+workflows like filing issues and opening PRs.++You can install the CLI by following the+[official instructions](https://github.com/cli/cli#installation).++### Text editors/IDEs++A good editor or IDE (integrated development environment) makes a lot of+difference when working with software source code. We recommend VS Code or a+JetBrains IDE because that's what we use day-to-day. Feel free to pick a+different editor if you have a preference.++- [VS Code](https://code.visualstudio.com/) is an option with good+ out-of-the-box support for our entire stack.+- [PyCharm and WebStorm](https://www.jetbrains.com/) are other very popular+ options with lots of bells and whistles.+- [Sublime Text](https://www.sublimetext.com/) is a minimalistic option that can+ get you off the ground quickly with lots of room for expansion through it's+ package system.+- [vim](https://www.vim.org/) and [emacs](https://www.gnu.org/software/emacs/)+ are ubiquitous terminal-based options.++## Optional development setup++The following setup steps are only needed in very specific scenarios.++### mkcert++```{note}+This is only needed to test SSL locally.+```++To test SSL locally, install `mkcert` (and the corresponding+[NSS](https://firefox-source-docs.mozilla.org/security/nss/index.html) tools) by+following the+[official instruction](https://github.com/FiloSottile/mkcert#installation). You+can run `mkcert -install` to verify your installation.++### OpenSSL++```{note}+This is only need if the `psycopg2` install fails with the `ld: library not+found for -lssl` error when running the project outside Docker.+```++This `psycopg2` package can fail to install on Apple Silicon Macs with the+`ld: library not found for -lssl` error. To rectify this, install `openssl` via+Homebrew and set `LDFLAGS` and `CPPFLAGS` as per the instructions in the output+of the Homebrew installation.diff --git a/documentation/guides/index.md b/documentation/guides/index.mdindex e976780aa..f374a12d7 100644--- a/documentation/guides/index.md+++ b/documentation/guides/index.md@@ -5,7 +5,11 @@ Here you will find guides to get you started with Openverse development.```{toctree}:maxdepth: 1+general_setupquickstart+api/index+ingestion_server/index+frontend/indexruntesthttpsdiff --git a/documentation/guides/ingestion_server/develop.md b/documentation/guides/ingestion_server/develop.mdnew file mode 100644index 000000000..bb64df467--- /dev/null+++ b/documentation/guides/ingestion_server/develop.md@@ -0,0 +1,3 @@+# Development guide++Here's the comprehensive guide for developing the Openverse ingestion server.diff --git a/documentation/guides/ingestion_server/index.md b/documentation/guides/ingestion_server/index.mdnew file mode 100644index 000000000..573fb671e--- /dev/null+++ b/documentation/guides/ingestion_server/index.md@@ -0,0 +1,7 @@+# Ingestion server++```{toctree}+:maxdepth: 1++test+```diff --git a/documentation/guides/ingestion_server/test.md b/documentation/guides/ingestion_server/test.mdnew file mode 100644index 000000000..18a9f9553--- /dev/null+++ b/documentation/guides/ingestion_server/test.md@@ -0,0 +1,25 @@+# Testing guide++Once you've made some changes to the codebase, it is important to run tests.++## Steps++1. Ensure you've gone through the [quickstart guide](../quickstart.md). Ensure+ that the Docker daemon is running.++2. Install the Python dependencies, including dev-dependencies.++ ```console+ $ just ingestion_server/install+ ```++ ```{caution}+ If you experience error installing `psycopg2`, refer to the documentation+ about the [OpenSSL prerequisite](../general_setup.md#openssl).+ ```++3. Run the tests.++ ```console+ $ just ingestion_server/test-local+ ```diff --git a/documentation/guides/quickstart.md b/documentation/guides/quickstart.mdindex a07fc75d6..3efda9553 100644--- a/documentation/guides/quickstart.md+++ b/documentation/guides/quickstart.md@@ -1,30 +1,12 @@-# Quickstart+# Quickstart guideThis guide covers the steps to get the Openverse stack running locally on yourcomputer.## Prerequisites-- [Git](https://git-scm.com/downloads)-- [Docker](https://docs.docker.com/install/)-- [Docker Compose](https://docs.docker.com/compose/install/)-- [Just](https://github.com/casey/just)-- [coreutils](https://formulae.brew.sh/formula/coreutils) (only for macOS)--The following prerequisites are optional, and only needed in some very specific-cases.--- [mkcert](https://github.com/FiloSottile/mkcert)-- This is only needed to test SSL locally. Ensure that you have installed- `mkcert` (and the corresponding NSS tools). You can run `mkcert -install` to- verify your installation.--- [OpenSSL](https://formulae.brew.sh/formula/openssl)-- This is only need if the `psycopg2` install fails with the- `ld: library not found for -lssl` error. Install `openssl` from Homebrew and- set `LDFLAGS` and `CPPFLAGS` as given in the installation output.+Refer to the [general setup guide](./general_setup.md) for setting up the+prerequisites.## Steps@@ -32,14 +14,24 @@ cases.Docker daemon is running.2. Clone the repository to your computer. Then switch to the cloned directory.+ If you're planning to contribute, fork the repo and clone your fork instead.++ ```console+ $ git clone https://github.com/WordPress/openverse.git # or your fork+ $ cd openverse/+ ```++ If you followed the setup guide and installed+ [GitHub CLI](./general_setup.md#github-cli), you can clone more simply using+ the `gh` command.```console- $ git clone https://github.com/WordPress/openverse.git- $ cd openverse+ $ gh repo clone WordPress/openverse # or your fork+ $ cd openverse/```3. Install all dependencies. This is generally not advisable unless you plan to- work on everything! This step won't install API or ingestion-server+ work on everything! This step won't install API or ingestion serverdependencies because they are meant to run using Docker containers.```consolediff --git a/documentation/index.md b/documentation/index.mdindex 4292113d1..dd1c57427 100644--- a/documentation/index.md+++ b/documentation/index.md@@ -9,7 +9,7 @@ use the Openverse API, you should instead refer to the<!-- These use HTML anchors because Sphinx treats them as internal references without scheme. -->- <a href="./storybook">Storybook</a> (UI components)-- <a href="./tcv">Tailwind Config Viewer</a> (design tokens)+- <a href="./tailwind">Tailwind Config Viewer</a> (design tokens)## Table of contentsdiff --git a/documentation/justfile b/documentation/justfileindex 3407bc4de..7182a99d3 100644--- a/documentation/justfile+++ b/documentation/justfile@@ -29,3 +29,7 @@ build:# Serve the compiled docs using a simple HTTP serverserve port="50231":pipenv run python -m http.server -d _build/ {{ port }}++# Delete the live server and build output directories+clean:+ rm -rf _serve/ _builddiff --git a/documentation/reference/dev_flow.md b/documentation/reference/dev_flow.mdnew file mode 100644index 000000000..daf63a9a9--- /dev/null+++ b/documentation/reference/dev_flow.md@@ -0,0 +1,26 @@+# Development workflow++To contribute code to Openverse, follow the following steps.++1. Complete the [general setup](../guides/general_setup.md) of your development+ environment.++2. Fork the repository you want to contribute to. When you make a code change+ you will push the changes to a branch on your fork and make a PR to the+ original repo to incorporate those changes.++ Go to the repository page on GitHub and find the "Fork" button in the upper+ corner of the page. Click this and GitHub will guide you through the process+ of forking the repository.++3. Make sure to go through the [quickstart guide](../guides/quickstart.md) to+ have your local environment set up and running.++4. Work on the issue you've chosen. Check out a new branch from `main`, named+ after the issue you're solving. Create commits on this branch and push to+ your fork.++5. Once you have the solution, make a PR from your working branch on your fork+ to the `main` branch on the `origin` repo. You can make a PR even before you+ have a solution, but you should mark it as a draft. That PR will+ automatically update when you create new commits on your work branch.diff --git a/documentation/reference/github_contribution_practices.md b/documentation/reference/github_contribution_practices.mdnew file mode 100644index 000000000..e0d2a33e1--- /dev/null+++ b/documentation/reference/github_contribution_practices.md@@ -0,0 +1,75 @@+# GitHub contribution practices++Here are some of the practices we follow at Openverse when it comes to GitHub+contributions.++## GitHub labels++### Aspect++There are many [aspects](https://github.com/WordPress/openverse/labels?q=aspect)+in which the Openverse project can be improved. These can directly involve the+code but there are other related areas such as documentation and interfaces.++### Technology++Openverse projects span a lot of languages, frameworks, tools and+[technologies](https://github.com/WordPress/openverse/labels?q=tech) across the+stack from JavaScript and TypeScript on the frontend to Python on the backend.++### Stack++Openverse spans a tall+[stack](https://github.com/WordPress/openverse/labels?q=stack), from the catalog+at the innermost level, followed by the ingestion server, the API and the+frontend. There is scope of improvement at each level.++### Contributor friendliness++We use two labels to identify issues that have been specifically created or+selected for new contributors:+["help wanted"](https://github.com/WordPress/openverse/issues?q=is:issue+is:open+sort:updated-desc+label:%22help+wanted%22)+and+["good first issue"](https://github.com/WordPress/openverse/issues?q=is:issue+is:open+sort:updated-desc+label:%22good+first+issue%22).++#### Help wanted++These are issues that are friendly for outside contributors because they are not+urgent, have well-defined scope and don't need any special access, permissions+or knowledge that contributors might not have.++#### Good first issues++These issues are a subset of [issues wanting help](#help-wanted) that are+smaller in scope, make for a gentle introduction to the code and can be+completed in under ~4 hours (including the [setup](../guides/general_setup.md)).++```{caution}+In reality, the process can take more time if the setup process does not go+smoothly. In such cases, we encourage you to share your experience in an issue.+We will try to prevent those roadblocks for future contributors.+```++Items marked with the good first issue label are intended for first-time or new+contributors. It indicates that members will keep an eye out for these issues+and shepherd the contributors and their PRs through our processes.++All "good first issues" are "help wanted" but not vice versa.++## Choosing an issue++The right issue to work on is one whose aspect, technology and stack labels+match your interested area of work. Making contributions will be easier if these+align with your forte, but they don't necessarily have to.++You can filter issues based on these labels to find one that matches all of the+following criteria.++- Is open.+- Has the "help wanted" label.+- Does not have someone working on it in the last ~7 days.+- Has not recently been requested by someone else.++Once you've picked an issue to work on, please leave a comment saying so on the+issue and tag `@WordPress/openverse-maintainers` in the comment. That way the+team will be notified and one of us will assign the issue to you.diff --git a/documentation/reference/index.md b/documentation/reference/index.mdindex 2cde6de19..888abea08 100644--- a/documentation/reference/index.md+++ b/documentation/reference/index.md@@ -3,6 +3,8 @@```{toctree}:maxdepth: 1+github_contribution_practices+dev_flowapi/indexsearch_algorithm```diff --git a/frontend/meta_docs/CONTRIBUTING.md b/frontend/meta_docs/CONTRIBUTING.mddeleted file mode 100644index 589d5bef2..000000000--- a/frontend/meta_docs/CONTRIBUTING.md+++ /dev/null@@ -1,127 +0,0 @@-# Contributing to Openverse--Thank you for your interest in contributing to Openverse! This document is a set-of guidelines to help you contribute to this project.--## Code of Conduct--By participating in this project, you are expected to uphold our-[Code of Conduct](../../CODE_OF_CONDUCT.md).--## Project Documentation--Please consult the [README](README.md) file at the root of this repository.--## How to Contribute--Please read the processes in our general-[Contributing Code](https://creativecommons.github.io/contributing-code/)-guidelines on the Creative Common Open Source website. It contains some general-instructions that should be followed when contributing to any of the WP Photos-open-source repositories.--### Bugs and testing--If you find a bug, please open an issue in this repository describing the bug.-You can file a bug-[here](https://github.com/wordpress/openverse-frontend/issues/new?template=bug_report.md).-You will see a bug report template with the required information you should-provide.--Please see our [testing guidelines](TESTING_GUIDELINES.md) for general-instructions and recommendations for how to test the application.--### Proposing changes or new features--If you have an idea of a new feature or change to how the Openverse frontend-works, please-[file an issue](https://github.com/wordpress/openverse-frontend/issues/new?template=feature_request.md)-so we can discuss the possibility of that change or new feature being-implemented and released in the future. This lets us come to an agreement about-the proposed idea before any work is done.--If you'd like to build a new feature but don't have a specific idea, please-check out the historic-[public roadmap](https://docs.google.com/document/d/19yH2V5K4nzWgEXaZhkzD1egzrRayyDdxlzxZOTCm_pc/).-Choose something from the pipeline of ideas and follow the same process as-above.--### Pull requests--Before you start writing code, make sure there is an issue open. Pull requests-without a link to an existing issue won't be merged. All pull requests _must_-target the `main` branch of the repository.--If you want to get started contributing code to this project but don't know-exactly what to work on, we compiled a good list of issues labeled as-['good first issues'](https://github.com/wordpress/openverse-frontend/labels/good%20first%20issue)-which are small in scope and not so complex to solve. There are also issues-labeled as-['help wanted'](https://github.com/wordpress/openverse-frontend/labels/help%20wanted)-which can be a bit more complex but are good examples of things we are currently-accepting help from the community.--Any code modifications will have to be accompanied by the appropriate unit-tests. This will be checked and verified during code review. Once the pull-request is opened, our CI server will run the unit test suite and run a code-linter to verify that the code follows the coding guidelines.--If you want to run the unit tests and linter on your machine, run the following-commands:--`pnpm test:unit` for unit tests--`pnpm lint` for linter.--You can also configure your editor of choice with a ESLint plugin so you can get-the linter feedback as you write code.--### Types--We use native TypeScript everywhere we can. Currently there are very few edge-cases where it is not possible to use TypeScript, primarily in older components-that do not use the composition-api or that rely on Nuxt's auto-component-importing.--TypeScript support for Vue 2 is limited to composition-api based components-(i.e., components that use `defineComponent` and declare a `setup` function). If-you'd like to use TypeScript for a Vue SFC, add `lang="ts"` to the `script` tag-and add the file to the `tsconfig.json` `includes` array.--Elsewhere, simply use (and prefer) the `.ts` extension for all new files.--See-[Vue's official documentation about IDE support for Vue with TypeScript](https://vuejs.org/guide/typescript/overview.html#ide-support)-for guides on how to set up your editor.--#### JSDoc TypeScript--Some older modules use JSDoc flavored TypeScript. This was primarily used before-the project had included support for native TypeScript. Please do not extend the-use of JSDoc TypeScript outside of modules that already use it. If you feel so-inclined, we always welcome PRs updating such modules to native TypeScript.--### Styles/CSS--We use [Tailwind CSS](https://tailwindcss.com/) for writing styles. There are-some legacy components that have been written in "hand-written" CSS. Our aim is-to eventually re-write these using Tailwind classes.--Our Tailwind configuration lives at-[`./tailwind.config.js`](./tailwind.config.js) and is a useful reference for-Openverse specific spacing and color classes. Please refer to the official-[Tailwind CSS documentation](https://tailwindcss.com/docs) for a detailed and-searchable list of the available classes. At times you'll need to cross-reference this documentation with our specific configuration in the-`tailwind.config.js` file.--We also use the [Tailwind CSS RTL](https://github.com/20lives/tailwindcss-rtl)-plugin to make writing-[right-to-left (RTL)](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)-styles seamless. Most use cases of the right/left based classes should use the-start/end variants introduced by the plugin instead.--## Questions or Thoughts?--Feel free to [join us on Slack](https://make.wordpress.org/chat/) and discuss-the project with the engineers and community members on #openverse.diff --git a/frontend/meta_docs/README.md b/frontend/meta_docs/README.mddeleted file mode 100644index 3b40e5124..000000000--- a/frontend/meta_docs/README.md+++ /dev/null@@ -1,341 +0,0 @@-<img src="https://github.com/WordPress/openverse/raw/main/brand/banner.svg" width="100%"/>--<p align="center">- <a href="https://github.com/orgs/WordPress/projects/3">Project Board</a> | <a href="https://make.wordpress.org/openverse/">Community Site</a> | <a href="https://make.wordpress.org/chat/">#openverse @ Slack</a> | <a href="https://make.wordpress.org/openverse/handbook/">Handbook</a> | <a href="https://www.figma.com/file/w60dl1XPUvSaRncv1Utmnb/Openverse-Releases">Figma Mockups</a> | <a href="https://www.figma.com/file/GIIQ4sDbaToCfFQyKMvzr8/Openverse-Design-Library">Figma Design Library</a>-</p>--# Openverse Frontend----This repository is the frontend UI for accessing and exploring the-openly-licensed content provided by the-[Openverse API](https://github.com/wordpress/openverse-api).--You can view [the application](https://wordpress.org/openverse) live on-WordPress.org.--## Technology--The frontend app is built using [Vue.js](https://vuejs.org/) and-[Nuxt.js](https://nuxtjs.org).--## Local Development--**Note for Windows users:** Please use-[WSL](https://docs.microsoft.com/en-us/windows/wsl/install) for developing on-the Openverse frontend. Several scripts, primarily support scripts, rely on a-general \*nix type environment. Maintaining parity for cross platform scripts-proved complicated without significant duplication. If you run into issues with-running the Openverse frontend in WSL please let us know by opening an issue or-[joining us on Slack](https://make.wordpress.org/chat/) in the `#openverse` room-and ask for help.--We use [Volta](https://volta.sh/) to manage our local environment tools. Please-install it using the instructions on their website.--Before installing pnpm, make sure to switch to node version 16 using Volta:--```bash-volta install node@16-```--Once you have volta installed, manually install `pnpm` using volta.-[Volta does not currently officially support `pnpm`](https://github.com/volta-cli/volta/issues/737)-so this is a stop gap solution until that support is implemented:--```bash-volta install pnpm-```--Run the following commands in order to have the code up and running on your-machine:--```bash-# Builds and serves assets with hot-reload-# Automatically invokes pnpm install and pnpm i18n-volta run pnpm dev-```--If you intend to change any text in the app, you will need to edit-`src/locales/scripts/en.json5`. To ensure your changes are reflected-immediately, run the following command.--```bash-# Watches the en.json5 file and updates the en.json file for every change.-pnpm i18n:watch-en-```--### Using HTTPS Locally--To enable SSL support in local development, use the `pnpm dev:secure` command.-This requires you to have a private key and certificate in the root of the-repository with the following names:--```shell-localhost+1-key.pem # The private key file-localhost+1.pem # The certificate file-```--The easiest way to create these files is with a local development tool called-[mkcert](https://github.com/FiloSottile/mkcert). First make sure you have-[mkcert installed](https://github.com/FiloSottile/mkcert#installation) and-activated with `mkcert -install`. Then use `mkcert` to create a certificate for-`localhost` and for the external IP address used by Nuxt's development process.-That command looks like this:--```shell-mkcert localhost 192.168.50.119-```--Be sure to replace the IP address in the example with your own. See the next-section for how to identify that IP address.--#### Finding your local IP address <a name = "finding-your-local-ip-address"></a>--You can find the local IP address Nuxt uses by looking at the output of-`nuxt dev`. Look in your console for a box of configuration details that looks-like this:--```bash-# ╭───────────────────────────────────────────╮-# │ │-# │ Nuxt @ v2.15.8 │-# │ │-# │ ▸ Environment: development │-# │ ▸ Rendering: server-side │-# │ ▸ Target: server │-# │ │-# │ Listening: http://192.168.50.119:8443/ │ # <-- Use this IP Address-# │ │-# ╰───────────────────────────────────────────╯-```--You will need to regenerate the certificate if this IP address changes for any-reason, like by enabling a VPN or changing networks.--### Choosing which API to use--You don't need to have the Openverse API running locally to be able to run the-frontend application. It's configured to communicate, by default, with the-[production API](https://api.openverse.engineering) that's already publicly-available. If you need to test against changes in your local API, set the-`API_URL` environment variable when run the development server.--```shell-API_URL=http://localhost:8000 pnpm dev-```--### Standalone and embedded modes--The application can run in two modes. By default, it runs in embedded mode,-which is loaded in an iframe on-[WordPress.org/openverse](https://make.wordpress.org/openverse). It has a small-header without logo and no footer. The standalone mode which has a large header-with logo and a footer, can be enabled by adding `?embedded=false` query-parameter to the URL. For example, when running locally, you can go to-[http://localhost:8443?embedded=false](http://localhost:8443?embedded=false) to-view the standalone application.--### Running tests--Refer to the [`TESTING_GUIDELINES.md` file](TESTING_GUIDELINES.md) for-instructions on how to run tests.--### localhost tunneling--If you want to make your local development server accessible to the internet-(for testing or showing someone something you're working on), you can use-[`ngrok`](https://ngrok.com/). Follow the documentation on the `ngrok` site to-install it and set it up. Once you have it installed, get the development server-for Openverse running and in a separate window/tab, run:--```-# The extra parameters are required to ensure that ngrok redirects to the HTTPS version of the site-# and that the host header matches one that is accepted by the server-# (ngrok's default hostname is randomly generated and is not whitelisted).-ngrok http http://localhost:8443 -host-header="localhost:8443"-```--If you need to run an HTTP version (for example, if you're testing against-third-party websites that do not accept the self-signed certificate generated by-the dev server), run the dev server using `pnpm dev` and use the following-command to start `ngrok`:--```bash-ngrok http 8443 -host-header="localhost:8443"-```--## Frontend Components--The frontend app is composed of a number of components that are documented in-our [Storybook](https://wordpress.github.io/openverse-frontend).--### How to create a component--To create a component you can run:--```shell-# Make sure you have run `pnpm install` at least once before.-pnpm run create:component [component name in PascalCase]-for example: pnpm run create:component VButtonGreen-```--This command will create a component file, a story file for the component, a-unit test file, and a regression test file. It also adds the component name to-tsconfig.ts `include` property. Each file will have a basic template to start-working with. We use the-[itsjonq/remake](https://www.npmjs.com/package/@itsjonq/remake?activeTab=readme)-package to create files out of templates.--You can also create all those files manually by running the following commands:--<b>create a component file </b>--```-pnpm run create:component-sfc --output=[path] --name=[component name]-```--<b>create a story file </b>--```-pnpm run create:story --output=[path] --name=[component name]-```--<b>create a component unit test file</b>--```-pnpm run create:component-unit-test --output=[path] --name=[component name] --fileName=[component name in kebab-case]-```--<b>create a component regression test file</b>--```-pnpm run create:component-storybook-test --output=[path] --name=[component name kebab-case] --fileName=[component name in kebab-case]-```--### CSS Framework--To design our components, we use the [TailwindCSS](https://tailwindcss.com/)-utility-first CSS framework. We have compiled a list of TailwindCSS classes that-are used in the frontend app. You can view the list-[here](https://wordpress.github.io/openverse-frontend/tailwind/).--### Development Tips--If you use VS Code, you can install the-[Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)-extension to get autocomplete for TailwindCSS classes.--## Docker and Openverse frontend--We do not currently support local development using Docker or `docker-compose`.-It was supported in the past, but it was not used by the core contributors. It-remained broken for many months without ever being noticed, so the assumption is-that it was also not being used active community members. Local `nuxt`-development is still easy across platforms, so maintaining a separate Docker-development stack for the frontend did not make sense.--However, we do build and actively deploy the frontend using Docker images. If-you wish to build the production image for yourself, run the following:--```shell-pnpm docker:build-```--You can also find the latest `openverse-frontend` images on our-[GitHub packages page](https://github.com/WordPress/openverse-frontend/pkgs/container/openverse-frontend).--You can then run using either the locally built image or the `ghcr.io` image-from the link above:--```shell-pnpm docker:run-```--The app will be available at <http://localhost:8443>.--> **Note**: If you are _not_ using HTTPS locally, do not use the URL provided by-> Nuxt - this will cause certificate errors because it gets rerouted to HTTPS.-> E.g. this link will not work:->-> ```-> $ pnpm docker:run->-> > [email protected] start-> > nuxt start->-> ℹ Sentry reporting is disabled ("disabled" option has been set) nuxt:sentry 18:22:32->-> ╭─────────────────────────────────────────╮-> │ │-> │ Nuxt @ v2.15.8 │-> │ │-> │ ▸ Environment: production │-> │ ▸ Rendering: server-side │-> │ ▸ Target: server │-> │ │-> │ Memory usage: 48.2 MB (RSS: 152 MB) │-> │ │-> │ Listening: http://172.17.0.2:8443/ │ <-- Won't work unless HTTPS is set up-> │ │-> ╰─────────────────────────────────────────╯-> ```--## Formatting and Linting--The code in this repository is formatted using `prettier`. If you have prettier-setup in your code editor it should work out of the box; otherwise you can use-the `pnpm lint:fix` script to format and fix lint errors in your code. Checks-are run to lint your code and validate the formatting using Git hooks managed by-[pre-commit](https://pre-commit.com).--You will need to fix any linting issues before committing. We recommend-formatting your JavaScript files on save in your text editor. You can learn how-to do this in Visual Studio Code-[here](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode#format-on-save).--### File name conventions--All files and folders should be written in `kebab-case`, with the exception of-Vue single file components. If it ends in `.vue`, please use `PascalCase`. This-distinction makes our component files stand out clearly and is-[recommended by the Vue community](https://vuejs.org/v2/style-guide/#Single-file-component-filename-casing-strongly-recommended).--## Redirects <a name = "redirects"></a>--| From | To | Status code | Setup level |-| ------------ | ----------- | ----------- | ---------------------- |-| /photos/\_id | /image/\_id | 301 | Nuxt server middleware |--## Just--If [`just`](https://github.com/casey/just) is your preferred command runner, you-can also use `just run {script}` to run any pnpm script and `just` on its own to-list the available scripts (e.g. `just run docker:build`). Our other projects-use `just` as their primary script runner, so this allows parity with both the-API and the catalog.--## Contributing--Pull requests are welcome! Feel free to-[join us on Slack](https://make.wordpress.org/chat/) and discuss the project-with the engineers and community members on #openverse.--You are welcome to take any open issue in the tracker labeled-[`help wanted`](https://github.com/wordpress/openverse-frontend/labels/help%20wanted)-or-[`good first issue`](https://github.com/wordpress/openverse-frontend/labels/good%20first%20issue);-**there's no need to ask for permission in advance**. Other issues are open for-contribution as well, but may be less accessible or well defined in comparison-to those that are explicitly labeled.--## Acknowledgments--Openverse, previously known as CC Search, was conceived and built at-[Creative Commons](https://creativecommons.org). We thank them for their-commitment to open source and openly licensed content, with particular thanks to-previous team members @ryanmerkley, @janetpkr, @lizadaly, @sebworks, @pa-w,-@kgodey, @annatuma, @mathemancer, @aldenstpage, @brenoferreira, and @sclachar,-along with their-[community of volunteers](https://opensource.creativecommons.org/community/community-team/).diff --git a/ingestion_server/justfile b/ingestion_server/justfileindex d0b0afc98..9980c541e 100644--- a/ingestion_server/justfile+++ b/ingestion_server/justfile@@ -11,8 +11,8 @@ NO_COLOR := "\\033[0m"# Install dependencies-install:- pipenv install --dev+install *args="--dev":+ pipenv install {{ args }}########### Health #diff --git a/justfile b/justfileindex 28bfca853..37558ccd9 100644--- a/justfile+++ b/justfile@@ -76,9 +76,9 @@ precommit:echo "Skipping pre-commit installation"fi-# Run pre-commit to lint and reformat all files-lint:- python3 pre-commit.pyz run --all-files+# Run pre-commit to lint and reformat files+lint hook="" *files="": precommit+ python3 pre-commit.pyz run {{ hook }} {{ if files == "" { "--all-files" } else { "--files" } }} {{ files }}######### Init #