A Laravel (10.x) project using Postgres
- Click use this template > Create a new repository
- Change owner to your personal account
git clone [your github ssh url]
- Open project in your IDE
- Install SIDT, and have running.
- Configure a PAT for GPR.
cp .env.example .env
docker-compose up --build
scripts/initial_setup.sh
- Edit the
/etc/hosts
file on your system and add127.0.0.1 aihack.docker
- Request OpenAI key from Gregg
- Set key to
OPENAI_API_KEY
in.env
- Open
aihack.docker/
in web browser (be sure to include the trailing/
)
Go to app/Http/Controllers/Api/ChatSessionController.php
and change the $systemPrompt
variable.
Go to app/Http/Controllers/Api/ChatSessionController.php
and change the $systemPrompt
variable.
Go to resources/scripts/common/components/chatbot
and change any of the .vue
files.
Go to app/Http/Controllers/Api/ChatMessageController.php
and change the findRelatedQuote
function.
Go to app/Http/Controllers/Api/ChatMessageController.php
and change the findRelatedQuote
function.
Open the .env
file and change the OPENAI_API_KEY
variable.
Unit and feature tests can be run through artisan using php artisan test
. Dusk tests can be run using ./scripts/dusk.sh
.
Both test commands support --filter <method or data provider label>
to run a specific test case or passing a file relative to the project root to run a full test file.
composer install
- Installs composer dependencies.composer check-enums
- Runs script to validate enums between PHP and TypeScript.composer phpstan
- Runs PHPStan for static analysis.composer lint
- Runs Pint for linting.composer test
- Runs PHPUnit tests.
npm run dev
- Spawns Vite dev server for hot reloading.npm run build
- Builds assets for production.npm run check-types
- Runsvue-tsc
to validate types.npm run lint
- Runs ESLint for.ts
and.vue
files.npm run test
- Runs Vitest tests.
Used for error collection, the following envs need to be set:
SENTRY_LARAVEL_DSN
- The DSN for the environmentSENTRY_TRACES_SAMPLE_RATE
- Percent in decimal (1.0 = 100%) for how many requests to trace.
guzzlehttp/guzzle
(Repo) (MIT License)laravel/forify
(Repo) (MIT License)laravel/framework
(Repo) (MIT License)laravel/sanctum
(Repo) (MIT License)laravel/tinker
(Repo) (MIT License)sentry/sentry-laravel
(Repo) (Apache License 2.0)sourcetoad/enhanced-resources
(Repo) (MIT License)sourcetoad/rule-helper-for-laravel
(Repo) (MIT License)
brianium/paratest
(Repo) (MIT License)fakerphp/faker
(Repo) (MIT License)laravel/dusk
(Repo) (MIT License)laravel/pint
(Repo) (MIT License)mockery/mockery
(Repo) (3-Clause BSD License)nunomaduro/collision
(Repo) (MIT License)nunomaduro/larastan
(Repo) (MIT License)phpunit/phpunit
(Repo) (3-Clause BSD License)spatie/laravel-ignition
(Repo) (MIT License)
- Chatbot - Docs