chore: remove unused code and visitor tracking
This commit is contained in:
@@ -16,6 +16,5 @@ Do not remove or bypass these without good reason:
|
||||
1. `db/index.ts` uses a `globalThis` singleton and small pool size to prevent dev hot-reload connection leaks and reduce idle RAM.
|
||||
2. The NextAuth session callback caches `discordId` lookups in memory with a TTL.
|
||||
3. `lib/discord.ts` caches Discord API roles/profiles in memory for 60 seconds to avoid slow repeated external calls.
|
||||
4. `app/page.tsx` batches Redis unique visitor tracking and only counts when `sadd` adds a new IP.
|
||||
5. Docker Compose runs a single app replica; this is intentional for low RAM usage.
|
||||
6. Nginx must disable proxy buffering for the Next.js upstream so App Router streaming and Server Actions do not hang.
|
||||
4. Docker Compose runs a single app replica; this is intentional for low RAM usage.
|
||||
5. Nginx must disable proxy buffering for the Next.js upstream so App Router streaming and Server Actions do not hang.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|---|---|
|
||||
| `lib/config.ts` | Linktree config for `/`: profile, social links, and `config_p2` with Form link. This does not configure the form system. |
|
||||
| `lib/icons.tsx` | SVG icon components for social platforms and Form |
|
||||
| `lib/redis.ts` | Redis singleton using Bun `RedisClient`; used for follower counts and unique visitors |
|
||||
| `lib/redis.ts` | Redis singleton using Bun `RedisClient`; used for follower counts and server-sent events |
|
||||
| `lib/auth.ts` | Shared session, admin, and form role-access authorization helpers |
|
||||
| `lib/discord.ts` | Discord API utilities for guild roles/member profiles with in-memory TTL caching |
|
||||
| `lib/sanitize-html.ts` | Sanitizes admin-authored rich text before storage/rendering |
|
||||
|
||||
@@ -23,7 +23,7 @@ Erika is a Next.js website for the content creator "Erika!". It has two main fea
|
||||
| `DATABASE_URL` | PostgreSQL connection string |
|
||||
| `NEXTAUTH_SECRET` | Secret for signing NextAuth sessions |
|
||||
| `NEXTAUTH_URL` | Canonical URL of the site, such as `https://erika.sudloh.com` |
|
||||
| `REDIS_URL` | Redis connection string, used for follower-count caching and unique visitors |
|
||||
| `REDIS_URL` | Redis connection string, used for follower-count caching and server-sent events |
|
||||
| `BASE_URL` | Public base URL, used in metadata/SEO and generated links |
|
||||
| `DISCORD_CLIENT_ID` / `DISCORD_CLIENT_SECRET` | Discord OAuth app credentials for user login |
|
||||
| `ADMIN_DISCORD_IDS` | Comma-separated Discord user IDs with admin access |
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
| File | Purpose |
|
||||
|---|---|
|
||||
| `app/layout.tsx` | Root layout with fonts, theme provider, tooltip provider, toaster, page progress, and SEO metadata |
|
||||
| `app/page.tsx` | Linktree landing page with avatar, social links, follower counts, unique visitor count, and video background |
|
||||
| `app/page.tsx` | Linktree landing page with avatar, social links, follower counts, and video background |
|
||||
| `app/globals.css` | Global CSS styles |
|
||||
|
||||
## `/form` User-Facing Forms
|
||||
|
||||
Reference in New Issue
Block a user