Skip to content

Doc Review#8

Open
xizuo123 wants to merge 3 commits into
f1shyfang:mainfrom
xizuo123:codex/fullyvibed
Open

Doc Review#8
xizuo123 wants to merge 3 commits into
f1shyfang:mainfrom
xizuo123:codex/fullyvibed

Conversation

@xizuo123
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 24, 2026 01:13
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

@xizuo123 is attempting to deploy a commit to the Michael's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:

  • Make your repository public. Collaboration is free for open source and public repositories.
  • Upgrade to pro and add @xizuo123 as a member. A Pro subscription is required to access Vercel's collaborative features.
    • If you're the owner of the team, click here to upgrade and add @xizuo123 as a member.
    • If you're the user who initiated this build request, click here to request access.
    • If you're already a member of the Michael's projects team, make sure that your Vercel account is connected to your GitHub account.

To read more about collaboration on Vercel, click here.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the hackathon MVP documentation set so the top-level docs are the canonical source of truth (Next.js App Router + Supabase + unversioned /api/* Route Handlers), and demotes blueprint docs to future/reference material.

Changes:

  • Rewrites the canonical MVP docs to align on Supabase (profiles.role), shortlist-row–keyed portal feedback, and explicit route/API contracts.
  • Simplifies the implementation plan into lanes/gates/cut-lines tied to the core demo loop.
  • Adds a docs index and annotates blueprint documents as non-canonical for the MVP.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/TECH-SPEC.md Establishes canonical MVP direction, stack, architecture, and API rules.
docs/ROUTE-MAP.md Defines canonical route tree, middleware responsibilities, and protection matrix.
docs/README.md Adds docs index and highlights canonical MVP documents vs blueprint reference.
docs/PRD.md Aligns PRD language with structured feedback states and canonical MVP constraints.
docs/IMPLEMENTATION-PLAN.md Replaces detailed hour-by-hour tasks with lanes, gates, risks, and cut lines.
docs/DATA-MODEL.md Updates schema/RLS contract, separates share vs feedback lifecycle, and clarifies seed requirements.
docs/COMPONENT-TREE.md Updates MVP UI/component plan and shared types to match the new API/data model.
docs/API-SPEC.md Defines unversioned Route Handler API contract, portal-safe detail endpoints, and feedback semantics.
docs/blueprint/10-hackathon-mvp-spec.md Collapses blueprint MVP spec into a non-canonical summary pointing to top-level docs.
docs/blueprint/09-ui-ux-and-user-flows.md Marks as future/platform reference; points MVP to canonical docs.
docs/blueprint/08-feature-specifications.md Marks as future/platform reference; points MVP to canonical docs.
docs/blueprint/07-api-design-and-database-schema.md Marks as future/platform reference; de-scopes /api/v1/JWT/etc for MVP.
docs/blueprint/06-data-architecture-and-integration.md Marks as future/platform reference; de-scopes live ingestion/maps/etc for MVP.
docs/blueprint/05-system-architecture.md Marks as future/platform reference; de-scopes multi-service architecture for MVP.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/API-SPEC.md
Comment on lines +10 to +13
## 1. API Rules

- All data endpoints return JSON.
- Auth endpoints are handled by Supabase Auth SDK from UI/server helpers, not custom `/api/auth/*` endpoints.
Comment thread docs/ROUTE-MAP.md
Comment on lines +99 to +105
`src/middleware.ts` handles:

1. **Session refresh** via `@supabase/ssr` `updateSession()` on every request.
2. **Role-based redirect** by querying the `profiles` table:
```ts
const { data: profile } = await supabase
.from('profiles')
.select('role')
.eq('id', session.user.id)
.single();
```
3. For `(dashboard)` routes: if `profile.role !== 'agent'`, redirect to `/login`.
4. For `(portal)` routes (excluding `/portal/login`): if not authenticated or `profile.role !== 'client'`, redirect to `/portal/login`.
5. For `/login` and `/signup`: if already authenticated, redirect to `/dashboard` (agent) or `/portal` (client).
6. For `/api/*` routes: return `401 JSON` if no valid session.
1. Supabase session refresh.
2. Public access to `/`, `/login`, `/signup`, and `/portal/login`.
3. Agent-only access to dashboard routes.
4. Client-only access to `/portal` and `/portal/*`.
5. Session requirement for `/api/*`; role checks remain inside Route Handlers.
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.

2 participants