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

https://github.com/blankeos/spend-snap

💸 Receipt-collation app built with SolidJS Drizzle.
https://github.com/blankeos/spend-snap

Last synced: 12 months ago
JSON representation

💸 Receipt-collation app built with SolidJS Drizzle.

Awesome Lists containing this project

README

          

💸 Spend Snap

Receipt-collation software I'm building for fun for a use-case at my company
where we have to collate receipts from a trip for claims later on.

Could be a start-up idea, idk.

Table of Contents

- [📺 Tech Stack](#%F0%9F%93%BA-tech-stack)
- [Requirements](#requirements)
- [🚀 Get started](#%F0%9F%9A%80-get-started)
- [Notes Backblaze](#notes-backblaze)

## 📺 Tech Stack

- **Solid**
- **Vike** (I just like it better than Solid-Start because it feels like Svelte for me, also more customizable like making it pass `req` and `res` into my `pageContext`, separate files for `+data.ts`, `+config.ts`. It's a bit verbose in the beginning but it becomes quite pragmatic overtime.))
- **Hono** - thanks to Vike, I can run it on any web framework of my choosing.
- **Turso** + **Drizzle ORM**
- **Backblaze** - File Uploads (LocalStack for S3 in localhost)
- **Lucia**

## Requirements

- [x] Docker Desktop
- [x] Bun

## 🚀 Get started

1. Clone

```sh
git clone https://github.com/blankeos/spend-snap.git
cd spend-snap
```

2. LocalStack (S3) - For dev only

```sh
# Run localstack to check docker-compose.yml
bun s3:create

# AWS Configure first (Just use placeholders: https://github.com/localstack/localstack/issues/8424)
aws configure
> AWS Access Key ID [****************root]: root
> AWS Secret Access Key [****************password]: password
> Default region name [us-east-1]: us-east-1 # Because has the features we need.
> Default output format [None]:

# Create a bucket in s3.
aws --endpoint-url=http://localhost:9000 s3api create-bucket --bucket spend-snap --region us-east-1

# List buckets
aws --endpoint-url=http://localhost:9000 s3api list-buckets

# Alternatively, just visit http://localhost:9000 for the Web UI. Use the root(access key id) and password (access key) to login.
```

3. Copy and fill env

```sh
cp .env.example .env
```

4. Install deps and run

```sh
bun install
bun run dev
```

## Notes Backblaze

- Go to **Application Keys** create a new application key (for the specific project) and save it.
- Setup cors in Backblaze Bucket

```sh
brew install b2-tools

# Use your master key here
b2 account authorize

b2 bucket update --cors-rules '[
{
"corsRuleName": "downloadFromAnyOriginWithUpload",
"allowedOrigins": [
"*"
],
"allowedHeaders": [
"*"
],
"allowedOperations": [
"s3_put"
],
"maxAgeSeconds": 3600
}
]' spend-snap
```

- `Endpoint` has to be s3...com