- Make sure that the contribution you seek to make is not the iteration of a former issue or hasn't been done by anyone else.
- If you face with a problem, open up an issue for it.
- For a change you await or want, open up an issue.
- Open up an issue in order to add a new feature.
- Create a PR to fix an issue.
- Create a PR to fix an error in the documentation.
This project is using Laravel Sail. So if you are using MacOS, Linux or Windows(WSL2); your only need is Docker to start development.
# Clone the project.
git clone https://github.com/acikkaynak/deprem-yardim-com.git
# Change directory to project directory.
cd deprem-yardim-com
# Copy env file.
cp .env.example .env
# Laravel Sail is a composer dependency. Therefore, you should install it first.
# You don't need PHP or Composer to install dependencies; use docker.
# Install Composer Dependencies with Docker command.
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
# Start development environment.
./vendor/bin/sail up -d
# Generate an "Application Key" for Laravel.
./vendor/bin/sail artisan key:generate
# Run Laravel Migrations.
./vendor/bin/sail artisan migrate
You can use sail
instead ./vendor/bin/sail
by adding the line bellow to your shell configuration (~/.zshrc or ~/.bashrc).
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
Restart shell after adding.
You can get the sample data from #depremyardimcom in the Discord server.
Store the dump file as /dump/locations.sql
and:
# Proccess the dump file
./vendor/bin/sail artisan db:seed
# Stop development environment.
./vendor/bin/sail down
If you want to install directly on Windows without using WSL2, follow these steps.
Requirements:
- php >= 8.1^
- MySQL >= 7.0^
# Clone the project
git clone https://github.com/acikkaynak/deprem-yardim-com.git
# Move to project directory
cd deprem-yardim-com
# Install the dependencies
composer install
# Run the development environment
php artisan serve
We use prettier
on this project for code formatting. Linter configuration can be found here.
Each commit must include a header, a body and a footer. Title is formatted as type, scope and, description.
<type>(<scope>): <description>
<EMPTY LINE>
<body>
<EMPTY LINE>
<footer>
Commit messages should not exceed 72 characters.
Message header is mandatory and it must include a type, an optional scope and a short description. Ideally, it should not exceed 50 characters.
By complying with these rules, you can create an open change log for all versions.
It is advised to watching PR header for commit messages. This way, when a PR is merged, PR header can be used as commit message and allows the change history to be formatted appropriately.
Type states the type of your change. Allowed types are:
feat
: Adds a new featurefix
: Fixing an error/bugdocs
: Changes that affect only the documentationstyle
: Just formatting changes such as punctuation, spaces etc.refactor
: A change that does not affect the contents of the codeperf
: Performance changetest
: Adds missing tests or changes current oneschore
: Other changes that does not affect the development process
Scope, states the part that is affected by the commit. For instance, a scope such as kafka
or login
can be stated.
Description provides a short explanation regarding the purpose of the commit. First letter should be capitalized. Description should be one sentence. This could serve as the commit message header.
Message body is an explanation that states why the commit was made. Body can be one or more paragraphs. Paragraphs should not exceed 72 characters.
Completed, fixed or delivered cases should be added to footer as a separate line and start with "Finishes", "Fixes" or "Delivers" keyword:
[(Finishes|Fixes|Delivers) #ISSUE_ID]
feat(34): implement exactly once delivery
- ensure every event published to kafka