/jigy

A blog build with Laravel, featuring a filtered search. Build as part of our final year project

Primary LanguagePHPMIT LicenseMIT

GitHub contributors GitHub pull-requests GitHub license

JTMK i-Gallery (JiGy) 📑

A blog build with Laravel, featuring a filtered search

Build as part of our final year project

Table of Contents

Installation

Required tools 🛠

Instructions 📜

Quick Start Guide

See here.

Detailed installation

  1. Clone the code with Git by typing:
git clone https://github.com/reverk/jigy.git
  1. Go into the directory:
cd jigy
  1. Install composer dependencies:
composer install
  1. Install NPM dependencies & run
# Bash/Powershell
npm i; npm run dev
  1. Make a copy of .env.example and rename it to .env and change to the following snippet:
# Bash/Powershell
cp .env.example .env
# .env
...

APP_URL=<YOUR_URL>

...

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=<YOUR_DATABASE_NAME>
DB_USERNAME=<YOUR_DATABASE_USERNAME>
DB_PASSWORD=<YOUR_DATABSE_PASSWORD>

...

# If you want to test if emails work, follow this config
# Alternatively, you can copy & paste the config provided in mailtrap
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=<MAIL_USERNAME>
MAIL_PASSWORD=<MAIL_PASSWORD>
MAIL_ENCRYPTION=<MAIL_ENCRYPTION>
MAIL_FROM_ADDRESS=staging@jigy.com
MAIL_FROM_NAME="${APP_NAME}"

...

FILESYSTEM_DRIVER=public

# For search function
ALGOLIA_APP_ID=<YOUR_APP_ID>
ALGOLIA_SECRET=<YOUR_ADMIN_API_KEY>

...

📝: By default, XAMPP's default username & password is root and (empty/no password)

📝: APP_URL is http://localhost:8000 by default, but if you want hot reloading, use http://localhost:3000

  1. Generate key by:
php artisan key:generate
  1. Create a symbolic link (used for images):
php artisan storage:link
  1. Migrate database:
php artisan migrate

Please confirm that your XAMPP's Apache & MySQL is started before migrating

  1. (Optional) To populate fake data:
php artisan db:seed
  1. Index Algolia search & their configs:
php artisan scout:sync
  1. Serve/Host JiGy:
php artisan serve
  1. Go to a web browser and go to:
localhost:8000 // Or localhost:3000 if you have hot/live reloading.

Hot Reloading

  • Sometimes, you may need to enable hot reloading to make things easier. To enable hot/live reloading:
php artisan serve

Then open another terminal and type:

npm run watch

ℹ You'll need to leave 2 terminals to run simultaneously

CI/CD

See here.

FAQ

Q: Where can I find and apply Mailtrap details?

A: Assuming you've registered your account, you can find it on Inboxs > <Your project name> > SMTP Settings tab. Then at Intergrations section, select Laravel. It'll provide you the appropriate credentials to fill it into .env.

Q: Where can I find Algolia App ID and Algolia Secret Key?

A: Again, assuming you've registered your account, go to Dashboard > API Keys > Your API Keys tab.

Then, copy Application ID and Admin API Key to ALGOLIA_APP_ID=<PASTE HERE> and ALGOLIA_SECRET=<PASTE HERE> in .env respectively.

Collaborators 👨🏻‍💻

License

MIT