Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
; DATABASE
POSTGRES_PRISMA_URL=postgresql://postgres:1234@localhost
POSTGRES_URL_NON_POOLING=postgresql://postgres:1234@localhost

NEXT_PUBLIC_DEFAULT_CURRENCY_CODE=""
; FEATURES
NEXT_PUBLIC_DEFAULT_CURRENCY_CODE=
NEXT_PUBLIC_ENABLE_CATEGORY_EXTRACT= ; Requires AI PROVIDER and OBJECT STORAGE
NEXT_PUBLIC_ENABLE_EXPENSE_DOCUMENTS= ; Requires AI PROVIDER and OBJECT STORAGE

; OBJECT STORAGE
S3_UPLOAD_KEY=
S3_UPLOAD_SECRET=
S3_UPLOAD_BUCKET=
S3_UPLOAD_REGION=
S3_UPLOAD_ENDPOINT=
NEXT_PUBLIC_S3_MAX_FILE_SIZE=

; AI PROVIDER
OPENAI_BASE_URL=
OPENAI_API_KEY=
OPENAI_IMAGE_MODEL= ; Required for NEXT_PUBLIC_ENABLE_EXPENSE_DOCUMENTS
OPENAI_TEXT_MODEL= ; Required for NEXT_PUBLIC_ENABLE_CATEGORY_EXTRACT
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The application has a health check endpoint that can be used to check if the app

Spliit offers users to upload images (to an AWS S3 bucket) and attach them to expenses. To enable this feature:

- Follow the instructions in the _S3 bucket_ and _IAM user_ sections of [next-s3-upload](https://next-s3-upload.codingvalue.com/setup#s3-bucket) to create and set up an S3 bucket where images will be stored.
- Create an S3 bucket on AWS or any S3-compatible provider.
- Update your environments variables with appropriate values:

```.env
Expand All @@ -100,17 +100,18 @@ S3_UPLOAD_ENDPOINT=http://localhost:9000

### Create expense from receipt

You can offer users to create expense by uploading a receipt. This feature relies on [OpenAI GPT-4 with Vision](https://platform.openai.com/docs/guides/vision) and a public S3 storage endpoint.
You can offer users to create expense by uploading a receipt. This feature relies on a vision-enabled LLM, and S3 storage for the uploaded images.

To enable the feature:

- You must enable expense documents feature as well (see section above). That might change in the future, but for now we need to store images to make receipt scanning work.
- Subscribe to OpenAI API and get access to GPT 4 with Vision (you might need to buy credits in advance).
- Subscribe to an OpenAI API compatible provider and get access to model with _vision_.
- Update your environment variables with appropriate values:

```.env
NEXT_PUBLIC_ENABLE_RECEIPT_EXTRACT=true
OPENAI_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
OPENAI_IMAGE_MODEL=gpt-5-nano
```

### Deduce category from title
Expand All @@ -120,6 +121,7 @@ You can offer users to automatically deduce the expense category from the title.
```.env
NEXT_PUBLIC_ENABLE_CATEGORY_EXTRACT=true
OPENAI_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
OPENAI_TEXT_MODEL=gtp3.5-turbo
```

## License
Expand Down
Loading