Skip to content

blyncnov/year-sense

Repository files navigation

Cloud-Based Overkill Clock Reader (Year Sense)

A hilariously over-engineered Go REST API that uses Gemini Model gemini-2.5-flash to tell you what year it is from a photo of a clock or calendar.

Features

  • AI Vision: Uses Gemini Model - gemini-2.5-flash to extract years from images.
  • Cost Tracking: Tracks every cent wasted on API calls (approx. $0.02/req).
  • Production Ready:
    • Structured JSON Logging (slog)
    • Rate Limiting (Token Bucket)
    • CORS Middleware
    • Request ID Tracing
    • Graceful Shutdown
    • Panic Recovery
    • Configurable Timeouts
  • Dockerized: Full container support.

Prerequisites

  • Go 1.21+
  • Google Gemini API Key
  • Docker (optional)

Setup

  1. Clone the repository
  2. Configure Environment:
    cp .env.example .env
    # Edit .env and set your GEMINI_API_KEY

Running

Local

make run

Docker

make docker-build
make docker-run

API Documentation

See docs/API.md for full endpoint details.

Quick Test

./scripts/test-api.sh

Why?

See docs/OVERKILL.md.

About

What if you just snap a photo of your calendar, and my little API handles the restautomatically updating your year for you.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors