An open API service indexing awesome lists of open source software.

https://github.com/delabon/symfony-api-language-learning-assistant-using-ai

A RESTful application to help users learn new languages through conversation practice with AI.
https://github.com/delabon/symfony-api-language-learning-assistant-using-ai

openai php8 phpstan postgres rest-api symfony

Last synced: about 2 months ago
JSON representation

A RESTful application to help users learn new languages through conversation practice with AI.

Awesome Lists containing this project

README

          

A RESTful application to help users learn new languages through conversation practice with AI.

**Key Feature**:
- Registration
- API endpoints for managing conversations
- API endpoints for chatting with ChatGPT
- API key generation
- API documentation: https://documenter.getpostman.com/view/24405131/2sA3dxDrRF

### Tech stack

- **Backend**: PHP 8.2, Symfony 7.1
- **Database**: PostgreSQL 16.3
- **Testing**: PHPUnit for unit, integration and feature testing (Developed completely using TDD)
- **Static Analysis**: PHPStan for analyzing code quality
- **Coding Standard Analysis**: PHP-CS-FIXER for enforcing PSR12 coding standards
- **Environment Management**: Docker for containerization and consistent development environments
- **CI**: Github actions for continuous Integration
- **Openai**: ChatGPT API for conversation practice

### To test this on your local machine, follow the instructions bellow

#### Add domain to /etc/hosts (host)

```bash
sudo nano /etc/hosts
127.0.0.111 language-learning-assitant.test
```

#### Install mkcert (host)

```bash
sudo apt install libnss3-tools
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo mv mkcert-v*-linux-amd64 /usr/local/bin/mkcert
cd ssls/
mkcert -install language-learning-assitant.test
```

#### Up containers (host)

```bash
docker-compose up --build -d
```
#### Connect to the php container

```bash
docker exec -it php-container bash
```
#### Composer

```bash
composer install
```
#### create .env.local inside the app directory

Copy the content of .env file and paste it in .env.local

#### Bowser

Now, open https://language-learning-assitant.test in your browser

#### Database

http://localhost:8080