Difficulty: Expert
Type: security
Background
The GuildPass dashboard manages admin controls and gated community experiences, but per the README, local development currently requires no environment variables and runs entirely on mock data — implying there's no real authentication layer wired in yet.
Problem
Without a real auth architecture, every admin control (guild creation, member/pass management, settings) is effectively unprotected once a real backend is introduced, and there's no defined session/role model to build authorization checks on top of.
Expected outcome
A documented, implemented authentication architecture (e.g., NextAuth.js with a credentials/OAuth provider, or a JWT-based session system) establishes user identity, and a role-based authorization layer (owner/admin/moderator/member, scoped per guild) gates every sensitive route and server action.
Suggested implementation
- Choose and integrate an auth solution appropriate for Next.js 14 App Router (e.g., NextAuth.js with JWT sessions).
- Design a role model: global roles vs. per-guild roles (a user can be admin in Guild A and a plain member in Guild B).
- Add middleware (Next.js
middleware.ts) that protects /dashboard, /passes, /guilds, /members, /activity, /settings behind authentication.
- Add a server-side authorization helper (e.g.,
requireRole(guildId, minRole)) used in server actions and route handlers, not just hidden in the UI.
- Update
.env.example with the new required auth-related environment variables and update README.md's environment variables section accordingly.
- Write an architecture doc in
docs/ covering session strategy, role model, and how future backend integration should respect it.
Acceptance criteria
Likely affected files/directories
apps/dashboard/middleware.ts (new)
apps/dashboard/app/**
packages/integration-client/
.env.example
README.md
docs/
Difficulty: Expert
Type: security
Background
The GuildPass dashboard manages admin controls and gated community experiences, but per the README, local development currently requires no environment variables and runs entirely on mock data — implying there's no real authentication layer wired in yet.
Problem
Without a real auth architecture, every admin control (guild creation, member/pass management, settings) is effectively unprotected once a real backend is introduced, and there's no defined session/role model to build authorization checks on top of.
Expected outcome
A documented, implemented authentication architecture (e.g., NextAuth.js with a credentials/OAuth provider, or a JWT-based session system) establishes user identity, and a role-based authorization layer (owner/admin/moderator/member, scoped per guild) gates every sensitive route and server action.
Suggested implementation
middleware.ts) that protects/dashboard,/passes,/guilds,/members,/activity,/settingsbehind authentication.requireRole(guildId, minRole)) used in server actions and route handlers, not just hidden in the UI..env.examplewith the new required auth-related environment variables and updateREADME.md's environment variables section accordingly.docs/covering session strategy, role model, and how future backend integration should respect it.Acceptance criteria
.env.exampleand README updated to reflect new required configurationdocs/Likely affected files/directories
apps/dashboard/middleware.ts(new)apps/dashboard/app/**packages/integration-client/.env.exampleREADME.mddocs/