Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ginokok1996 committed Nov 3, 2021
0 parents commit 851bca0
Show file tree
Hide file tree
Showing 48 changed files with 33,895 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,html,ts,tsx}]
indent_style = space
indent_size = 2

[*.json]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.php]
indent_style = space
indent_size = 4

[*.sh]
indent_style = tab
indent_size = 4

[*.xml{,.dist}]
indent_style = space
indent_size = 4

[*.{yaml,yml}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

[helm/api-platform/**.yaml]
indent_style = space
indent_size = 2

[.github/workflows/*.yml]
indent_style = space
indent_size = 2

[.gitmodules]
indent_style = tab
indent_size = 4

[.php_cs{,.dist}]
indent_style = space
indent_size = 4

[.travis.yml]
indent_style = space
indent_size = 2

[composer.json]
indent_style = space
indent_size = 4

[docker-compose{,.*}.{yaml,yml}]
indent_style = space
indent_size = 2

[Dockerfile]
indent_style = tab
indent_size = 4
118 changes: 118 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
##################################################
# Application settings
##################################################
# This section contains generic settings for your application

# The shortcode for this component, should be a small set of letters reprecentint the application (use only letters, capitals and spaces)
APP_NAME=proto-pwa-gatsby

APP_NAME_TECHNCICAL=proto-pwa-gatsby


# The description for this api
APP_DESCRIPTION=pwa
# The current version of the application
APP_VERSION=V1.0
APP_MAJOR_VERSION=v1

# The type either application or component
APP_TYPE=component

##################################################
# Security
##################################################
# The urls/ip's and hosts on wich this api is available
TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
TRUSTED_HOSTS=^.+$
# Key that other applications can use to connect to this application (hier mag wel iets meer toelichtende tekst bij)
APP_APPLICATION_KEY=45c1a4b6-59d3-4a6e-86bf-88a872f35845

##################################################
# Licensing / Copyright
##################################################
# The owner (copyright holder) of the code base
OWNER_NAME=Conduction
OWNER_URL=https://www.conduction.nl

# The licence type (the licence file should always be located in the root of the code base as LICENCE.md)
LICENCE_NAME=EUPL

##################################################
# Helm / Artifacthub settings
##################################################

# The logo for this application (used on the api doc page, in helm files and on Artifacthub)
APP_LOGO=https://conductionnl.github.io/images/conduction_avatar_blue_on_transparant.svg
# The addres where more information about this application can be found (used on the api doc page, in helm files and on Artifacthub)
APP_HOME=https://www.conduction.nl
# The id of this application on https://artifacthub.io/ (use false if you do not want to use artifacthub)
ARTIFACTHUB_ID=
# name of the organization leave blank to not sure organization
ARTIFACTHUB_USER=
##################################################
# Routing and domain settings
##################################################

# The domain for this component (do not include a subdomain, this will hamper certification generation)
APP_DOMAIN=conduction.nl

# The subdomain for this component (should be false if you want to use www)
APP_URL=http://localhost
APP_SUBDOMAIN=proto-pwa-gatsby
APP_SUBPATH=proto-pwa-gatsby
APP_SUBPATH_ROUTING=true

APP_DEMO=as.zaakonline.nl

# Whether or not the component is to be exposed publicly
APP_WEB=false
# Whether or not to default cluster internal calls on kubernetes
APP_INTERNAL=false

##################################################
# Github settings
##################################################
# organization/repo-name
APP_CHART=ConductionNL/proto-pwa-gatsby
# The GIT Repository for this component (The place where the sourcecode is stored)
APP_REPRO=https://github.com/ConductionNL/proto-pwa-gatsby

##################################################
# Docker settings
##################################################

CONTAINER_REGISTRY_BASE=ghcr.io/conductionnl
HELM_REPOSITORY=https://raw.githubusercontent.com/ConductionNL/proto-pwa-gatsby/master/api/helm/
CONTAINER_PROJECT_NAME=proto-pwa-gatsby
##################################################
# Notifcation settings
##################################################

NOTIFICATION_ENABLED=false

##################################################
# Authorization settings
##################################################

AUTH_ENABLED=false

##################################################
# Development Settings
##################################################
# This sections contains options for configuring your local development environment

APP_ID=
# Do you want to display the symfony debug toolbar?
APP_DEBUG=1
# What is the enviroment type you want to use for local production? (choose between dev, stag, prod, acce or test)
APP_ENV=dev
# We use a build to tag images, this is swithced to the version on master and to env on other branches
APP_BUILD=dev
# Do you want to use caching? true/false
APP_CACHE=false
# Whether or not to include ALL datafixtures in a build (used for testing purposes in ci/cd)
APP_BUILD_ALL_FIXTURES=true
# Whether to enable or disable audit trials
AUDITTRAIL_ENABLED=false
# the duration of the session in seconds
APP_SESSION_DURATION=900
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
* text=auto eol=lf

*.conf text eol=lf
*.html text eol=lf
*.ini text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.php text eol=lf
*.sh text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
bin/console text eol=lf
composer.lock text eol=lf merge=ours

*.ico binary
*.png binary

update-deps.sh export-ignore
102 changes: 102 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Contributing to API Platform

First, thank you for contributing, you're awesome!

To have your code integrated in the API Platform project, there are some rules to follow, but don't panic, it's easy!

## Reporting Bugs

If you happen to find a bug, we kindly request you to report it. However, before submitting it, please:

* Check the [project documentation available online](https://api-platform.com/docs/)

Then, if it appears that it's a real bug, you may report it using Github by following these 3 points:

* Check if the bug is not already reported!
* A clear title to resume the issue
* A description of the workflow needed to reproduce the bug,

> _NOTE:_ Don’t hesitate to give as much information as you can (OS, PHP version extensions...)
## Pull Requests

### Writing a Pull Request

You should base your changes on the `main` branch.

### Matching Coding Standards

The API Platform project follows [Symfony coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
But don't worry, you can fix CS issues automatically using the [PHP CS Fixer](http://cs.sensiolabs.org/) tool:

```bash
php-cs-fixer.phar fix
```

And then, add fixed file to your commit before push.
Be sure to add only **your modified files**. If another files are fixed by cs tools, just revert it before commit.

### Sending a Pull Request

When you send a PR, just make sure that:

* You add valid test cases.
* Tests are green.
* You make a PR on the related documentation in the [api-platform/docs](https://github.com/api-platform/docs) repository.
* You make the PR on the same branch you based your changes on. If you see commits
that you did not make in your PR, you're doing it wrong.
* Also don't forget to add a comment when you update a PR with a ping to [the maintainers](https://github.com/orgs/api-platform/people),
so he/she will get a notification.
* Squash your commits into one commit. (see the next chapter)

Fill in the following header from the pull request template:

```markdown
| Q | A
| ------------- | ---
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #1234, #5678
| License | MIT
| Doc PR | api-platform/docs#1234
```

## Squash your Commits

If you have 3 commits. So start with:

```bash
git rebase -i HEAD~3
```

An editor will be opened with your 3 commits, all prefixed by `pick`.

Replace all `pick` prefixes by `fixup` (or `f`) **except the first commit** of the list.

Save and quit the editor.

After that, all your commits where squashed into the first one and the commit message of the first commit.

If you would like to rename your commit message type:

```bash
git commit --amend
```

Now force push to update your PR:

```bash
git push --force
```

# License and Copyright Attribution

When you open a Pull Request to the API Platform project, you agree to license your code under the [MIT license](../LICENSE)
and to transfer the copyright on the submitted code to [Kévin Dunglas](https://github.com/dunglas).

Be sure to you have the right to do that (if you are a professional, ask your company)!

If you include code from another project, please mention it in the Pull Request description and credit the original author.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches:
- main
pull_request: ~
workflow_dispatch: ~

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pull images
run: docker-compose pull --ignore-pull-failures || true
- name: Start services
run: docker-compose up --build -d
- name: Wait for services
run: |
while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker-compose ps -q php)")"; do
case $status in
starting) sleep 1;;
healthy) exit 0;;
unhealthy)
docker-compose ps
docker-compose logs
exit 1
;;
esac
done
exit 1
- name: Check HTTP reachability
run: curl -v -o /dev/null http://localhost
- name: Check HTTPS reachability
run: curl -vk -o /dev/null https://localhost
- name: Create test database
run: |
docker-compose exec -T php bin/console -e test doctrine:database:create
docker-compose exec -T php bin/console -e test doctrine:migrations:migrate --no-interaction
- name: PHPUnit
run: docker-compose exec -T php bin/phpunit
- name: Doctrine Schema Validator
run: docker-compose exec -T php bin/console doctrine:schema:validate --skip-sync
- name: Jest
run: docker-compose exec -T pwa yarn test --ci --passWithNoTests
Loading

0 comments on commit 851bca0

Please sign in to comment.