diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index aabbc0f0a..677258e6f 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -1,12 +1,12 @@ --- name: 💬 Question -about: If you need help understanding HumanConnection. +about: If you need help understanding ocelot.social. labels: question title: 💬 [Question] --- - - + + ## :speech_balloon: Question diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index de956e17b..1c7927665 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,7 @@ on: push: branches: - master + # - 4451-new-deployment-with-base-and-code # for testing while developing jobs: ############################################################################## @@ -92,7 +93,10 @@ jobs: # BUILD BACKEND DOCKER IMAGE (production) ################################ ########################################################################## - name: Backend | Build `production` image - run: docker build --target production -t "ocelotsocialnetwork/backend:latest" -t "ocelotsocialnetwork/backend:${VERSION}" -t "ocelotsocialnetwork/backend:${BUILD_VERSION}" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT backend/ + run: | + docker build --target base -t "ocelotsocialnetwork/backend:latest-base" -t "ocelotsocialnetwork/backend:${VERSION}-base" -t "ocelotsocialnetwork/backend:${BUILD_VERSION}-base" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT backend/ + docker build --target code -t "ocelotsocialnetwork/backend:latest-code" -t "ocelotsocialnetwork/backend:${VERSION}-code" -t "ocelotsocialnetwork/backend:${BUILD_VERSION}-code" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT backend/ + docker build --target production -t "ocelotsocialnetwork/backend:latest" -t "ocelotsocialnetwork/backend:${VERSION}" -t "ocelotsocialnetwork/backend:${BUILD_VERSION}" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT backend/ - name: Backend | Save docker image run: docker save "ocelotsocialnetwork/backend" > /tmp/backend.tar - name: Upload Artifact @@ -129,7 +133,10 @@ jobs: # BUILD WEBAPP DOCKER IMAGE (build) ###################################### ########################################################################## - name: Webapp | Build `production` image - run: docker build --target production -t "ocelotsocialnetwork/webapp:latest" -t "ocelotsocialnetwork/webapp:${VERSION}" -t "ocelotsocialnetwork/webapp:${BUILD_VERSION}" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT webapp/ + run: | + docker build --target base -t "ocelotsocialnetwork/webapp:latest-base" -t "ocelotsocialnetwork/webapp:${VERSION}-base" -t "ocelotsocialnetwork/webapp:${BUILD_VERSION}-base" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT webapp/ + docker build --target code -t "ocelotsocialnetwork/webapp:latest-code" -t "ocelotsocialnetwork/webapp:${VERSION}-code" -t "ocelotsocialnetwork/webapp:${BUILD_VERSION}-code" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT webapp/ + docker build --target production -t "ocelotsocialnetwork/webapp:latest" -t "ocelotsocialnetwork/webapp:${VERSION}" -t "ocelotsocialnetwork/webapp:${BUILD_VERSION}" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT webapp/ - name: Webapp | Save docker image run: docker save "ocelotsocialnetwork/webapp" > /tmp/webapp.tar - name: Upload Artifact @@ -166,7 +173,10 @@ jobs: # BUILD MAINTENANCE DOCKER IMAGE (build) ################################# ########################################################################## - name: Maintenance | Build `production` image - run: docker build --target production -t "ocelotsocialnetwork/maintenance:latest" -t "ocelotsocialnetwork/maintenance:${VERSION}" -t "ocelotsocialnetwork/maintenance:${BUILD_VERSION}" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT webapp/ -f webapp/Dockerfile.maintenance + run: | + docker build --target base -t "ocelotsocialnetwork/maintenance:latest-base" -t "ocelotsocialnetwork/maintenance:${VERSION}-base" -t "ocelotsocialnetwork/maintenance:${BUILD_VERSION}-base" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT webapp/ -f webapp/Dockerfile.maintenance + docker build --target code -t "ocelotsocialnetwork/maintenance:latest-code" -t "ocelotsocialnetwork/maintenance:${VERSION}-code" -t "ocelotsocialnetwork/maintenance:${BUILD_VERSION}-code" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT webapp/ -f webapp/Dockerfile.maintenance + docker build --target production -t "ocelotsocialnetwork/maintenance:latest" -t "ocelotsocialnetwork/maintenance:${VERSION}" -t "ocelotsocialnetwork/maintenance:${BUILD_VERSION}" --build-arg BBUILD_DATE=$BUILD_DATE --build-arg BBUILD_VERSION=$BUILD_VERSION --build-arg BBUILD_COMMIT=$BUILD_COMMIT webapp/ -f webapp/Dockerfile.maintenance - name: Maintenance | Save docker image run: docker save "ocelotsocialnetwork/maintenance" > /tmp/maintenance.tar - name: Upload Artifact diff --git a/CHANGELOG.md b/CHANGELOG.md index 487dbe2a6..e7e69342a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,43 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -#### [v1.0.2](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/1.0.1...v1.0.2) +#### [v1.0.4](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/1.0.3...v1.0.4) +- fixed wrong env variable [`#4474`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4474) +- chore: [WIP] 🍰 New Deployment With 'base' And 'code' Docker Images [`#4452`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4452) +- feat: 🍰 Flexible Footer Links [`#4468`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4468) +- docs: 🍰 Correct 'Contribution.md' [`#4466`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4466) +- docs: 🍰 Correct Discord Links And Divers [`#4461`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4461) +- Implement flexible page footer links [`1bd4af6`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/1bd4af6fd3b5db167575910948a0a72461a1129a) +- Implement tests for flexible page footer links [`627a20f`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/627a20f66a65450996a5fe3128fd37769fdfd629) +- Correct Discord links and divers [`0318910`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/0318910488e245c4a1d09181265de63d05a89cf1) + +#### [1.0.3](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/1.0.2...1.0.3) + +> 19 May 2021 + +- chore: 🍰 Release v1.0.3 [`#4435`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4435) +- chore: 🍰 Refactor Logos [`#4433`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4433) +- feat: 🍰 Show Password Component [`#4370`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4370) +- chore: 🍰 Replace Ocelot Logos 619x593 With 600x570 [`#4428`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4428) +- Coverage [`#4393`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4393) +- correct_docker_tagging [`#4391`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4391) +- 🍰 Get Cypress Tests Running Again [`#4338`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4338) +- frontend + backend coverage tests [`#4367`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4367) +- refactor: 🍰 Refactor E-Mail Templates [`#4350`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4350) +- feat: 🍰 Remove More-Info Of Post [`#4316`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4316) +- have cypress running locally - the tests still fail [`e3e0341`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/e3e03415e1bd9e0be88f33930a52e63d8af64ee1) +- have cypress running locally - the tests still fail [`0ec0574`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/0ec05743751cfef0cb86c17b87e9e4ef9a2c9e47) +- Refactor logos, first step [`ff6cc30`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/ff6cc306aff6150a924f1a647387e498d050ea9f) + +#### [1.0.2](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/1.0.1...1.0.2) + +> 6 April 2021 + +- fix: Email Confirmation-Link When An Invite-Code Is Given [`#4336`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4336) +- release v1.0.2 [`e583010`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/e5830101e4b449905fe2d0018627d75af62b2a20) - slider jumps to enter-nonce when link contains invite-code, email and nonce and method is invite-code. Thanks @tirokk [`c80b3a2`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/c80b3a212835f76cfc2f11542345d6c3b226995b) - fix enail confirmation link when an invite-code is given [`27f0de9`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/27f0de9464685c8f960bde9d07986fdc5b20f8f9) -- linting [`21a667e`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/21a667eb25a236c69f69b61f24d1578ea005a910) #### [1.0.1](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/1.0.0...1.0.1) @@ -136,21 +168,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - file upload: refactored [`650e83f`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/650e83f4c250389477933a2e7d21d8245b0ce882) - change user role: tests are working [`14dfe2a`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/14dfe2ae2cd4a24c06c9229893b33586dfceae4f) -#### [0.6.5](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/v0.6.4...0.6.5) +#### [0.6.5](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/0.6.4...0.6.5) > 8 February 2021 -- - adjusted changelog to ocelot-social repo [`9603882`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/9603882edebf8967e05abfa94e4e1ebf452d4e24) -- - first steps towards docker image deployment & github autotagging [`5503216`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5503216ad4a0230ac533042e4a69806590fc2a5a) -- - deploy structure image [`a60400b`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/a60400b4fe6f59bbb80e1073db4def3ba205e1a7) - -#### [v0.6.4](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/0.6.4...v0.6.4) - -> 9 February 2021 - -- chore(release): 0.6.4 [`8b7570d`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/8b7570dc35d0ea431f673a711ac051f1e1320acb) -- change user roles is working, test fails [`8c3310a`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/8c3310abaf87c0e5597fec4f93fb37d27122c9e7) -- change user role: tests are working [`f10da4b`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/f10da4b09388fe1e2b85abd53f6ffc67c785d4c1) +- updated CHANGELOG.md [`9d9075f`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/9d9075f2117b2eb4b607e7d59ab18c7e655c6ea7) #### [0.6.4](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/0.6.3...0.6.4) @@ -160,15 +182,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - fetch full history [`5ecee4d`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5ecee4d73a92d2e5c5ae971d79848ed27f65a72c) - don't fail if tag exists (release) [`39c82fc`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/39c82fcb37d5c8e7e78a79288e1ef6280f8d0892) -#### [0.6.3](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/v0.6.3...0.6.3) - -> 8 February 2021 - -- - adjusted changelog to ocelot-social repo [`9603882`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/9603882edebf8967e05abfa94e4e1ebf452d4e24) -- - fixed changelog [`cf70b12`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/cf70b12ed74011924ea788ab932fc9d7ac0e6bd9) -- - yarn install to allow yarn auto-changelog [`fc496aa`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/fc496aa04cb7e804da4335da0cb5cda26f874ea2) - -#### [v0.6.3](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/0.6.0...v0.6.3) +#### [0.6.3](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/0.6.0...0.6.3) > 8 February 2021 @@ -177,9 +191,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - feat: 🍰 Allow Only Supported Image File Formats [`#3928`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/3928) - refactor: Disbale Emoji, Language And Catgeory Filter [`#4193`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4193) - refactor: Remove Catgeories From Post Teaser [`#4191`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4191) +- - adjusted changelog to ocelot-social repo [`9603882`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/9603882edebf8967e05abfa94e4e1ebf452d4e24) - - first steps towards docker image deployment & github autotagging [`5503216`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5503216ad4a0230ac533042e4a69806590fc2a5a) - - lots of additional tests [`0ba37aa`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/0ba37aab18f537d722aede7b87fa0b8e79f80e66) -- - deploy structure image [`a60400b`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/a60400b4fe6f59bbb80e1073db4def3ba205e1a7) #### [0.6.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/v0.6.0...0.6.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5f74d879..50d3721d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,31 +4,33 @@ Thank you so much for thinking of contributing to the Human Connection project! ## Getting Set Up -Instructions for how to install all the necessary software and some code guidelines can be found in our [documentation](https://docs.human-connection.org/human-connection/). +Instructions for how to install all the necessary software and some code guidelines can be found in our main [Readme](/README.md) or in our [documentation](https://docs.human-connection.org/human-connection/). -To get you started we recommend that you join forces with a regular contributor. Please join [our discord instance](https://human-connection.org/discord) to chat with developers or just get in touch directly on an issue on either [Github](https://github.com/Ocelot-Social-Community/Ocelot-Social/issues) or [Zenhub](https://app.zenhub.com/workspaces/ocelotsocial-5fb21ff922cb410015dd6535/board?filterLogic=any&repos=301151089): +To get you started we recommend that you join forces with a regular contributor. Please join [our Discord instance](https://discord.gg/AJSX9DCSUA) to chat with developers or just get in touch directly on an issue on either [Github](https://github.com/Ocelot-Social-Community/Ocelot-Social/issues) or [Zenhub](https://app.zenhub.com/workspaces/ocelotsocial-5fb21ff922cb410015dd6535/board?filterLogic=any&repos=301151089): ![](https://dl.dropbox.com/s/vbmcihkduy9dhko/Screenshot%202019-01-03%2015.50.11.png?dl=0) -We also have regular pair programming sessions that you are very welcome to join! We feel this is often the best way to get to know both the project and the team. Most developers are also available for spontaneous sessions if the times listed below don't work for you – just ping us on discord. +We also have regular pair programming sessions that you are very welcome to join! We feel this is often the best way to get to know both the project and the team. Most developers are also available for spontaneous sessions if the times listed below don't work for you – just ping us on Discord. ## Development Flow We operate in two week sprints that are planned, estimated and prioritised on [Zenhub](https://app.zenhub.com/workspaces/ocelotsocial-5fb21ff922cb410015dd6535/board?filterLogic=any&repos=301151089). All issues are also linked to and synced with [Github](https://github.com/Ocelot-Social-Community/Ocelot-Social/issues). Look for the `good first issue` label if you're not sure where to start! -We try to discuss all questions directly related to a feature or bug in the respective issue, in order to preserve it for the future and for other developers. We use discord for real-time communication. +We try to discuss all questions directly related to a feature or bug in the respective issue, in order to preserve it for the future and for other developers. We use Discord for real-time communication. This is how we solve bugs and implement features, step by step: + 1. We find an issue we want to work on, usually during the sprint planning but as an open source contributor this can happen at any time. 2. We communicate with the team to see if the issue is still available. (When you comment on an issue but don't get an answer there within 1-2 days try to mention @Human-Connection/hc-dev-team to make sure we check in.) 3. We make sure we understand the issue in detail – what problem is it solving and how should it be implemented? -4. We assign ourselves to the issue and move it to `In Progress` on [Zenhub](https://app.zenhub.com/workspaces/human-connection-nitro-5c0154ecc699f60fc92cf11f). +4. We assign ourselves to the issue and move it to `In Progress` on [Zenhub](https://app.zenhub.com/workspaces/ocelotsocial-5fb21ff922cb410015dd6535/board?filterLogic=any&repos=301151089). 5. We start working on it in a `new branch` and open a `pull request` prefixed with `[WIP]` (work in progress) to which we regularly push our changes. 6. When questions come up we clarify them with the team (directly in the issue on Github). 7. When we are happy with our work and our PR is passing all tests we remove the `[WIP]` from the PR description and ask for reviews (if you're not sure who to ask there is @Human-Connection/hc-dev-team which pings all core developers). 8. We then incorporate the suggestions from the reviews into our work and once it has been approved it can be merged into master! Every pull request needs to: + * fix an issue (if there is something you want to work on but there is no issue for it, create one first and discuss it with the team) * include tests for the code that is added or changed * pass all tests (linter, backend, frontend, end-to-end) @@ -38,37 +40,46 @@ Every pull request needs to: There are many volunteers all around the world helping us build this network and without their contributions we wouldn't be where we are today. Big thank you to all of you! -You can see the core team behind Human Connection [on our website](https://human-connection.org/en/the-team/). On Github you will mostly run into our developers: -* Robert (@roschaefer) -* Matt (@mattwr18) +You can talk to our core team on [Discord](https://discord.gg/AJSX9DCSUA). And on Github you will mostly run into our core developers: + +* Ulf (@ulfgebhardt) +* Moriz (@Mogge) * Wolle (@Tirokk) * Alex (@ogerly) + + ## Meetings and Pair Programming Sessions Times below refer to **German Time** – that's CET (GMT+1) in winter and CEST (GMT+2) in summer – because most Human Connection core team members are living in Germany. Daily standup -* every Monday–Friday 11:30 -* in the discord `Conference Room` + +* every Monday–Thursday 11:30 am (german time see above 👆🏼) +* in our [Discord](https://discord.gg/AJSX9DCSUA) `Office Cube` * all contributors welcome! * everybody shares what they are working on and asks for help if they are blocked + ## Philosophy @@ -102,10 +115,9 @@ We use pair programming sessions as a tool for knowledge sharing. We can learn a As a volunteeer you have no commitment except your own self development and your awesomeness by contributing to this free and open-source software project. Cheers to you! - ## Open-Source Bounties -There are so many good reasons to contribute to Human Connection +There are so many good reasons to contribute to ocelot.social * You learn state-of-the-art technologies * You build your portfolio @@ -121,7 +133,7 @@ pull request approved and merged for free**. You can choose something really quick and easy. What's important is starting a working relationship with the team, learning the workflow, and understanding this contribution guide. You can filter issues by 'good first issue', to get an idea where to start. Please join -our our [community chat](https://human-connection.org/discord), too. +our our [Discord community chat](https://discord.gg/AJSX9DCSUA), too. You can filter Github issues with label [bounty](https://github.com/Ocelot-Social-Community/Ocelot-Social/issues?q=is%3Aopen+is%3Aissue+label%3Abounty). These issues should have a second label `€` which indicate their respective financial compensation in Euros. diff --git a/README.md b/README.md index 9c948e7fb..416fcaefb 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ocelot.social is a nonprofit social, action and knowledge network that connects * **Action**: Don't just read about how to make the world a better place, but come into **Action** by following provided suggestions on the **Action** tab provided by other people or **Organisations**.

- Ocelot-Social + ocelot.social

## Live demo @@ -31,6 +31,7 @@ Logins: ## Directory Layout There are four important directories: + * [Backend](./backend) runs on the server and is a middleware between database and frontend * [Frontend](./webapp) is a server-side-rendered and client-side-rendered web frontend * [Cypress](./cypress) contains end-to-end tests and executable feature specifications @@ -46,16 +47,19 @@ There are two approaches: ## Installation ### Clone the Repository + Clone the repository, this will create a new folder called `Ocelot-Social`: Using HTTPS: + ```bash $ git clone https://github.com/Ocelot-Social-Community/Ocelot-Social.git ``` Using SSH: + ```bash -$ git clone git@github.com:Human-Connection/Human-Connection.git +$ git clone git@github.com:Ocelot-Social-Community/Ocelot-Social.git ``` Change into the new folder. @@ -88,13 +92,15 @@ docker-compose version 1.23.2 #### Start Ocelot-Social via Docker-Compose For Development: + ```bash -docker-compose up +$ docker-compose up ``` -For Production +For Production: + ```bash -docker-compose -f docker-compose.yml up +$ docker-compose -f docker-compose.yml up ``` This will start all required Docker containers @@ -107,12 +113,12 @@ The only deployment method in this repository is `docker-compose` for developmen ## Developer Chat -Join our friendly open-source community on [Discord](https://discordapp.com/invite/DFSjPaX) :heart_eyes_cat: +Join our friendly open-source community on [Discord](https://discord.gg/AJSX9DCSUA) :heart_eyes_cat: Just introduce yourself at `#introduce-yourself` and mention `@@Mentor` to get you onboard :neckbeard: Check out the [contribution guideline](./CONTRIBUTING.md), too! We give write permissions to every developer who asks for it. Just text us on -[Discord](https://discord.gg/6ub73U3). +[Discord](https://discord.gg/AJSX9DCSUA). ## Technology Stack @@ -131,4 +137,5 @@ Browser compatibility testing with [BrowserStack](https://www.browserstack.com/) BrowserStack Logo ## License + See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT). diff --git a/backend/Dockerfile b/backend/Dockerfile index c632f8803..0ebdfb1eb 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,5 +1,5 @@ ################################################################################## -# BASE ########################################################################### +# BASE (Is pushed to DockerHub for rebranding) ################################### ################################################################################## FROM node:12.19.0-alpine3.10 as base @@ -59,12 +59,18 @@ FROM base as development CMD /bin/sh -c "yarn install && yarn run dev" ################################################################################## -# BUILD (Does contain all files and is therefore bloated) ######################## +# CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### ################################################################################## -FROM base as build +FROM base as code -# Copy everything +# copy everything, but do not build. COPY . . + +################################################################################## +# BUILD (Does contain all files and the compilate and is therefore bloated) ###### +################################################################################## +FROM code as build + # yarn install RUN yarn install --production=false --frozen-lockfile --non-interactive # yarn build @@ -85,7 +91,6 @@ FROM base as production # Copy "binary"-files from build image COPY --from=build ${DOCKER_WORKDIR}/dist ./dist -COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules # Copy static files # TODO - externalize the uploads so we can copy the whole folder COPY --from=build ${DOCKER_WORKDIR}/public/img/ ./public/img/ @@ -94,4 +99,4 @@ COPY --from=build ${DOCKER_WORKDIR}/public/providers.json ./public/providers.jso COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json # Run command -CMD /bin/sh -c "yarn run start" \ No newline at end of file +CMD /bin/sh -c "yarn run start" diff --git a/backend/package.json b/backend/package.json index 8148593c4..3b4d9f05f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "ocelot-social-backend", - "version": "1.0.2", + "version": "1.0.4", "description": "GraphQL Backend for ocelot.social", "repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social", "author": "ocelot.social Community", @@ -39,6 +39,12 @@ ] }, "dependencies": { + "@babel/cli": "~7.8.4", + "@babel/core": "~7.9.0", + "@babel/node": "~7.8.7", + "@babel/plugin-proposal-throw-expressions": "^7.8.3", + "@babel/preset-env": "~7.9.5", + "@babel/register": "^7.9.0", "@hapi/joi": "^17.1.1", "@sentry/node": "^5.15.4", "apollo-cache-inmemory": "~1.6.5", @@ -48,6 +54,9 @@ "apollo-server": "~2.14.2", "apollo-server-express": "^2.14.2", "aws-sdk": "^2.652.0", + "babel-core": "~7.0.0-0", + "babel-eslint": "~10.1.0", + "babel-jest": "~25.2.6", "babel-plugin-transform-runtime": "^6.23.0", "bcryptjs": "~2.4.3", "cheerio": "~1.0.0-rc.3", @@ -111,16 +120,7 @@ "xregexp": "^4.3.0" }, "devDependencies": { - "@babel/cli": "~7.8.4", - "@babel/core": "~7.9.0", - "@babel/node": "~7.8.7", - "@babel/plugin-proposal-throw-expressions": "^7.8.3", - "@babel/preset-env": "~7.9.5", - "@babel/register": "^7.9.0", "apollo-server-testing": "~2.11.0", - "babel-core": "~7.0.0-0", - "babel-eslint": "~10.1.0", - "babel-jest": "~25.2.6", "chai": "~4.2.0", "cucumber": "~6.0.5", "eslint": "~6.8.0", diff --git a/backend/src/config/index.js b/backend/src/config/index.js index 4acf8e675..f3a8fb63c 100644 --- a/backend/src/config/index.js +++ b/backend/src/config/index.js @@ -40,8 +40,8 @@ const server = { const smtp = { SMTP_HOST: env.SMTP_HOST, SMTP_PORT: env.SMTP_PORT, - SMTP_IGNORE_TLS: env.SMTP_IGNORE_TLS === 'true' || true, - SMTP_SECURE: env.SMTP_IGNORE_TLS === 'true' || false, + SMTP_IGNORE_TLS: env.SMTP_IGNORE_TLS !== 'false', // default = true + SMTP_SECURE: env.SMTP_SECURE === 'true', SMTP_USERNAME: env.SMTP_USERNAME, SMTP_PASSWORD: env.SMTP_PASSWORD, } diff --git a/backend/src/config/links.js b/backend/src/config/links.js index 494e449ba..6b945a5e0 100644 --- a/backend/src/config/links.js +++ b/backend/src/config/links.js @@ -1,6 +1,13 @@ +// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding export default { ORGANIZATION: 'https://ocelot.social', - DONATE: 'https://ocelot-social.herokuapp.com/donations', - FAQ: 'https://ocelot.social', SUPPORT: 'https://ocelot.social', + + // on null or empty strings internal imprint is used, see 'webapp/locales/html/' + DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly + IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly + TERMS_AND_CONDITIONS: null, + CODE_OF_CONDUCT: null, + DATA_PRIVACY: null, + FAQ: 'https://ocelot.social', } diff --git a/backend/src/config/logos.js b/backend/src/config/logos.js new file mode 100644 index 000000000..d093c7b46 --- /dev/null +++ b/backend/src/config/logos.js @@ -0,0 +1,10 @@ +// this file is duplicated in `backend/src/config/logos.js` and `webapp/constants/logos.js` and replaced on rebranding +// this are the paths in the webapp +export default { + LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg', + LOGO_SIGNUP_PATH: '/img/custom/logo-squared.svg', + LOGO_WELCOME_PATH: '/img/custom/logo-squared.svg', + LOGO_LOGOUT_PATH: '/img/custom/logo-squared.svg', + LOGO_PASSWORD_RESET_PATH: '/img/custom/logo-squared.svg', + LOGO_MAINTENACE_RESET_PATH: '/img/custom/logo-squared.svg', +} diff --git a/backend/src/config/metadata.js b/backend/src/config/metadata.js index 68d353eea..d40308e80 100644 --- a/backend/src/config/metadata.js +++ b/backend/src/config/metadata.js @@ -1,7 +1,9 @@ +// this file is duplicated in `backend/src/config/metadata.js` and `webapp/constants/metadata.js` and replaced on rebranding export default { APPLICATION_NAME: 'ocelot.social', APPLICATION_SHORT_NAME: 'ocelot', APPLICATION_DESCRIPTION: 'ocelot.social Community Network', + COOKIE_NAME: 'ocelot-social-token', ORGANIZATION_NAME: 'ocelot.social Community', ORGANIZATION_JURISDICTION: 'City of Angels', } diff --git a/backend/src/middleware/email/templateBuilder.js b/backend/src/middleware/email/templateBuilder.js index 2c7038d27..872b86b29 100644 --- a/backend/src/middleware/email/templateBuilder.js +++ b/backend/src/middleware/email/templateBuilder.js @@ -1,10 +1,11 @@ import mustache from 'mustache' import CONFIG from '../../config' +import logosWebapp from '../../config/logos.js' import * as templates from './templates' const from = CONFIG.EMAIL_DEFAULT_SENDER -const welcomeImageUrl = new URL(`/img/custom/welcome.svg`, CONFIG.CLIENT_URI) +const welcomeImageUrl = new URL(logosWebapp.LOGO_WELCOME_PATH, CONFIG.CLIENT_URI) const defaultParams = { supportUrl: CONFIG.SUPPORT_URL, diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 8d1bb96f2..5fceb2776 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -18,7 +18,6 @@ services: - webapp_node_modules:/app/node_modules # bind the local folder to the docker to allow live reload - ./webapp:/app - ######################################################## # BACKEND ############################################## ######################################################## @@ -35,7 +34,6 @@ services: - backend_node_modules:/app/node_modules # bind the local folder to the docker to allow live reload - ./backend:/app - ######################################################## # NEO4J ################################################ ######################################################## @@ -47,13 +45,11 @@ services: networks: # So we can access the neo4j query browser from our host machine - external-net - ######################################################## # MAINTENANCE ########################################## ######################################################## maintenance: image: ocelotsocialnetwork/maintenance:development - ######################################################## # MAILSERVER TO FAKE SMTP ############################## ######################################################## @@ -63,6 +59,7 @@ services: - 1080:80 networks: - external-net + volumes: webapp_node_modules: backend_node_modules: diff --git a/docker-compose.test.yml b/docker-compose.test.yml index eef71e67b..973cf87cf 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -12,7 +12,6 @@ services: - NODE_ENV="test" volumes: - ./coverage:/app/coverage - ######################################################## # BACKEND ############################################## ######################################################## @@ -24,7 +23,6 @@ services: - NODE_ENV="test" volumes: - ./coverage:/app/coverage - ######################################################## # NEO4J ################################################ ######################################################## @@ -41,13 +39,11 @@ services: networks: # So we can access the neo4j query browser from our host machine - external-net - ######################################################## # MAINTENANCE ########################################## ######################################################## maintenance: image: ocelotsocialnetwork/maintenance:test - ######################################################## # MAILSERVER TO FAKE SMTP ############################## ######################################################## @@ -57,6 +53,7 @@ services: - 1080:80 networks: - external-net + volumes: webapp_node_modules: backend_node_modules: diff --git a/docker-compose.yml b/docker-compose.yml index 392447f61..d20bb6aec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,6 @@ services: - GRAPHQL_URI=http://backend:4000 env_file: - ./webapp/.env - ######################################################## # BACKEND ############################################## ######################################################## @@ -68,7 +67,6 @@ services: - CLIENT_URI=http://webapp:3000 env_file: - ./backend/.env - ######################################################## # NEO4J ################################################ ######################################################## @@ -92,7 +90,6 @@ services: # TODO: clarify if that is the only thing needed to unlock the Enterprise version # - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes # TODO: Remove the playground from production - ######################################################## # MAINTENANCE ########################################## ######################################################## diff --git a/package.json b/package.json index 937b0a6bc..ca1429fce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ocelot-social", - "version": "1.0.2", + "version": "1.0.4", "description": "Fullstack and API tests with cypress and cucumber for ocelot.social", "author": "ocelot.social Community", "license": "MIT", diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 75d43bf59..8d830a9d5 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -1,5 +1,5 @@ ################################################################################## -# BASE ########################################################################### +# BASE (Is pushed to DockerHub for rebranding) ################################### ################################################################################## FROM node:12.19.0-alpine3.10 as base @@ -59,12 +59,18 @@ FROM base as development CMD /bin/sh -c "yarn install && yarn run dev" ################################################################################## -# BUILD (Does contain all files and is therefore bloated) ######################## +# CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### ################################################################################## -FROM base as build +FROM base as code -# Copy everything +# copy everything, but do not build. COPY . . + +################################################################################## +# BUILD (Does contain all files and the compilate and is therefore bloated) ###### +################################################################################## +FROM code as build + # yarn install RUN yarn install --production=false --frozen-lockfile --non-interactive # yarn build @@ -83,18 +89,13 @@ CMD /bin/sh -c "yarn run dev" ################################################################################## FROM base as production +# TODO - do all copying with one COPY command to have one layer # Copy "binary"-files from build image COPY --from=build ${DOCKER_WORKDIR}/.nuxt ./.nuxt COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules COPY --from=build ${DOCKER_WORKDIR}/nuxt.config.js ./nuxt.config.js -# Copy static files -# TODO - this should be one Folder containign all stuff needed to be copied -COPY --from=build ${DOCKER_WORKDIR}/config/ ./config/ -COPY --from=build ${DOCKER_WORKDIR}/constants ./constants -COPY --from=build ${DOCKER_WORKDIR}/static ./static -COPY --from=build ${DOCKER_WORKDIR}/locales ./locales # Copy package.json for script definitions (lock file should not be needed) COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json # Run command -CMD /bin/sh -c "yarn run start" \ No newline at end of file +CMD /bin/sh -c "yarn run start" diff --git a/webapp/Dockerfile.maintenance b/webapp/Dockerfile.maintenance index 0a7616240..dcc06ad61 100644 --- a/webapp/Dockerfile.maintenance +++ b/webapp/Dockerfile.maintenance @@ -48,11 +48,12 @@ WORKDIR ${DOCKER_WORKDIR} CMD ["yarn", "run", "start"] ################################################################################## -# BUILD ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO ## +# CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### ################################################################################## -FROM base as build +FROM base as code COPY package.json yarn.lock ./ +# yarn install RUN yarn install --production=false --frozen-lockfile --non-interactive COPY assets assets @@ -67,10 +68,17 @@ COPY constants constants COPY nuxt.config.js nuxt.config.js COPY config/ config/ +# this is needed in rebranding +COPY maintenance/nginx maintenance/nginx # this will also ovewrite the existing package.json COPY maintenance/source ./ +################################################################################## +# BUILD ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO ## +################################################################################## +FROM code as build +# yarn generate RUN yarn run generate ################################################################################## diff --git a/webapp/components/LoginForm/LoginForm.vue b/webapp/components/LoginForm/LoginForm.vue index 01c3c8661..57429baa3 100644 --- a/webapp/components/LoginForm/LoginForm.vue +++ b/webapp/components/LoginForm/LoginForm.vue @@ -7,7 +7,7 @@

{{ $t('login.login') }}

@@ -31,11 +31,7 @@ ref="password" :type="showPassword ? 'text' : 'password'" /> - - - - - + {{ $t('login.forgotPassword') }} @@ -56,13 +52,17 @@ diff --git a/webapp/components/PageFooter/PageFooter.spec.js b/webapp/components/PageFooter/PageFooter.spec.js index 0edc0fed2..53aaaa073 100644 --- a/webapp/components/PageFooter/PageFooter.spec.js +++ b/webapp/components/PageFooter/PageFooter.spec.js @@ -1,6 +1,6 @@ import { config, mount } from '@vue/test-utils' import PageFooter from './PageFooter.vue' -import links from '~/constants/links.js' +import linksDefault from '~/constants/links.js' const localVue = global.localVue @@ -8,6 +8,7 @@ config.stubs['nuxt-link'] = '' describe('PageFooter.vue', () => { let mocks + let wrapper beforeEach(() => { mocks = { @@ -15,30 +16,118 @@ describe('PageFooter.vue', () => { $env: { VERSION: 'v1.0.0', }, - links, } }) describe('mount', () => { - let wrapper const Wrapper = () => { return mount(PageFooter, { mocks, localVue }) } - beforeEach(() => { - wrapper = Wrapper() + describe('links.js', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders four links', () => { + expect(wrapper.findAll('a')).toHaveLength(4) + }) + + it('renders three nuxt-links', () => { + expect(wrapper.findAll('.nuxt-link')).toHaveLength(3) + }) + + it('renders version', () => { + expect(wrapper.find('.ds-footer').text()).toContain('v1.0.0') + }) }) - it('renders three links', () => { - expect(wrapper.findAll('a')).toHaveLength(3) + describe('inflexible links', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders ORGANIZATION', () => { + expect(wrapper.find('a[data-test="organization-link"]').exists()).toBe(true) + }) + + it('renders version', () => { + expect(wrapper.find('a[data-test="version-link"]').exists()).toBe(true) + }) }) - it('renders four nuxt-links', () => { - expect(wrapper.findAll('.nuxt-link')).toHaveLength(4) + describe('flexible links not set', () => { + beforeEach(async () => { + const links = { + ...linksDefault, + IMPRINT: null, + TERMS_AND_CONDITIONS: null, + CODE_OF_CONDUCT: null, + DATA_PRIVACY: null, + FAQ: null, + } + wrapper = Wrapper() + wrapper.setData({ links }) + await wrapper.vm.$nextTick() + }) + + it('renders IMPRINT as nuxt-link', () => { + expect(wrapper.find('span[data-test="imprint-nuxt-link"]').exists()).toBe(true) + }) + + it('renders TERMS_AND_CONDITIONS as nuxt-link', () => { + expect(wrapper.find('span[data-test="terms-nuxt-link"]').exists()).toBe(true) + }) + + it('renders CODE_OF_CONDUCT as nuxt-link', () => { + expect(wrapper.find('span[data-test="code-nuxt-link"]').exists()).toBe(true) + }) + + it('renders DATA_PRIVACY as nuxt-link', () => { + expect(wrapper.find('span[data-test="data-nuxt-link"]').exists()).toBe(true) + }) + + it('renders FAQ as nuxt-link', () => { + expect(wrapper.find('span[data-test="faq-nuxt-link"]').exists()).toBe(true) + }) }) - it('renders version', () => { - expect(wrapper.find('.ds-footer').text()).toContain('v1.0.0') + describe('flexible links set', () => { + beforeEach(async () => { + const links = { + ...linksDefault, + IMPRINT: 'https://ocelot.social/IMPRINT', + TERMS_AND_CONDITIONS: 'https://ocelot.social/TERMS_AND_CONDITIONS', + CODE_OF_CONDUCT: 'https://ocelot.social/CODE_OF_CONDUCT', + DATA_PRIVACY: 'https://ocelot.social/DATA_PRIVACY', + FAQ: 'https://ocelot.social/FAQ', + } + wrapper = Wrapper() + wrapper.setData({ links }) + await wrapper.vm.$nextTick() + }) + + it('renders IMPRINT as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/IMPRINT"]`).exists()).toBe(true) + }) + + it('renders TERMS_AND_CONDITIONS as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/TERMS_AND_CONDITIONS"]`).exists()).toBe( + true, + ) + }) + + it('renders CODE_OF_CONDUCT as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/CODE_OF_CONDUCT"]`).exists()).toBe(true) + }) + + it('renders DATA_PRIVACY as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/DATA_PRIVACY"]`).exists()).toBe(true) + }) + + it('renders FAQ as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/FAQ"]`).exists()).toBe(true) + }) }) }) }) diff --git a/webapp/components/PageFooter/PageFooter.vue b/webapp/components/PageFooter/PageFooter.vue index ace0514e1..e31bc3e2a 100644 --- a/webapp/components/PageFooter/PageFooter.vue +++ b/webapp/components/PageFooter/PageFooter.vue @@ -1,26 +1,67 @@