Blankeos / spend-snap

๐Ÿ’ธ Receipt-collation app built with SolidJS Drizzle.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐Ÿ’ธ 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

  • 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

  • Docker Desktop
  • Bun

๐Ÿš€ Get started

  1. Clone
git clone https://github.com/blankeos/spend-snap.git
cd spend-snap
  1. LocalStack (S3) - For dev only
# 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.
  1. Copy and fill env
cp .env.example .env
  1. Install deps and run
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
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
    }
]' bucketNameHere
  • Endpoint has to be s3...com

About

๐Ÿ’ธ Receipt-collation app built with SolidJS Drizzle.


Languages

Language:TypeScript 97.4%Language:JavaScript 1.3%Language:CSS 1.2%