Skip to content

Claude/multi tenant sign in 016 mj1x m6y gtf s xy uasw ez fg#8

Open
DTTconnect wants to merge 19 commits into
kehanzhang:mainfrom
DTTconnect:claude/multi-tenant-sign-in-016Mj1xM6yGtfSXyUaswEzFG
Open

Claude/multi tenant sign in 016 mj1x m6y gtf s xy uasw ez fg#8
DTTconnect wants to merge 19 commits into
kehanzhang:mainfrom
DTTconnect:claude/multi-tenant-sign-in-016Mj1xM6yGtfSXyUaswEzFG

Conversation

@DTTconnect
Copy link
Copy Markdown

No description provided.

claude and others added 19 commits November 14, 2025 11:14
- Create vercel.json with 5-minute function timeout for API routes
- Add .env.example template with required API keys
- Add comprehensive DEPLOYMENT.md guide with both dashboard and CLI deployment options
Add Vercel deployment & fix TypeScript errorsClaude
Add root-level vercel.json to specify that the Next.js app
is located in the lovable-ui subdirectory. This resolves the
build error where Vercel was trying to build from the root
directory which doesn't contain the Next.js application.
- Update root vercel.json with proper function timeouts and routing
- Remove conflicting lovable-ui/vercel.json
- Add serverless environment check to generate-daytona route
- Update DEPLOYMENT.md with accurate instructions and limitations

Changes:
- Enhanced vercel.json with functions config and rewrites
- Added VERCEL env check in generate-daytona route (returns 501)
- Documented Daytona limitation on serverless platforms
- Clarified that /api/generate works on Vercel, /api/generate-daytona does not

The /api/generate endpoint works perfectly on Vercel for code generation.
The /api/generate-daytona endpoint requires local development or non-serverless hosting.
…rors-01Q5kUq8L9SvmpeM58vaKmhh

Fix Vercel deployment: Configure root directory
The previous vercel.json used 'cd' commands which Vercel doesn't support.
Fixed by:
- Simplifying vercel.json to only configure function timeouts
- Updated DEPLOYMENT.md with clear instructions to set Root Directory to 'lovable-ui' in Vercel project settings

Critical: Users MUST configure Root Directory = lovable-ui in Vercel dashboard
…ors-01Q5kUq8L9SvmpeM58vaKmhh' into claude/fix-vercel-deploy-errors-01XH59K7ih5uXNwq6GBQS3Kq
…-01XH59K7ih5uXNwq6GBQS3Kq

Claude/fix vercel deploy errors 01 xh59 k7ih5u x nwq6 gbqs3 kq
This commit adds a complete multi-tenant authentication and project management
system using Supabase, enabling teams to securely create and manage their
projects with proper data isolation.

Features Added:
- User authentication (email/password sign-up and login)
- Multi-tenant organization system with role-based access
- Row Level Security (RLS) for automatic data isolation
- Project and sandbox tracking in PostgreSQL database
- User dashboard to view organization projects
- Authentication middleware for route protection

Database Schema:
- organizations: Teams/companies
- organization_members: User-to-organization relationships with roles
- projects: Project metadata with prompts
- sandboxes: Daytona sandbox instances linked to projects

Key Components:
- Supabase client utilities (client-side and server-side)
- Authentication pages (/auth/login, /auth/signup)
- Dashboard page with project list and stats
- Updated API route to require auth and save projects
- Updated Navbar with auth-aware navigation
- Middleware for session management

Security:
- RLS policies ensure users only see their organization's data
- Server-side authentication checks on all protected routes
- Automatic organization creation on user signup
- Role-based access control (owner, admin, member)

Documentation:
- Comprehensive setup guide (MULTI_TENANT_SETUP.md)
- SQL migrations with detailed comments
- Database schema documentation

Technical Details:
- Uses @supabase/supabase-js and @supabase/ssr
- Next.js 14 App Router with Server Components
- PostgreSQL with RLS for data isolation
- Cookie-based session management
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