PocketBase Manager

A web application for managing notes and receipts with user authentication using PocketBase.

Features

  • User authentication (login/logout)
  • Notes Management:
    • Create, read, update, and delete notes
  • Receipts Management:
    • Create, read, update, and soft-delete receipts
    • Star/unstar receipts for easy organization
    • Soft delete (trashed receipts are hidden but not permanently deleted)
    • Automatic location capture - Uses browser geolocation API to capture coordinates when creating receipts
    • Toggle location capture on/off per receipt
  • Responsive design with TailwindCSS
  • Real-time updates

Routes

  • / - Home page with login/logout functionality
  • /notes - Notes Manager
  • /receipts - Receipts Manager

Structure

  • backend/ - Hono API server with PocketBase integration
  • frontend/ - React frontend application
  • shared/ - Shared types and utilities

Environment Variables

  • POCKETBASE_URL - Your PocketBase instance URL

Collections

users

  • Standard PocketBase users collection with email/password auth

notes

  • id (automatic)
  • note (text) - The note content
  • created (datetime, automatic)
  • updated (datetime, automatic)

receipts

Important: You need to create this collection in your PocketBase admin panel with these fields:

  • id (automatic)
  • message (text, optional) - The receipt message/content
  • starred (boolean, optional, default: false) - Whether the receipt is starred
  • trashed (boolean, optional, default: false) - Whether the receipt is soft-deleted
  • coords (json, optional) - Geographic coordinates (not used in UI)
  • created (datetime, automatic)
  • updated (datetime, automatic)

Collection Rules for receipts:

  • List rule: @request.auth.id != ""
  • View rule: @request.auth.id != ""
  • Create rule: @request.auth.id != ""
  • Update rule: @request.auth.id != ""
  • Delete rule: @request.auth.id != ""

API Endpoints

Authentication

  • POST /api/auth/login - Login with email/password
  • POST /api/auth/logout - Logout current user
  • GET /api/auth/me - Get current user info

Notes

  • GET /api/notes - Get all notes for authenticated user
  • POST /api/notes - Create a new note
  • PUT /api/notes/:id - Update a note
  • DELETE /api/notes/:id - Delete a note

Receipts

  • GET /api/receipts - Get all non-trashed receipts for authenticated user
  • POST /api/receipts - Create a new receipt (with optional coordinates)
  • PUT /api/receipts/:id - Update a receipt (message and/or starred status)
  • DELETE /api/receipts/:id - Soft-delete a receipt (sets trashed=true)