Skip to content

Commit

Permalink
add environment setup heading, add mail setup section
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed Apr 22, 2024
1 parent 3c22d32 commit ed20329
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions docs/INSTALLATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Install composer dependencies:
composer update
```

## Environment setup

In the [`src/core/`](../src/core/config.php) folder, create a `.env` file with the following contents:

```php
Expand All @@ -54,15 +56,28 @@ BUSINESS_GMAIL=""
BUSINESS_GMAIL_PASSWORD=""
```

Some important notes:
Update the values assigned to `DB_USERNAME` and `DB_PASSWORD` with your MySQL login details.

> [!IMPORTANT]
> If your Apache server is serving from a port other than port 80, include the port number in `PUBLIC_ROOT` (
> e.g., `http://localhost:443/steamy-sips/public`) .
## Mail setup

- Update the values assigned to `DB_USERNAME` and `DB_PASSWORD` with your MySQL login details.
- If your Apache server is serving from a port other than the default one, include the port number to `PUBLIC_ROOT` (
e.g., `http://localhost:443/steamy-sips/public`) .
- `BUSINESS_GMAIL` and `BUSINESS_GMAIL_PASSWORD` are the credentials of the Gmail account from which emails will be sent
whenever a client places an order. It is recommended to use
a [Gmail App password](https://knowledge.workspace.google.com/kb/how-to-create-app-passwords-000009237)
for `BUSINESS_GMAIL_PASSWORD` instead of your actual gmail account password.
1. Choose an email address (gmail account) from which you want emails to be sent.
2. Go to https://myaccount.google.com/ and login using your desired email.
3. Search for `2-Step Verification` in the `Security` section and enable it.
4. Search for `App passwords` in the security section and create an app password with a name of your choice.
5. In the `src/core/.env` file created earlier, fill `BUSINESS_GMAIL`
and `BUSINESS_GMAIL_PASSWORD`. `BUSINESS_GMAIL_PASSWORD` should be set to your app password.

> [!IMPORTANT]
> Remove any spaces from your app password when entering it in the `.env` file.
> [!IMPORTANT]
> Ensure that you have no firewall or antivirus software (e.g. Avast, McAfee) that block emails. If the mailing service
> is not working
> set `$this->mail->SMTPDebug = SMTP::SERVER;` in the `Mailer.php` file and inspect the error.
## Database setup

Expand Down Expand Up @@ -116,6 +131,7 @@ In the root directory of the project, run:
```bash
npm install
```

## Autoload setup

Whenever changes are made to the autoload settings in `composer.json`, you must run `composer dump-autoload`.

0 comments on commit ed20329

Please sign in to comment.