Install MySQL from the official download page https://dev.mysql.com/downloads/installer/
This project is using version 8.0.38
.
Initialize MySQL:
cd C:\mysql\mysql-portable\bin
mysqld --initialize-insecure
Start the MySQL server in the console:
mysqld --console
Environment Variables:
- Rename
.env.example
to.env
. - Configure necessary environment variables such as your LLM API.
Run create_tables.py
in scripts
folder.
- FastAPI
- MySQL
- Database design: user, device, journal, picture, text entry
- MySQL Connection and create tables
- Endpoint Design
- Journal Generate
POST /users/
: Create a new userGET /users/
: Get all usersGET /users/{user_id}
: Get a specific userPUT /users/{user_id}
: Update a userDELETE /users/{user_id}
: Delete a user
GET /users/{user_id}/devices
: Get all devices for a userGET /users/{user_id}/devices/{device_id}
: Get a specific devicePOST /users/{user_id}/devices
: Create a new device for a userPUT /users/{user_id}/devices/{device_id}
: Update a deviceDELETE /users/{user_id}/devices/{device_id}
: Delete a device
GET /users/{user_id}/journals
: Get all journals for a userGET /users/{user_id}/journals/{journal_id}
: Get a specific journalPOST /users/{user_id}/journals
: Create a new journal for a userPUT /users/{user_id}/journals/{journal_id}
: Update a journalDELETE /users/{user_id}/journals/{journal_id}
: Delete a journal
GET /users/{user_id}/photos
: Get all photos for a userGET /users/{user_id}/photos/{photo_id}
: Get a specific photoPOST /users/{user_id}/photos
: Upload a new photo for a userPUT /users/{user_id}/photos/{photo_id}
: Update photo detailsDELETE /users/{user_id}/photos/{photo_id}
: Delete a photoGET /users/{user_id}/photos/{photo_id}/analyze
: Analyze a photo*
This project is licensed under the MIT License.