Community & Social Features
Relevant source files
The following files were used as context for generating this wiki page:
PuppyPad provides a suite of community and social features that allow members to discover, follow, and interact with other site owners. These features transform static homepage hosting into a social network by implementing activity feeds, profile interactions, and site discovery mechanisms.
The system relies on a central SQLite database to track relationships between users, including follows, blocks, likes, and comments. Discovery is facilitated through "The Dog Park" (site directory), a global webring, and automated Atom feeds.
Sources: README.md:29-45, PLAN.md:120-155
Site Discovery Mechanisms
PuppyPad employs several methods for users to find new content. These mechanisms prioritize active, verified sites and prevent spam through specific cooldown periods.
The Dog Park (Site Directory)
The Dog Park acts as the primary directory. It displays site cards containing screenshots, taglines, tags, and hit counters. Users can sort the directory by recent updates, newest members, most followed, or most visited.
The diagram shows the logic gate for a site to appear in public listings.
Sources: src/server.js:154-159, src/views.js:129-140
Webring and Random Fetch
The Webring is an opt-in feature where members add navigation links to their site. The webring/next, webring/prev, and webring/random endpoints facilitate movement between participating sites.
| Endpoint | Behavior | Eligibility |
|---|---|---|
/random | Redirects to a random listed site | Listed site |
/webring/next | Redirects to the next site in the ring (by ID) | webring = 1 and Listed |
/webring/prev | Redirects to the previous site in the ring (by ID) | webring = 1 and Listed |
Sources: src/server.js:335-350, src/widgets.js:65-66
Social Interactions
Members interact directly through profiles and update events. Interactions are restricted by the system's blocking logic.
Following and Activity Feeds
Following a site adds its updates to the user's personal /feed. An update event is generated automatically when a member saves or uploads files.
- Follow: The
POST /followendpoint creates a record in thefollowstable if no block exists. - Update Event: The
markUpdatedfunction creates or updates an event in theeventstable. Events are grouped by hour. - Feed Generation: The
/feedroute retrieves events from users identified in thefollowstable, excluding hidden or banned sites.
Sources: src/server.js:235-245, src/server.js:319-324, src/views.js:195-197
Liking and Commenting
Users can interact with specific update events or general profile pages.
- Likes: Logged-in users can toggle a "like" on an event via
POST /like. - Comments: Users post comments to
POST /comment. Comments target either anevent_id(specific update) or auser_id(general profile guestbook).
Sequence of events during a social "like" action.
Sources: src/server.js:283-300, src/views.js:168-180
Blocking Logic
Blocking a member provides immediate isolation. The POST /block endpoint performs the following:
- Inserts a record into the
blockstable. - Deletes existing follow records between both parties.
- Filters the blocked user's comments and likes from the blocker's view.
Sources: src/server.js:301-311, test/app.test.js:636-654
Notifications and Communication
PuppyPad uses a dual notification system: an in-site list and optional email alerts.
Notification Kinds
| Kind | Trigger | Email Option |
|---|---|---|
follow | Another user follows your site | note_mail includes 'follow' |
comment | A user comments on your profile/update | note_mail includes 'comment' |
like | A user likes an update event | note_mail includes 'like' |
Sources: src/server.js:260-272, src/views.js:203-214
Guestbooks
Guestbooks are site-specific widgets served via an iframe at /_hw/guestbook.
- Spam Prevention: Entries containing links are automatically held for owner approval.
- Moderation: Owners can block IPs or filter specific words from their guestbook settings.
- Notification: Owners choose between instant emails, daily digests, or no notifications for new entries.
Sources: src/server.js:114-135, src/widgets.js:59-62, src/views.js:527-537
Data Architecture
The social graph is maintained through several relational tables.
ER diagram illustrating the relationships between users, social actions, and events.
Sources: src/server.js:235-320, PLAN.md:120-145
Summary
Community features in PuppyPad are designed to promote organic discovery while giving owners control over their social environment. By combining retro concepts like Webrings and Guestbooks with modern social mechanics like Activity Feeds and Likes, the platform encourages user engagement without algorithmic interference. Owners maintain safety through opt-in listings, granular notification settings, and robust blocking tools.
Sources: README.md:29-45, PLAN.md:15-30