Empowering Boomers with Digitalised Inspiration, One Quote at a Time.
Welcome to Boomer.ai, where the power of generative AI meets the timeless art of boomer inspiration. This platform allows users to effortlessly create inspirational images with a single input, ready to be shared with unsuspecting family and friends. Simply enter how you're feeling today, and let Boomer.ai work its magic. Whether you're seeking a motivational boost or looking to spread positivity, this AI-driven solution has you covered.
This application is currently deployed on Netlify.
Before installation, you should:
Settings
> Billing
> Add to credit balance
to add usage credits.API keys
> click Create new secret key
. Make sure to save it somewhere as it'll be hidden.
Create an account on Airtable
Generate your Airtable API key. Click Account
> Developer Hub
, then click Create new token
. In the name field, enter your desired name. Add the following scopes/permissions:
data.records.read
data.records.write
Take note of your Airtable API key as well.
On the dashboard sidebar, click the + button to add a new workspace and click Start from scratch
. This creates an empty table where you can add fields.
Create another table, so now you'd have two tables. One table is for chat responses (GPT3/4) and the other for image responses (DALL-e).
Rename the tables to your desire. Note that you have to change the environment variables accordingly.
The chat response table should have the following fields
message: String | model: String | date: String |
---|---|---|
someMessage | someModel | someDate |
... | ... | ... |
The image response table should have the following fields
image: String | date: String |
---|---|
someMessage | someDate |
... | ... |
cd boomerai
npm i
.Note: Ensure that the .env file is INCLUDED in your .gitignore
Include the following environment variables
Note: Depending on whether you use Vite or create-react-app, please prepend your environment variables with
VITE_
orREACT_APP_
Framework | Prepend | Example | Importing |
---|---|---|---|
vite | VITE_ | VITE_OPENAI_API_KEY | import.meta.env.VITE_OPENAI_API_KEY |
create-react-app | REACTAPP\ | REACT_APP_OPENAI_API_KEY | process.env.REACT_APP_OPENAI_API_KEY |
Desc. | Value |
---|---|
{prepend}_OPENAI_API_KEY | From previous steps |
{prepend}_OPENAI_CHAT_ENDPOINT | https://api.openai.com/v1/chat/completions |
{prepend}_OPENAI_DALLE_ENDPOINT | https://api.openai.com/v1/images/generations |
{prepend}_AIRTABLE_API_KEY | From previous steps |
{prepend}_AIRTABLE_CHAT_TABLE_ENDPOINT | From previous steps |
{prepend}_AIRTABLE_IMAGE_TABLE_ENDPOINT | From previous steps |
npm run dev
.localhost:<port number>
into the URL bar.Service | Method | Endpoint | Parameters |
---|---|---|---|
OpenAI: GPT3/4 | POST | https://api.openai.com/v1/chat/completions | Reference |
OpenAI: DALL-e | POST | https://api.openai.com/v1/images/generations | Reference |
Airtable: Get Chat Records | GET | https://api.airtable.com/v0/{baseId}/{chatTableName} | NIL |
Airtable: Get Image Record | GET | https://api.airtable.com/v0/{baseId}/{imageTableName} | NIL |
Airtable: Create Chat Record | POST | https://api.airtable.com/v0/{baseId}/{chatTableName} | Refer Below |
Airtable: CreateImage Record | POST | https://api.airtable.com/v0/{baseId}/{imageTableName} | Refer below |
Airtable: Delete Chat Record | DELETE | https://api.airtable.com/v0/{baseId}/{chatTableName}?records[]={itemID} | NIL |
Airtable: Delete Image Record | DELETE | https://api.airtable.com/v0/{baseId}/{imageTableName}?records[]={itemID} | NIL |
Airtable: Create New Records: Chat Records
{
"records": [
{
"fields": {
"message": "TESTING LAZ",
"model": "gpt-3.5-turbo-0125",
"date": "1710228333"
}
}
]
}
Airtable: Create New Record: Image Records
{
"records": [
{
"fields": {
"image": "test",
"date": "123455"
}
}
]
}
This section explains the directory structure of the code base.
.
├── node_modules
├── public
└── src
├── components
│ └── cssfiles
├── docs
├── fonts
└── media
./src
directory../components
../components/cssfiles
are broken down into six categories: Buttons
, Image
, Loading
, Modal
, Table
and Text
../docs
../fonts
../media
.Some known problems with the current implementation are
(3MB * 8 bits) / 6 = 4216928 characters
. This overly exceeds Airtable's 100k character limit per record. Even if we break that single iamge down to 100k character substrings, we'd have to have minimum 43 substrings -> 43 Airtable API calls, which is not ideal.Save Text Only
/Save Image Only
, Save Both
) to prevent saving of duplicates.Desc. | URL |
---|---|
Loading Animation | Link |
Boomer Gif | Link |
Hex-to-RGB Converter | https://www.rapidtables.com/convert/color/hex-to-rgb.html |
CSS Gradient Finder | https://cssgradient.io/gradient-backgrounds/ |