ticketopia

command module
v0.0.0-...-1ac8cb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Ticketopia

An early-stage event discovery and community app built with Go, Echo, templ, htmx, and shadcn-templ with Tailwind CSS, using the Ticketmaster Discovery API.

Discover events across Ticketmaster categories in a detected or remembered city, with editable filters, image-led results, contextual event previews, dedicated event pages, and load-more pagination. Cached event data is shared by the responsive web UI and JSON API.

Discovery includes category-aware genre filters for music, sports, arts, and more. Private saves, artist/venue follows, Interested, and public recommendations connect people to events; asynchronous discussions add questions, replies, and Helpful acknowledgments. Private reporting and moderator review close the safety loop. See the design guidelines for desktop, tablet, and mobile direction and the MVP boundary for release scope.

Goals

Track delivery here: check a milestone once it works for users and its behavior has been verified. The linked goals and designs describe the expected outcomes. The backend and frontend delivery checklist maps each goal to implementation work and verification checkpoints.

Current focus: use the app, find small nuisances and flow problems, and fix them in place. The event discovery redesign and neighboring-screen cohesion are complete; another broad UI pass or feature sprint is not the next milestone. See release verification priorities for manual checks, pilot feedback, and Kubernetes checks after deployment.

Event data foundation

Discovery guide · Cache behavior · Reliable history

  • Fetch Ticketmaster events with artist, venue, date, status, and price metadata.
  • Load cached category and genre/subgenre catalogs for discovery filters.
  • Support public HTTP taxonomy/contract caching and conditional event reads with complete-response ETags and private/stale/error exclusions.
  • Reuse cached data across clients with concurrent-request deduplication, stale fallback, and bounded external request usage.
  • Provide a searchable, responsive event list with correct ticket links and clear loading, empty, error, and freshness states.
  • Deliver event-first browsing with direct tickets, visible Overview content, distinct participation, and collection return continuity.
  • Persist observations and schedule budgeted city/date refreshes in MariaDB.
  • Power Discover/API with the durable catalog, coverage-aware fallback, and dated event history.
  • Discover across all Ticketmaster event categories with compatible filters.
Personal radar

Goal details · Personalized radar

  • Find nearby events by city with clear dates, venues, and known prices.
  • Start with an approximate IP-based or remembered city, change it easily, and choose a city when detection is unavailable.
  • Validate relevance with people in a pilot city.
  • Save an event and find it again on a later visit.
  • Sign in with Google and manage a profile, privacy defaults, and private preferences.
  • Keep saved events private.
  • Follow artists and venues.
  • See personalized matches with understandable reasons.
Useful reminders

Reminder goals · SES reminders

  • Receive a timely public on-sale reminder for a saved event (opt-in SES setup).
  • Choose preset/custom on-sale reminder timing, inspect delivery readiness, and change or pause notification preferences.

Weekly discovery digests and additional sale/price/event-change email reminders are out of scope. Ticket purchase, price monitoring and transactional change notifications belong with the ticket provider. Existing opt-in on-sale reminders and in-app discussion replies remain supported; dated event history stays visible in the app.

Positive event communities

Community goals

  • Mark an event Interested and change or remove that choice.
  • Choose public interest visibility; keep interest identity private by default.
  • Recommend an event publicly, optionally explain why, and edit or withdraw it.
  • Browse event-grouped recommendations by city/category and individual event/profile endorsements.
  • Prevent withdrawal/republication feed bumping without participation quotas.
  • Browse event conversations alongside recommendations.
  • Deliver live public recommendation activity with first-name-only attribution and refreshed event counts (dependency-aware default; production rollout remains gated).
  • Enable notifications for existing/new accounts once and provide synced live preferences, native pause/disable controls and authenticated delivery (live activity Part 1).
  • Filter the complete recent live-activity window by city and event type, with guest-local/account-synced Apply and Reset controls (live activity Part 2).
  • Show bounded activity toasts and provide Happening Now navigation, native browsing and shared filters (presentation checkpoint).
  • Compose specific artist/venue filters with city/type, using persisted selections and authenticated native/enhanced pickers (live activity Part 3).
  • Filter live activity by private Saved/Interested/artist-follow/venue-follow connections, with incremental updates across replicas (live activity Part 4).
  • Later: Mark an event Going and choose participation visibility.
  • Post a question, tip, or comment on an event.
  • Reply to another person's contribution.
  • Edit or remove your own comments and replies.
  • Give or remove a positive Helpful thumbs-up.
  • Follow/unfollow a discussion and receive frequency-controlled in-app reply updates.
  • Report a concern privately and receive acknowledgment.
  • Review reports as a moderator and communicate clear outcomes.
  • Find questions nobody has answered yet, mark Same question, and see people's reasons on event cards (community list revamp).
  • Later: Record Went and share a post-event reflection.
Responsive event and discussion experience

Screen and interaction guidelines

  • Browse with a desktop sidebar, intermediate labeled rail, and mobile bottom navigation.
  • Collapse the desktop sidebar and rearrange sections/destinations with browser-local preferences.
  • Use themed shadcn-templ components throughout the existing responsive UI.
  • Navigate account families consistently and use event-first community, public-profile, follows, and conversation screens without losing native controls.
  • Preview real event details alongside results and open a dedicated event page.
  • Switch event sections in place on Discover and event pages, keeping identity, actions, drafts, reading position, and collection-return continuity.
  • Share/reload selected events and sections, recover local preview failures, and return to results with filters and available browser history state.
  • Select an event into a contextual desktop discussion panel and expand details.
  • Use adaptive tablet navigation and readable primary/context views.
  • Discover, save, express interest, recommend, and discuss through complete single-column mobile screens with bottom navigation and threaded replies.
  • Preserve event context, accessible navigation, and return state across responsive layouts.
  • Keep scoped conversation drafts, explicit discard and duplicate-safe retries; confirm standalone conversation actions without losing reading position.

Responsive journeys are verified with isolated Chromium fixtures, keyboard/touch, 320px/200%-text and automated accessibility checks. History and drafts stay in the current browser/tab; manual screen-reader and physical-device checks remain in the delivery verification checklist.

Reusable API

API design

  • Read events, their metadata, categories, and genres through the API.
  • Read personalized radar results through the API.
  • Manage personal and community activity from another client.
  • Provide an OpenAPI description for implemented endpoints.
  • Let users' AI agents search events and manage their saves and reminders over MCP (/mcp, opt-in, API-token sign-in); radar, follow and Interested tools are implemented and await hosted-client checks.
  • Sign agents in through OAuth with read/write consent and connected-app revocation (implemented, on by default with accounts and required for every /mcp request; verify with hosted clients on a public deployment).
  • Let agents act publicly only with explicit consent: a separate publish scope (OAuth consent, or an API token allowed to post) for posts, replies, recommendations, drafts, Helpful and public Interested, each labelled Agent "via" the app, with drafts for anything the person wants to review first (implemented; verify with a hosted client).
MariaDB persistence

Database foundation/setup · Database design

  • Establish MariaDB connections, serialized migrations, and minimal durable event identity.
  • Keep accounts, credentials, and private preferences across restarts.
  • Keep private artist/venue follows and last-known metadata across restarts.
  • Keep saved events and last-known event details across restarts.
  • Keep event interest and its visibility across restarts.
  • Keep public recommendations, reasons, and original publication times across restarts.
  • Keep dated event observation history across restarts.
  • Keep event discussions and Helpful reactions across restarts.
  • Persist private reports, moderation decisions, author review requests, and moderator roles/audits.
  • Persist in-app discussion notification envelopes and reply references.
  • Persist external on-sale reminder delivery jobs and SES receipts.

The optional foundation uses MariaDB through database/sql and pinned go-sql-driver/mysql, with embedded Goose migrations and mariadb-operator deployment examples. Discovery stays database-free by default; broader durable features are implemented. Shared state across replicas and restore verification belong to the later high-availability goal. Opt-in Google accounts store profiles, preferences, and credentials; private saves retain bookmarks and last-known event details. Private follows add artist/venue search and owner-only collections. Interested keeps separate choices, private-by-default identities, aggregate counts, and explicitly public participant/profile activity. Public recommendations provide separate endorsements, optional reasons, edit/withdrawal, public attribution, grouped city/category browsing, durable anti-bumping, and observe-only activity measurements without automatic quotas. Event discussions add durable public questions, threaded replies, author edit/removal, and independent Helpful reactions. Followed discussions add private subscriptions, immediate/daily/weekly or muted in-app replies, account-wide pause and exact reply links.

Container deployment

Deployment guide

  • Build and run a non-root container with embedded assets, health checks, and graceful shutdown.
  • Identify the deployed source revision in startup logs using runtime SOURCE_COMMIT.
  • Publish a private amd64 app image to GHCR with authenticated pulls.
  • Verify automated GHCR publishing on the self-hosted GitHub Actions runner (workflow setup).
Later: high availability and failover

Not part of the first complete release. Production runs one app and one MariaDB on Coolify, with daily backups.

  • Share durable state across application replicas with operator-managed MariaDB.
  • Back up and successfully restore populated application data.
  • Rehearse database failover once a high-availability topology is chosen.
Optional explorations

Optional explorations include a discovery passport and games and venue/price insights.

Run locally

Requires Go 1.27+ and a Ticketmaster API key.

export TICKETMASTER_KEY=your-api-key
go run ./cmd/ticketopia

Open http://localhost:8080. Environment variables can also be placed in an optional .env file. .env.example documents deployment settings for all implemented features; it enables MariaDB and Google accounts, so replace its placeholders and complete the deployment setup before using it. For database-free discovery, set PERSISTENCE_MODE=disabled and AUTH_ENABLED=false.

JSON reads start at /api/v1/events, /api/v1/categories, and /api/v1/genres. The OpenAPI contract describes the HTTP API's routes, parameters, and responses and is served at /api/v1/openapi.yaml. See the discovery guide for filters and TICKETMASTER_DAILY_BUDGET configuration.

Localhost starts with a city prompt. Public visitors can receive an approximate IP-based city; see location setup for the optional lookup toggle and trusted reverse-proxy configuration.

The cache runs in memory by default. Shared backends are optional; see cache configuration.

MariaDB is opt-in with PERSISTENCE_MODE=mariadb; see the persistence guide for the local database, verified TLS, separate migration command, and SQL tests. Run make db-setup to prepare local MariaDB, apply migrations and runtime grants, and verify required permissions. It is safe to rerun after migration changes; normal app restarts do not require it. make migrate applies only schema migrations to an existing database using your environment/.env settings and migration credentials; it does not start containers or apply runtime grants.

For local SES API emulation, run make ses-setup; make local-setup prepares both MiniStack SES and MariaDB without an account/auth token. Use the loopback SES_ENDPOINT_URL settings in local development. These targets do not modify your .env or provision production AWS resources.

Accounts are separately opt-in with AUTH_ENABLED=true, AUTH_BASE_URL, GOOGLE_CLIENT_ID, and GOOGLE_CLIENT_SECRET; see Google sign-in setup. Discovery stays public. Private saves, Interested, and public recommendations are available with accounts enabled, along with event discussions. Private reporting and moderation are implemented for discussion posts/replies, with receipts, reversible hiding, author outcomes, and durable moderator roles. See moderation for the operator grant/revoke CLI. Reliable event history adds dated changes, opt-in city/date collection and shared provider budgets. The current binary requires schema 14, including indexed community filters, stored Discover/coverage, private artist/venue follows, in-app discussion notifications and public on-sale email reminders. Drain older binaries, migrate and reapply grants before starting this version. This is not public-pilot approval.

Run in a container

docker build -t ticketopia:local .
docker run --rm -p 8080:8080 -e TICKETMASTER_KEY ticketopia:local

Export TICKETMASTER_KEY first as above. The image builds and embeds frontend assets, runs as non-root, and includes a curl-free liveness check on port 8080. Use the Dockerfile build strategy in Coolify; no custom build/start command is needed. See container deployment for runtime configuration, health endpoints, shutdown behavior, and Kubernetes probes.

Development

Use Go 1.27+ and Node.js 24 with npm for the Tailwind v4 asset build. go.mod declares the Go requirement; .nvmrc and the npm engine declaration select Node 24. With nvm, run nvm install and nvm use first. Install the pinned dependencies and build templates, component scripts, CSS, and the Go binary:

npm ci
npm run build

Run ./bin/ticketopia or restart go run ./cmd/ticketopia after rebuilding; browser assets are embedded in the Go binary. Add library components with:

go tool shadcn-templ add textarea
npm run build

See the component guide for build outputs, theme setup, and local component adaptations, DESIGN.md for the visual system, and the UI guide for routes and current feature availability.

Verify backend behavior with go test -race ./... and go vet ./....

See documentation and change history for feature guides and project updates.

Documentation

Overview

Command healthcheck probes the running server without curl or a shell.

Directories

Path Synopsis
cmd
ticketopia command
ticketopia-local-accounts command
Command ticketopia-local-accounts creates or removes throwaway accounts for trying agent tools against a local server: `create` writes their sessions, API tokens and OAuth tokens to .local/local-test-accounts.json; `remove` deletes the accounts and everything they made.
Command ticketopia-local-accounts creates or removes throwaway accounts for trying agent tools against a local server: `create` writes their sessions, API tokens and OAuth tokens to .local/local-test-accounts.json; `remove` deletes the accounts and everything they made.
ticketopia-review-mcp command
Command ticketopia-review-mcp exposes the local review fixtures to MCP clients over stdio: list scenarios, (re)start the review server on one, and read its manifest.
Command ticketopia-review-mcp exposes the local review fixtures to MCP clients over stdio: list scenarios, (re)start the review server on one, and read its manifest.
internal
accounts
Package accounts owns account identity, credentials, and private preferences.
Package accounts owns account identity, credentials, and private preferences.
activity
Package activity owns the bounded, identity-minimal public live view.
Package activity owns the bounded, identity-minimal public live view.
api
appmcp
Package appmcp serves Ticketopia's event tools, and with an API token the caller's saves and reminders, to users' agents over MCP (Streamable HTTP, stateless).
Package appmcp serves Ticketopia's event tools, and with an API token the caller's saves and reminders, to users' agents over MCP (Streamable HTTP, stateless).
calendar
Package calendar writes one event as an iCalendar (RFC 5545) file.
Package calendar writes one event as an iCalendar (RFC 5545) file.
discussionfollows
Package discussionfollows owns private conversation subscriptions and in-app reply notifications.
Package discussionfollows owns private conversation subscriptions and in-app reply notifications.
discussions
Package discussions owns public, asynchronous event conversations and Helpful reactions.
Package discussions owns public, asynchronous event conversations and Helpful reactions.
drafts
Package drafts holds free text an agent wrote for the person to review.
Package drafts holds free text an agent wrote for the person to review.
eventactivity
Package eventactivity composes lightweight public discovery previews.
Package eventactivity composes lightweight public discovery previews.
events
Package events is the shared boundary for durable event identity.
Package events is the shared boundary for durable event identity.
follows
Package follows owns private artist/venue subscriptions, independently of event interest, saves, public profiles and notification delivery.
Package follows owns private artist/venue subscriptions, independently of event interest, saves, public profiles and notification delivery.
history
Package history owns scheduled collection and meaningful event changes.
Package history owns scheduled collection and meaningful event changes.
htmlcheck
Package htmlcheck inspects rendered HTML in tests.
Package htmlcheck inspects rendered HTML in tests.
interests
Package interests owns reversible event interest, independently of bookmarks.
Package interests owns reversible event interest, independently of bookmarks.
kv
localaccounts
Package localaccounts creates throwaway accounts for trying Ticketopia's agent tools (/mcp) and account pages against a local server and database: each with a browser session and API token, plus OAuth connections like an approved agent's, so the publish scope can be exercised without a hosted client.
Package localaccounts creates throwaway accounts for trying Ticketopia's agent tools (/mcp) and account pages against a local server and database: each with a browser session and API token, plus OAuth connections like an approved agent's, so the publish scope can be exercised without a hosted client.
location
Package location provides a best-effort city hint, not a precise user location.
Package location provides a best-effort city hint, not a precise user location.
moderation
Package moderation owns private reports, review decisions, and author appeals.
Package moderation owns private reports, review decisions, and author appeals.
oauth
Package oauth is Ticketopia's OAuth 2.1 authorization server for the agent endpoint (/mcp).
Package oauth is Ticketopia's OAuth 2.1 authorization server for the agent endpoint (/mcp).
oauth/oauthtest
Package oauthtest provides stand-ins for the OAuth service in tests and review fixtures.
Package oauthtest provides stand-ins for the OAuth service in tests and review fixtures.
persistence
Package persistence owns MariaDB connections, migrations, and repositories.
Package persistence owns MariaDB connections, migrations, and repositories.
persistence/dberr
Package dberr holds the database error that callers outside persistence, such as the HTTP API, recognize without importing persistence itself.
Package dberr holds the database error that callers outside persistence, such as the HTTP API, recognize without importing persistence itself.
persistence/persistencetest
Package persistencetest creates disposable MariaDB schemas and users for the opt-in integration suite and local review fixtures.
Package persistencetest creates disposable MariaDB schemas and users for the opt-in integration suite and local review fixtures.
radar
Package radar owns explainable, private discovery.
Package radar owns explainable, private discovery.
recommendations
Package recommendations owns public endorsements, independently of saves, interest, attendance, and discussion posts.
Package recommendations owns public endorsements, independently of saves, interest, attendance, and discussion posts.
reminders
Package reminders owns explicitly configured, private public-on-sale emails.
Package reminders owns explicitly configured, private public-on-sale emails.
reviewfixture
Package reviewfixture serves production handlers over a disposable MariaDB schema with seeded, signed-in fixture accounts for local manual or agent review.
Package reviewfixture serves production handlers over a disposable MariaDB schema with seeded, signed-in fixture accounts for local manual or agent review.
saved
Package saved owns private bookmarks.
Package saved owns private bookmarks.
telemetry
Package telemetry exports Ticketopia's metrics and traces over OTLP/HTTP when an OpenTelemetry endpoint is configured.
Package telemetry exports Ticketopia's metrics and traces over OTLP/HTTP when an OpenTelemetry endpoint is configured.
useractivity
Package useractivity reads one account's public contributions as a single newest-first timeline: visible discussion posts and replies, active recommendations, and Interested choices the person made public.
Package useractivity reads one account's public contributions as a single newest-first timeline: visible discussion posts and replies, active recommendations, and Interested choices the person made public.
scripts
css-preview command
css-preview renders production templates with isolated, read-only CSS fixtures.
css-preview renders production templates with isolated, read-only CSS fixtures.
views
account
templ: version: v0.3.1020
templ: version: v0.3.1020
assets
Package assets contains the browser assets shipped with the application.
Package assets contains the browser assets shipped with the application.
components
templ: version: v0.3.1020
templ: version: v0.3.1020
components/alert
templ: version: v0.3.1020
templ: version: v0.3.1020
components/aspectratio
templ: version: v0.3.1020
templ: version: v0.3.1020
components/badge
templ: version: v0.3.1020
templ: version: v0.3.1020
components/button
templ: version: v0.3.1020
templ: version: v0.3.1020
components/card
templ: version: v0.3.1020
templ: version: v0.3.1020
components/collapsible
templ: version: v0.3.1020
templ: version: v0.3.1020
components/empty
templ: version: v0.3.1020
templ: version: v0.3.1020
components/input
templ: version: v0.3.1020
templ: version: v0.3.1020
components/label
templ: version: v0.3.1020
templ: version: v0.3.1020
components/select
templ: version: v0.3.1020
templ: version: v0.3.1020
components/skeleton
templ: version: v0.3.1020
templ: version: v0.3.1020
home
templ: version: v0.3.1020
templ: version: v0.3.1020
layouts
templ: version: v0.3.1020
templ: version: v0.3.1020

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL