Skip to main content

planned-endpoints

🧠 1. Gamified Auth Model (Easter Egg Unlocks)​

You asked: How do I make discovering the auth system feel rewarding?

βœ… Idea: Content-locked Auth​

  • Anonymous users can view most (or all) content.

  • Certain pieces contain {auth=required} or {auth=adminsOnly} sections.

  • The first time they encounter such a section:

    β€œπŸͺ„ You’ve stumbled upon something hidden. Want to unlock access? You’ll need to find the [mystery X].”

  • Once they trigger enough easter eggs β†’ account unlock.

Mechanics:​

  • Track a session-based count of easter eggs found.

  • On egg #N (e.g., 3 or 5), show the β€œSign Up Now Unlocked” modal.

  • Upon registration:

    • Store user rank (e.g., visitor, unlocked, contributor, admin) in DB.

πŸ”§ 2. Access Control Markup Tags​

Your {auth=adminsOnly}, {auth=basicUser} idea is πŸ”₯ and easily parseable.

Implementation:​

Store this metadata in each note:

{
"auth": {
"level": "basicUser",
"scopedTo": ["section-3", "comment-form"]
}
}

Or inline as markdown directives:

:::auth basicUser
This comment section requires a basic user account.
:::

At API level, you'd apply row-level filtering + dynamic section stripping based on user role.


πŸ—ƒ 3. Community Feedback: EAV Tables​

You’re spot-on here β€” keep it simple:

βœ… Feedback Table Design​

CREATE TABLE feedback (
user_id UUID,
content_group TEXT, -- e.g., 'proto_product', 'book_review'
item_id TEXT,
vote_direction TEXT, -- 'upvote', 'downvote'
comment TEXT,
created_at TIMESTAMP,
updated_at TIMESTAMP,
PRIMARY KEY (user_id, content_group, item_id)
);

Add a last_changed_vote_at if needed. You don't need SCD type 2 unless you want to build analytics on vote history (which you're rightly ignoring for now).


πŸ“š 4. Planned API Groupings​

Comment and Vote:

Pk-ToDo think about this a bit more... e.g. nested comments

ActionEndpoint
CommentPOST /comment?:<article-id>
VotePOST /vote?:<entity:article_or_comment>&<id>

🧠 Language Hacks​

ActionEndpoint
Get fluencyGET /language-hacks/:id/fluency
Vote fluencyPOST /language-hacks/:id/vote-fluency

πŸ“š Book Reviews​

ActionEndpoint
ViewGET /book-reviews/:id
UpvotePOST /book-reviews/:id/vote
CommentPOST /book-reviews/:id/comment

🎀 Interview Questions​

ActionEndpoint
AddPOST /interview-questions
ViewGET /interview-questions
VotePOST /interview-questions/:id/vote

πŸ§ͺ Proto Products​

ActionEndpoint
UpvotePOST /proto-products/:id/vote
CommentPOST /proto-products/:id/comment

🧠 My Content (Personal Bookmarks & Playlists)​

Some times the entire markdown will be built via data... (like for these ones)

ActionEndpoint
Get BookmarksGET /bookmarks/<category>
Get Youtube PlaylistsGET /playlists/<category>

πŸ›  5. API Architecture​

You mentioned:

Normal Docker container setup on EC2

SSR v. Client Side​

(I plan to go with the mixed model)

Ah β€” now we’re at the core rendering split: You're not just choosing between Django and Go β€” you’re really choosing between server-side rendering (SSR) and client-side composition (API + hydration).

Let’s clarify the real decision you're facing.


🧠 Your Options in Plain Terms​

βœ… Option 1: Store Raw Markdown in a Table, Build on Fetch (SSR or Static)​

  • Render full document (auth-filtered + hydrated) before sending to client
  • Embed vote count, comments, etc. at fetch time

Pros:

  • πŸ”’ No leakage β€” content is built server-side, scoped to the user
  • 🧩 Can render with partials (template macros, includes)
  • 🐌 Easier caching + snapshotting
  • πŸ˜… But rendering gets heavier as logic grows

βœ… Option 2: Client-Side Composition​

  • Deliver raw markdown (filtered or not)

  • Then use API calls to:

    • Get vote count
    • Get comments
    • Maybe even hydrate {auth=basicUser} sections

Pros:

  • 🧠 More modular, React-friendly
  • ⚑ Initial load is faster (if markdown is small)
  • πŸ€– More dynamic behavior (updating votes/comments live)
  • 😬 More moving parts, possibly duplicated logic

πŸ’₯ Your Real Fork:​

You Want...Pick This
Fast static preloadingSSR / prebuild
Central control of content per userSSR / Django View
Fine-grained interactivityClient-side
Live updates to votes/commentsClient-side + API
Simplest full-stack auth filteringSSR
Markdown-as-JSON-store + dynamic piecesClient-side rendering

🧩 Mixed Model: Best of Both?​

You could:

  1. Server-side filter + deliver "base" markdown

    • Handles {auth=...} stripping

    • Possibly pre-injects placeholder markers like:

      <!-- VOTE_COUNT:bookReview_id_1 -->
  2. Client parses placeholders + injects live components

    • Think: comment widget mounts on <!-- COMMENT_BLOCK:id -->
    • Votes update dynamically via useEffect

This way:

  • SSR controls security
  • Client handles live UX

βœ… Solution​

Django + Markdown in DB + SSR for delivery Then client-side APIs for hydration (votes/comments)

That’s:

  • The most secure
  • The most efficient for preloading
  • Still dynamic when needed

Let me know if you want help structuring:

  • A Django Note model with raw_markdown, uuid, etc.
  • A filter_markdown(request.user, raw) function
  • JS/React that looks for <!-- COMMENT_BLOCK:x --> and injects components

This hybrid model is πŸ”₯ and scales well as your features grow.