-
PHP 8.3
-
Postgresql 16
-
Node 21
-
GPT Organization ID and API KEY
# Install PHP dependencies
$ composer install
# Install Node dependencies
$ npm install
# Compile assets
$ npm run build
- Setup all DB_ environment with the database connection.
- Setup OPENAI_ORGANIZATION and OPENAI_API_KEY from your OpenAI dashboard, at https://openai.com
- Setup all others environments such APP_URL and any other from your environment
# Setup storage link
$ php artisan storage:link
# Run PHPUnit tests
$ ./vendor/bin/phpunit --testdox
# Run laravel
$ php artisan serve
# Seed all models
$ php artisan db:seed
or
# Seed individually
$ php artisan db:seed --class=GPTUserSeeder
$ php artisan db:seed --class=GPTChallengeSeeder
$ php artisan db:seed --class=GPTCompanySeeder
$ php artisan db:seed --class=GPTProgramSeeder
Example: Challenge
- Fill challenges with GPT:
POST /api/challenges/gpt
- List challenges:
GET /api/challenges
- Create challenge:
POST /api/challenges/{user_id}
- Read challenge:
GET /api/challenges/{id}
- Update challenge:
PATCH /api/challenges/{id}
- Delete challenge:
DELETE /api/challenges/{id}
After fill with GPT, every entity list will show 10 new records.