Skip to content

Instantly share code, notes, and snippets.

View bluntbrain's full-sized avatar
🏠
Working from home

bluntbrain bluntbrain

🏠
Working from home
View GitHub Profile
@bluntbrain
bluntbrain / Lottery.sol
Created May 22, 2022 10:52
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// this line is added to create a gist. Empty file is not allowed.
@bluntbrain
bluntbrain / BullX
Created April 9, 2025 22:52
Telegram Trading Terminals Research
# BULLX GUIDE
## Getting Started
### Login Process
BullX is a hybrid Telegram trading bot that works across all devices. Login is simple through the Telegram app.
### Adding Funds
1. Open any token on any chain
2. Click "Add Funds"
@bluntbrain
bluntbrain / dodo-dashboard-setup.md
Last active May 9, 2026 23:25
Talkamore: Monthly + Yearly Subscription Implementation Prompts

Dodo Payments Dashboard Setup: Monthly + Yearly Subscriptions

Step 1: Create the Monthly Subscription Product

  1. Go to https://app.dodopayments.com → log in
  2. Navigate to Products (left sidebar)
  3. Click + Add Product (or "Create Product")
  4. Fill in:
    • Product Name: Talkamore Monthly
  • Type: Select Subscription (not one-time)
@bluntbrain
bluntbrain / journal-photos-backend.md
Created May 11, 2026 18:00
Talkamore — Journal Photos & Stickers Feature Spec (Frontend + Backend)

Journal Photos & Stickers — Backend Implementation Spec

Overview

Support image storage, retrieval, and management for the journal feature. Users can reference images from chat conversations and upload new images directly. The backend handles storage (Cloudflare R2), generates thumbnails, and serves image metadata to the frontend.


Architecture

@bluntbrain
bluntbrain / backend-prompt.md
Created May 11, 2026 20:09
Talkamore: Upgrade Plans + Lifetime Access — Frontend & Backend Prompts

Backend Prompt — Lifetime Access Plan + Subscription Logic

Context

Talkamore backend (Node.js/TypeScript, PostgreSQL/Prisma, Railway). We need to add support for a Lifetime Access plan ("Founding 100") alongside existing Free, Monthly, and Yearly plans.

Plan Definitions

Plan Price Message Cap Duration Stripe Price ID
Free $0 100/month
@bluntbrain
bluntbrain / backend-prompt.md
Last active May 13, 2026 13:56
Session-Based Journal Summaries — Implementation Guide for Talkamore

Backend Prompt — Session-Based Journal Summaries

Context

We're replacing the current "flush after 10 messages or 8h stale" journal system with session-based summaries. A "session" = a window of chat activity. When the user goes silent for 2+ hours, the session closes, a summary blob is generated, and it appears in the journal with a time range timestamp (e.g. "4:00 PM – 6:30 PM"). Multiple sessions per day = multiple blobs. Users can edit blobs after generation.

Current system (what you're working with):

  • backend/src/jobs/flush.ts — groups unflushed USER messages by calendar date, concatenates as [HH:MM] message lines, upserts into journal_entries (one row per user per day), then fires summary generation + mood extraction + supermemory ingest
  • backend/src/lib/summarize.ts — calls GPT-4o to rewrite the day's transcript into a first-person narrative
  • backend/src/lib/openai-extract.ts — extracts mood, energy, themes, moodReason from text
@bluntbrain
bluntbrain / unified-backend-prompt.md
Created May 13, 2026 17:32
Talkamore — Unified JournalBlock Model: Backend + Frontend Implementation Prompts

Backend Prompt — Unified JournalBlock Model + Session-Based Summaries

Context

Talkamore currently has two separate systems writing journal content:

  1. JournalEntry (table: journal_entries) — AI-generated daily roll-ups of chat messages. Created by flush.ts when the user hits 10 unflushed messages or the 8-hour stale cron fires. One row per user per day. Contains a raw transcript + an AI-generated first-person summary.

  2. Journal (table: journals) — User-authored documents created in the web frontend's BlockNote editor. Content is opaque JSON ({ title, mode, pages: [...] }). Autosaved every ~1.5s via PUT /api/v1/drafts/:id.

@bluntbrain
bluntbrain / quiet-mode-backend.md
Created May 16, 2026 12:21
Talkamore Quiet Mode — detailed backend and frontend implementation prompts

Quiet Mode — Backend Implementation Prompt

Overview

Implement a "Quiet Mode" feature that allows users to toggle into a one-way journaling state. When Quiet Mode is active, the chatbot (Maya) stops responding to user messages entirely — the user can dump thoughts without conversational interruptions. All messages are still persisted. When the user exits Quiet Mode, everything written during the session is summarized and stored in the memory/remembering system with a "Quiet Mode" tag.


1. Database Schema Changes

@bluntbrain
bluntbrain / talkamore-pretext-backend.md
Last active May 18, 2026 01:44
Talkamore: Canvas Journal Editor — Backend Image Upload & Content Storage

Backend: Canvas Journal Editor — Image Upload & Content Storage

Overview

The frontend is moving to a unified Canvas-based journal editor using BlockNote (document engine) + Pretext (text layout). The backend's role is:

  1. Image upload — new endpoint for journal image insertion
  2. Content storage — same BlockNote JSON, no format change
  3. Validation — size limits, image URL validation
  4. Cleanup — orphaned image deletion on journal delete
@bluntbrain
bluntbrain / talkamore-pretext-frontend.md
Last active May 18, 2026 02:18
Talkamore: Canvas Journal Editor with Pretext + BlockNote — Frontend Implementation Plan (v3: added document-flow + float-intent responsive model)

Frontend: Canvas-Based Journal Editor with Pretext + BlockNote

Overview

Implement a unified journal editing surface where Canvas renders the journal page (text + images with proper text-wrapping around images) and BlockNote serves as the document engine (schema, input handling, undo/redo). Pretext handles all text measurement and line routing on the Canvas.

No separate preview mode. The Canvas IS the editing surface.

Architecture