Skip to content

Remove appwrite#146

Open
zsklav wants to merge 2 commits intoFlashl3opard:mainfrom
zsklav:remove-appwrite
Open

Remove appwrite#146
zsklav wants to merge 2 commits intoFlashl3opard:mainfrom
zsklav:remove-appwrite

Conversation

@zsklav
Copy link
Copy Markdown
Contributor

@zsklav zsklav commented May 4, 2026

No description provided.

zsklav and others added 2 commits May 5, 2026 02:06
Previously lib/mongodb.ts threw at module load if MONGODB_URI was missing,
which broke `next build` even for routes that never touch the database
(Next collects page data for all routes at build time, including static
ones). Now the URI is only validated when connectDB() is actually called.

Build succeeds without env vars; runtime requests that need Mongo fail
with a clear error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Appwrite was running in parallel with Firebase as a second auth+storage
provider. The dual-source-of-truth caused real production pain — Appwrite
Cloud's free tier auto-pauses after inactivity, which surfaced as a wall
of red 403 errors in DevTools on every page (AuthGuard, Dashboard,
ProfileSection, Forums all called authservice.checkUser() on mount).

This commit consolidates onto Firebase as the single auth provider and
removes Appwrite end-to-end:

Auth layer
  - app/appwrite/auth.ts: rewritten as a Firebase-backed implementation
    that preserves the existing AuthServiceContract shape ($id, name,
    email, emailVerification). All callers (login, signup, forgot/reset
    password, AuthGuard, Navbar, ProfileSection, Forums, Dashboard,
    PersonalTODO, community) work unchanged.
  - app/Dashboard/page.tsx, app/components/PersonalTODO.tsx: switch from
    `account.get()` to `authservice.checkUser()`.
  - app/community/page.tsx: replace appwrite Models import with the
    locally-defined AuthUser type.

Data layer (clan feature)
  - app/components/CommunityConnect.tsx: replaced ~300-line clan
    create/join/leave UI (called Appwrite Databases directly) with a
    placeholder card. Clan storage was never migrated to Mongo with the
    rest of the data model and the standalone Express clan server is not
    deployed, so the feature was already non-functional in production.
  - Deleted app/api/clan/* (5 routes) — only callers were the now-stub
    CommunityConnect component.

Dead code
  - app/api/APIDebbuger.tsx: a 200-line in-app Appwrite JWT debugger
    component that no other file imported.
  - app/api/dev/users/* + app/dev/users/page.tsx: admin-only Appwrite
    user listing that's not part of any user-facing flow.
  - app/api/user/{solved-questions,mark-solved}/*: Appwrite-JWT-verifying
    routes that no page in the app actually called.

Dependencies
  - Removed `appwrite` and `node-appwrite` from package.json.
  - lib/appwrite.ts (the Client/Account/Databases client) deleted.

Net: −1265 lines, +175. One auth source. No more 403 console wall on
auth-gated pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 4, 2026

👷 Deploy request for vibexcode pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 23b26cf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant