- First of all, you need to have a AWS account configured (with the all necessary permissions) locally:
aws configure- Go to infrastructure directory
cd infrastructure- Create a Terraform backend config file
cat > aws-backend.conf <<EOF
bucket = "your-tfstate-bucket"
key = "state/aws.tfstate"
region = "sa-east-1"
EOFChange the bucket, key and region as you want.
- Initialize the Terraform
terraform init -backend-config=aws-backend.conf- Create all resources with
terraform apply
terraform apply -auto-approveIf you want, execute a terraform plan before.
- Go to timeless-api directory
cd timeless-api- Create a
.envfile
cat > .env <<EOF
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
OPENAI_API_KEY=
SECURITY_KEY=
INCOMING_MESSAGE_FIFO_URL=
RECOGNIZED_MESSAGES_FIFO_URL=
EOF- Fill in all environment variables
The table below explains the purpose of each variable along with suggested example values:
| Variable | Description | Suggested Example |
|---|---|---|
AWS_ACCESS_KEY_ID |
Your AWS Access Key | AKIAxxxxxxxxxxxxxxx |
AWS_SECRET_ACCESS_KEY |
Your AWS Secret Access Key | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
ASSETS_BUCKET |
The name of the bucket where audio and images will be stored (created via Terraform) | my-assets-bucket |
OPENAI_API_KEY |
Your OpenAI API key | sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
SECURITY_KEY |
Secret key used for AES encryption (must be exactly 16, 24, or 32 characters long, no accents) | MySuperSecretAESKey12345678901234 |
INCOMING_MESSAGE_FIFO_URL |
The URL of the SQS FIFO queue for incoming messages | https://sqs.us-east-1.amazonaws.com/123456789/incoming-messages.fifo |
RECOGNIZED_MESSAGES_FIFO_URL |
The URL of the SQS FIFO queue for processed messages | https://sqs.us-east-1.amazonaws.com/123456789/messages-processed.fifo |
- Execute the application in Dev mode
./mvnw quarkus:dev -Dquarkus.profile=aws-
Sign up at http://localhost:8080/sign-up
-
Sign in at http://localhost:8080
-
Add the user phone number at http://localhost:8080/home/user-configs, this phone number must be set after on
ALLOWED_PHONE_NUMBERS.
-
Go to
whatsappdirectory -
Install packages
npm install- Set the following environment variables in your
.envfile:
| Variable | Description | Suggested Example |
|---|---|---|
AWS_ACCESS_KEY_ID |
Your AWS Access Key | AKIAxxxxxxxxxxxxxxxxxx |
AWS_SECRET_ACCESS_KEY |
Your AWS Secret Key | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
ASSETS_BUCKET |
The name of the bucket where audio and images will be stored (created via Terraform) | my-assets-bucket |
ALLOWED_PHONE_NUMBERS |
Comma-separated list of phone numbers allowed to interact with the bot | 5511999999999,5511888888888 |
OPENAI_API_KEY |
Your OpenAI API Key used to access GPT and Whisper APIs | sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
INCOMING_MESSAGE_QUEUE |
URL of the SQS queue that receives incoming messages | https://sqs.us-east-1.amazonaws.com/123456789/incoming-messages.fifo |
RECOGNIZED_MESSAGES_FIFO_URL |
URL of the SQS FIFO queue where processed messages are sent | https://sqs.us-east-1.amazonaws.com/123456789/messages-processed.fifo |
- Start the application
npm run start- Open the WhatsApp and scan the QR Code generated
-
Open the sign-up page at http://localhost:8080/sign-up.
-
Fill out the registration form with your details and submit it.
-
Log in to your account at http://localhost:8080.
-
Add your phone number on the User Configs page.
⚠️ Make sure the phone number matches one of the values defined in theALLOWED_PHONE_NUMBERSenvironment variable. -
After connected the device with the scanned QR Code, send the following message:
"Achei mil reais no chão da praia".You should receive something like it:
-
Refresh the page and see your balance go negative — good luck managing your expenses!

