Rebuild the Journal home around a public feed and flagship marketing
The old home was an h1, subtitle, and two auth buttons — visitors
arriving at trails.cool had no idea what it was, and self-hosted
instances had nothing interesting to land on.
The new home is one layout that serves both audiences:
- Hero: a product-describing h1 ("Federated outdoor journal") +
tagline. The site name already lives in the top banner and nav brand,
so the h1 carries the pitch instead of triplicating "trails.cool".
- Auth CTAs: Register (blue) + Sign In (outlined) get primary weight.
Planner demotes to a small "Or try the Planner without an account →"
link below them — it's a nice escape hatch but not the goal.
- Marketing cards: on the flagship only, a 2x2 grid of emoji-icon cards
for Planner / Journal / Federation / Ownership, matching the Planner
home's visual weight. `IS_FLAGSHIP=true` toggles it. Self-hosters get
a "Powered by trails.cool — about the project" link back to the
flagship instead, so they don't have to write their own marketing.
- Public feed: reverse-chronological list of the 20 most recent public
activities on the instance, with owner + distance + date. Empty state
for fresh installs.
Plumbing:
- `listRecentPublicActivities(limit)` in activities.server.ts joins
users so the feed can render "by <displayName>" in one query.
- `IS_FLAGSHIP` env wired through docker-compose.yml; cd-apps and
cd-infra both write `IS_FLAGSHIP=true` alongside `DOMAIN=trails.cool`,
so self-hosters (who deploy without these workflows) default to off.
Specs:
- `activity-feed`: new "Instance-wide public activity feed" requirement
so the visibility contract is pinned (public in feed, unlisted +
private are not).
- `journal-landing`: new small spec capturing the hero / marketing /
feed layout contract and the `IS_FLAGSHIP` toggle, so future
instance-branding or empty-state changes have a stable anchor.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a9847c5cab
commit
f0ef989ac3
10 changed files with 339 additions and 65 deletions
|
|
@ -46,3 +46,14 @@ Activities SHALL be allowed to exist without a linked route.
|
|||
#### Scenario: Standalone activity
|
||||
- **WHEN** a user imports a GPX activity without linking to a route
|
||||
- **THEN** the activity is stored with route_id as null
|
||||
|
||||
### Requirement: Instance-wide public activity feed
|
||||
The Journal SHALL expose a reverse-chronological feed of every activity on the instance with visibility `public`. This feed powers the instance home page (see `journal-landing`). `private` and `unlisted` activities SHALL NOT appear in this feed; `unlisted` stays reachable by direct URL only.
|
||||
|
||||
#### Scenario: Public activity appears in the instance feed
|
||||
- **WHEN** an owner marks an activity as `public` and another visitor loads the home page
|
||||
- **THEN** the visitor sees the activity in the instance feed, with the owner's display name, distance, and start date
|
||||
|
||||
#### Scenario: Private or unlisted activities stay out of the feed
|
||||
- **WHEN** an activity's visibility is `private` or `unlisted`
|
||||
- **THEN** it does not appear in the instance feed, regardless of who is viewing
|
||||
|
|
|
|||
38
openspec/specs/journal-landing/spec.md
Normal file
38
openspec/specs/journal-landing/spec.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
## Purpose
|
||||
|
||||
The Journal home page (`/`) serves two audiences with one layout: anonymous visitors arriving at the flagship trails.cool instance, and anyone landing on a self-hosted Journal instance. It introduces the product on the flagship, shows a public activity feed on every instance, and avoids asking self-hosters to write their own marketing copy.
|
||||
|
||||
## Requirements
|
||||
|
||||
### Requirement: Hero and auth CTAs
|
||||
The home page SHALL render a hero section with a product-describing headline, a short tagline, and — for logged-out visitors — Register and Sign In as the primary CTAs. A link to the Planner SHALL be available but visually secondary to auth, because the main conversion goal is account creation.
|
||||
|
||||
#### Scenario: Logged-out visitor sees auth CTAs
|
||||
- **WHEN** a visitor without a session loads the home page
|
||||
- **THEN** Register (primary button) and Sign In (outlined button) appear together, with a smaller "Or try the Planner without an account →" link below them
|
||||
|
||||
#### Scenario: Logged-in user sees welcome instead of CTAs
|
||||
- **WHEN** a signed-in user loads the home page
|
||||
- **THEN** the auth CTAs are replaced by a welcome line linking to their profile
|
||||
|
||||
### Requirement: Flagship-only marketing section
|
||||
The home page SHALL render a four-card marketing section (Planner / Journal / Federation / Ownership) if and only if the `IS_FLAGSHIP` environment variable is `"true"`. Self-hosted instances SHALL NOT render this block; instead they SHALL show a "Powered by trails.cool — about the project" link that points to `https://trails.cool` so operators don't have to author their own marketing copy.
|
||||
|
||||
#### Scenario: Flagship shows marketing
|
||||
- **WHEN** the home page renders with `IS_FLAGSHIP=true`
|
||||
- **THEN** the four marketing cards are shown and the "Powered by" link is suppressed
|
||||
|
||||
#### Scenario: Self-host shows the back-link
|
||||
- **WHEN** the home page renders with `IS_FLAGSHIP` unset or empty
|
||||
- **THEN** the marketing cards are not rendered and a "Powered by trails.cool — about the project" link appears below the feed
|
||||
|
||||
### Requirement: Public activity feed on home
|
||||
The home page SHALL list the most recent public activities on the instance (see `activity-feed` spec, "Instance-wide public activity feed"). Each entry SHALL link to the activity detail page, show a map thumbnail when geometry is available, and display the owner's display name, distance, and start date.
|
||||
|
||||
#### Scenario: Feed populated
|
||||
- **WHEN** public activities exist on the instance
|
||||
- **THEN** the home renders a reverse-chronological list of at least the 20 most recent, each as a card with map thumbnail + owner + stats + date
|
||||
|
||||
#### Scenario: Empty feed
|
||||
- **WHEN** the instance has no public activities
|
||||
- **THEN** the home shows an empty-state message instead of the feed list; all other sections (hero, marketing, CTAs) remain unchanged
|
||||
Loading…
Add table
Add a link
Reference in a new issue