Add websitebuilder app
Some checks failed
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / lint (push) Has been cancelled

This commit is contained in:
Kunthawat Greethong
2026-01-26 12:50:12 +07:00
parent 93cfc18d1f
commit 4d1bb6892b
227 changed files with 35610 additions and 75 deletions

View File

@@ -0,0 +1,273 @@
# Phase 1: Foundation - Context Bundle
## Task Description
Implement Phase 1 Foundation for MoreMinimore SAAS platform. This phase establishes the core infrastructure including project setup, database configuration, authentication system, user management, and CI/CD pipeline.
## Scope Boundaries
### In Scope
- Next.js 15 project initialization with TypeScript
- PostgreSQL database setup with Drizzle ORM
- Complete database schema (20+ tables from SPECIFICATION.md)
- Redis caching setup
- JWT-based authentication system
- User management APIs and UI
- CI/CD pipeline with GitHub Actions
- Automated testing setup (Vitest, Playwright)
### Out of Scope
- Organization management (Phase 2)
- Project management (Phase 2)
- AI integration (Phase 2)
- Easypanel integration (Phase 4)
- Gitea integration (Phase 5)
- Billing system (Phase 6)
## Technical Requirements
### Technology Stack
- **Frontend**: Next.js 15 (App Router), React 19, Tailwind CSS 4, shadcn/ui
- **Backend**: Next.js API Routes, Node.js 20+
- **Database**: PostgreSQL 16+, Drizzle ORM
- **Cache**: Redis 7+
- **State**: Zustand (global), React Query (server state)
- **Testing**: Vitest (unit), Playwright (E2E)
- **CI/CD**: GitHub Actions
### Database Schema
All tables from SPECIFICATION.md lines 141-397:
- users, organizations, organization_members
- projects, project_versions
- chats, messages, prompts
- ai_providers, ai_models, user_api_keys
- design_systems, deployment_logs
- invoices, subscription_events
- audit_logs, sessions
- email_verification_tokens, password_reset_tokens
### Authentication Requirements
- JWT access tokens (15 min expiration)
- JWT refresh tokens (7 days expiration)
- HTTP-only cookies for token storage
- Email verification required
- Password reset flow
- Role-based authorization (admin, co_admin, owner, user)
## Constraints
### Code Quality Standards
- Pure functions (no side effects)
- Immutability (create new data, don't modify)
- Small functions (< 50 lines)
- Explicit dependencies (dependency injection)
- Modular design (< 100 lines per component)
### Testing Requirements
- AAA pattern (Arrange Act Assert)
- Critical code: 100% coverage
- High priority: 90%+ coverage
- Medium priority: 80%+ coverage
### Security Requirements
- Never expose sensitive data in logs
- Use environment variables for secrets
- Validate all input data
- Use parameterized queries
- Implement rate limiting
- CSRF protection
## Expected Deliverables
### 1. Project Structure
```
src/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ ├── auth/ # Auth pages
│ ├── dashboard/ # Dashboard pages
│ └── layout.tsx
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── auth/ # Auth components
│ └── dashboard/ # Dashboard components
├── lib/ # Utilities
│ ├── db/ # Database utilities
│ ├── auth/ # Auth utilities
│ └── utils.ts
├── services/ # Business logic
│ ├── auth.service.ts
│ ├── user.service.ts
│ └── email.service.ts
├── types/ # TypeScript types
│ └── index.ts
└── middleware.ts # Next.js middleware
```
### 2. Database
- PostgreSQL database `moreminimore`
- Drizzle ORM configured
- All tables created with proper indexes
- Initial migration generated and applied
- Redis connection configured
### 3. Authentication
- Password hashing utility (bcrypt)
- JWT generation/verification utilities
- Auth APIs: register, login, refresh, logout, verify-email, forgot-password, reset-password
- Auth middleware: requireAuth, requireRole, requireOrgMembership
- Session management in database
### 4. User Management
- User profile APIs (GET/PATCH /api/users/me)
- Admin user management APIs (GET/PATCH/DELETE /api/users)
- User profile page
- Settings page
- Admin user management page
### 5. CI/CD
- GitHub Actions workflow file
- Automated testing on push/PR
- Test coverage reporting
- Build validation
## Acceptance Criteria
### Project Setup
- [ ] Next.js 15 project created with TypeScript
- [ ] Tailwind CSS 4 configured
- [ ] shadcn/ui components installed
- [ ] ESLint and Prettier configured
- [ ] Path aliases configured (@/components, @/lib, etc.)
- [ ] Environment variables template created
### Database
- [ ] PostgreSQL database created
- [ ] Drizzle ORM configured
- [ ] All 20+ tables defined in schema
- [ ] Indexes created for performance
- [ ] Initial migration generated
- [ ] Migration applied successfully
- [ ] Redis connection tested
### Authentication
- [ ] Password hashing/verification working
- [ ] JWT tokens generated with correct expiration
- [ ] Register API creates user and sends verification email
- [ ] Login API generates tokens and sets cookies
- [ ] Refresh API rotates tokens correctly
- [ ] Logout API clears cookies and invalidates session
- [ ] Email verification API works
- [ ] Password reset flow works end-to-end
- [ ] Auth middleware protects routes correctly
- [ ] Role-based authorization works
### User Management
- [ ] User profile API returns correct data
- [ ] User profile update works
- [ ] Password change works
- [ ] Admin can list all users
- [ ] Admin can update user details
- [ ] Admin can ban/unban users
- [ ] User profile page displays correctly
- [ ] Settings page works
- [ ] Admin user management page works
### CI/CD
- [ ] GitHub Actions workflow runs on push
- [ ] Tests execute automatically
- [ ] Coverage report generated
- [ ] Build validation passes
- [ ] PR checks work
## Context Files
### Code Quality Standards
- Location: /Users/kunthawatgreethong/.config/opencode/context/core/standards/code-quality.md
- Key principles: Modular, Functional, Maintainable
- Critical patterns: Pure functions, immutability, composition, dependency injection
- Anti-patterns: Mutation, side effects, deep nesting, god modules
### Documentation Standards
- Location: /Users/kunthawatgreethong/.config/opencode/context/core/standards/documentation.md
- Golden Rule: If users ask the same question twice, document it
- Document WHY decisions were made, not just WHAT code does
### Testing Standards
- Location: /Users/kunthawatgreethong/.config/opencode/context/core/standards/test-coverage.md
- Golden Rule: If you can't test it easily, refactor it
- AAA pattern: Arrange Act Assert
- Coverage goals: Critical 100%, High 90%+, Medium 80%+
### Essential Patterns
- Location: /Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md
- Core patterns: Error handling, validation, security, logging, pure functions
- ALWAYS: Handle errors gracefully, validate input, use env vars for secrets
- NEVER: Expose sensitive info, hardcode credentials, skip validation
### Specification
- Location: /Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md
- Complete technical specification with database schema, API design, authentication flow
### Task Breakdown
- Location: /Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/TASKS.md
- Detailed task breakdown for all phases
## Risks & Considerations
### Technical Risks
- PostgreSQL setup complexity on local development
- Redis configuration and connection pooling
- JWT token security and rotation
- Email service integration (Resend/SendGrid)
- Database migration conflicts
### Mitigation Strategies
- Use Docker for local PostgreSQL/Redis if needed
- Implement comprehensive error handling
- Add extensive logging for debugging
- Create rollback procedures for migrations
- Test authentication flow thoroughly
## Next Steps
After Phase 1 completion:
1. Validate all acceptance criteria
2. Run full test suite
3. Document any deviations
4. Prepare for Phase 2: Core Features
---
**Session ID**: ses_phase1_foundation
**Created**: January 19, 2026
**Priority**: High
**Estimated Duration**: 4 weeks

View File

@@ -0,0 +1,28 @@
{
"id": "phase1-foundation-01",
"seq": "01",
"title": "Initialize Next.js 15 project with TypeScript",
"status": "completed",
"depends_on": [],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Next.js 15 project created using npx create-next-app@latest",
"TypeScript strict mode enabled in tsconfig.json",
"ESLint configured with recommended rules",
"Prettier configured with .prettierrc",
"Tailwind CSS 4 configured in tailwind.config.ts",
"Project builds successfully with npm run build"
],
"deliverables": [
"package.json",
"tsconfig.json",
".eslintrc.json",
".prettierrc",
"tailwind.config.ts",
"postcss.config.mjs",
"next.config.mjs"
]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase1-foundation-02",
"seq": "02",
"title": "Set up project structure and path aliases",
"status": "completed",
"depends_on": ["01"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"src/ directory created with app, components, lib, services, types folders",
"Environment variables template (.env.example) created",
"Path aliases configured in tsconfig.json (@/components, @/lib, @/services, @/types)",
"Absolute imports work correctly",
"Folder structure matches context.md specification"
],
"deliverables": [
"src/app/",
"src/components/",
"src/lib/",
"src/services/",
"src/types/",
".env.example",
"tsconfig.json (updated)"
]
}

View File

@@ -0,0 +1,23 @@
{
"id": "phase1-foundation-03",
"title": "Install core dependencies",
"seq": "03",
"status": "completed",
"depends_on": ["02"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Drizzle ORM and Drizzle Kit installed",
"Zustand installed for global state",
"@tanstack/react-query installed for server state",
"shadcn/ui components initialized",
"bcrypt installed for password hashing",
"jsonwebtoken installed for JWT tokens",
"ioredis installed for Redis client",
"zod installed for validation",
"All packages added to package.json"
],
"deliverables": ["package.json (updated)", "components.json (shadcn/ui config)"]
}

View File

@@ -0,0 +1,23 @@
{
"id": "phase1-foundation-04",
"seq": "04",
"title": "Set up PostgreSQL database",
"status": "completed",
"depends_on": ["03"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"PostgreSQL 16+ installed locally or Docker container running",
"Database 'moreminimore' created",
"Database user with proper permissions configured",
"Connection string added to .env.example",
"Database connection tested successfully"
],
"deliverables": [
".env.example (with DATABASE_URL)",
"docker-compose.yml (if using Docker)",
"README.md with database setup instructions"
]
}

View File

@@ -0,0 +1,24 @@
{
"id": "phase1-foundation-05",
"seq": "05",
"title": "Configure Drizzle ORM",
"status": "completed",
"depends_on": ["04"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"drizzle.config.ts created with database connection",
"src/lib/db/index.ts created with database client",
"Migration folder configured",
"Drizzle Kit CLI configured in package.json",
"Database connection tested"
],
"deliverables": [
"drizzle.config.ts",
"src/lib/db/index.ts",
"drizzle/",
"package.json (with drizzle-kit scripts)"
]
}

View File

@@ -0,0 +1,20 @@
{
"id": "phase1-foundation-06",
"seq": "06",
"title": "Create database schema with all tables",
"status": "completed",
"depends_on": ["05"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"All 20+ tables defined in src/lib/db/schema.ts",
"Tables: users, organizations, organization_members, projects, project_versions, chats, messages, prompts, ai_providers, ai_models, user_api_keys, design_systems, deployment_logs, invoices, subscription_events, audit_logs, sessions, email_verification_tokens, password_reset_tokens",
"Foreign key relationships defined correctly",
"Indexes created for performance (email, slug, organization_id, etc.)",
"Schema matches SPECIFICATION.md lines 141-397"
],
"deliverables": ["src/lib/db/schema.ts"]
}

View File

@@ -0,0 +1,19 @@
{
"id": "phase1-foundation-07",
"seq": "07",
"title": "Generate and apply initial database migration",
"status": "completed",
"depends_on": ["06"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Initial migration generated using drizzle-kit generate",
"Migration SQL file created in drizzle/ folder",
"Migration applied successfully to database",
"All tables exist in PostgreSQL",
"Indexes verified in database"
],
"deliverables": ["drizzle/0000_initial.sql", "drizzle/migration_meta.json"]
}

View File

@@ -0,0 +1,23 @@
{
"id": "phase1-foundation-08",
"seq": "08",
"title": "Set up Redis caching",
"status": "completed",
"depends_on": ["04"],
"parallel": true,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Redis 7+ installed locally or Docker container running",
"Redis client configured in src/lib/redis/index.ts",
"Connection string added to .env.example",
"Redis connection tested successfully",
"Basic get/set operations work"
],
"deliverables": [
"src/lib/redis/index.ts",
".env.example (with REDIS_URL)",
"docker-compose.yml (updated if using Docker)"
]
}

View File

@@ -0,0 +1,20 @@
{
"id": "phase1-foundation-09",
"seq": "09",
"title": "Implement password hashing utility",
"status": "completed",
"depends_on": ["03"],
"parallel": true,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"hashPassword function created using bcrypt with salt rounds 12",
"verifyPassword function created",
"Functions are pure and testable",
"Unit tests written with Vitest",
"Tests pass with 100% coverage"
],
"deliverables": ["src/lib/auth/password.ts", "src/lib/auth/__tests__/password.test.ts"]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase1-foundation-10",
"seq": "10",
"title": "Implement JWT token utilities",
"status": "completed",
"depends_on": ["03"],
"parallel": true,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"generateAccessToken function created (15 min expiration)",
"generateRefreshToken function created (7 days expiration)",
"verifyAccessToken function created",
"verifyRefreshToken function created",
"JWT_SECRET added to .env.example",
"Functions are pure and testable",
"Unit tests written with Vitest",
"Tests pass with 100% coverage"
],
"deliverables": [
"src/lib/auth/jwt.ts",
"src/lib/auth/__tests__/jwt.test.ts",
".env.example (with JWT_SECRET)"
]
}

View File

@@ -0,0 +1,28 @@
{
"id": "phase1-foundation-11",
"seq": "11",
"title": "Create user registration API",
"status": "completed",
"depends_on": ["07", "09", "10"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"POST /api/auth/register endpoint created",
"Validates email format and password strength",
"Hashes password before storing",
"Creates user record in database",
"Generates email verification token",
"Returns user data without sensitive fields",
"Error handling for duplicate emails",
"Unit tests written with Vitest",
"Tests pass with 90%+ coverage"
],
"deliverables": [
"src/app/api/auth/register/route.ts",
"src/services/auth.service.ts",
"src/app/api/auth/register/__tests__/route.test.ts"
]
}

View File

@@ -0,0 +1,29 @@
{
"id": "phase1-foundation-12",
"seq": "12",
"title": "Create user login API",
"status": "completed",
"depends_on": ["11"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"POST /api/auth/login endpoint created",
"Verifies email and password",
"Generates access and refresh tokens",
"Sets HTTP-only cookies for tokens",
"Creates session record in database",
"Updates user last_login_at",
"Returns user data",
"Error handling for invalid credentials",
"Unit tests written with Vitest",
"Tests pass with 90%+ coverage"
],
"deliverables": [
"src/app/api/auth/login/route.ts",
"src/services/auth.service.ts (updated)",
"src/app/api/auth/login/__tests__/route.test.ts"
]
}

View File

@@ -0,0 +1,28 @@
{
"id": "phase1-foundation-13",
"seq": "13",
"title": "Create token refresh API",
"status": "completed",
"depends_on": ["12"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"POST /api/auth/refresh endpoint created",
"Verifies refresh token from cookie",
"Generates new access token",
"Rotates refresh token",
"Updates session in database",
"Sets new HTTP-only cookies",
"Error handling for expired/invalid tokens",
"Unit tests written with Vitest",
"Tests pass with 90%+ coverage"
],
"deliverables": [
"src/app/api/auth/refresh/route.ts",
"src/services/auth.service.ts (updated)",
"src/app/api/auth/refresh/__tests__/route.test.ts"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase1-foundation-14",
"seq": "14",
"title": "Create logout API",
"status": "completed",
"depends_on": ["13"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"POST /api/auth/logout endpoint created",
"Clears HTTP-only cookies",
"Invalidates session in database",
"Returns success response",
"Error handling for missing session",
"Unit tests written with Vitest",
"Tests pass with 90%+ coverage"
],
"deliverables": [
"src/app/api/auth/logout/route.ts",
"src/services/auth.service.ts (updated)",
"src/app/api/auth/logout/__tests__/route.test.ts"
]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase1-foundation-15",
"seq": "15",
"title": "Create email verification API",
"status": "completed",
"depends_on": ["11"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"POST /api/auth/verify-email endpoint created",
"Verifies token from request",
"Updates user email_verified to true",
"Deletes verification token",
"Returns success response",
"Error handling for expired/invalid tokens",
"Unit tests written with Vitest",
"Tests pass with 90%+ coverage"
],
"deliverables": [
"src/app/api/auth/verify-email/route.ts",
"src/services/auth.service.ts (updated)",
"src/app/api/auth/verify-email/__tests__/route.test.ts"
]
}

View File

@@ -0,0 +1,33 @@
{
"id": "phase1-foundation-16",
"seq": "16",
"title": "Create password reset APIs",
"status": "completed",
"depends_on": ["11"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"POST /api/auth/forgot-password endpoint created",
"Generates reset token",
"Stores token in database",
"Returns success response (email not exposed)",
"POST /api/auth/reset-password endpoint created",
"Verifies reset token",
"Hashes new password",
"Updates user password",
"Deletes reset token",
"Error handling for expired/invalid tokens",
"Unit tests written with Vitest",
"Tests pass with 90%+ coverage"
],
"deliverables": [
"src/app/api/auth/forgot-password/route.ts",
"src/app/api/auth/reset-password/route.ts",
"src/services/auth.service.ts (updated)",
"src/app/api/auth/forgot-password/__tests__/route.test.ts",
"src/app/api/auth/reset-password/__tests__/route.test.ts"
]
}

View File

@@ -0,0 +1,32 @@
{
"id": "phase1-foundation-17",
"seq": "17",
"title": "Create authentication middleware",
"status": "completed",
"depends_on": ["10", "12"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"requireAuth middleware created",
"Verifies access token from cookie",
"Attaches user to request",
"Returns 401 for unauthenticated requests",
"requireRole middleware created",
"Checks user role (admin, co_admin, owner, user)",
"Returns 403 for unauthorized roles",
"requireOrgMembership middleware created",
"Verifies user is member of organization",
"Returns 403 for non-members",
"Error handling for invalid tokens",
"Unit tests written with Vitest",
"Tests pass with 90%+ coverage"
],
"deliverables": [
"src/middleware.ts",
"src/lib/auth/middleware.ts",
"src/lib/auth/__tests__/middleware.test.ts"
]
}

View File

@@ -0,0 +1,35 @@
{
"id": "phase1-foundation-18",
"seq": "18",
"title": "Create user profile and admin APIs",
"status": "completed",
"depends_on": ["17"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"acceptance_criteria": [
"GET /api/users/me endpoint created (returns current user)",
"PATCH /api/users/me endpoint created (update profile, change password)",
"GET /api/users endpoint created (admin only, list all users)",
"GET /api/users/:id endpoint created (admin only)",
"PATCH /api/users/:id endpoint created (admin only, update user)",
"DELETE /api/users/:id endpoint created (admin only, ban/unban)",
"All endpoints protected with requireAuth middleware",
"Admin endpoints protected with requireRole middleware",
"Input validation with zod",
"Error handling for unauthorized access",
"Unit tests written with Vitest",
"Tests pass with 90%+ coverage"
],
"deliverables": [
"src/app/api/users/me/route.ts",
"src/app/api/users/route.ts",
"src/app/api/users/[id]/route.ts",
"src/services/user.service.ts",
"src/app/api/users/__tests__/me.test.ts",
"src/app/api/users/__tests__/users.test.ts",
"src/app/api/users/__tests__/user-id.test.ts"
]
}

View File

@@ -0,0 +1,41 @@
{
"id": "phase1-foundation-19",
"seq": "19",
"title": "Create user management UI",
"status": "completed",
"depends_on": ["18"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/standards/code-quality.md"
],
"acceptance_criteria": [
"User profile page created at /dashboard/profile",
"Displays user information (name, email, avatar)",
"Allows editing profile information",
"Allows changing password",
"Settings page created at /dashboard/settings",
"Displays account settings",
"Admin user management page created at /admin/users",
"Lists all users with search and filtering",
"Allows viewing user details",
"Allows updating user details",
"Allows banning/unbanning users",
"All pages use shadcn/ui components",
"Components are modular (< 100 lines)",
"E2E tests written with Playwright",
"Tests pass"
],
"deliverables": [
"src/app/dashboard/profile/page.tsx",
"src/app/dashboard/settings/page.tsx",
"src/app/admin/users/page.tsx",
"src/components/auth/ProfileForm.tsx",
"src/components/auth/PasswordChangeForm.tsx",
"src/components/admin/UserList.tsx",
"src/components/admin/UserDetails.tsx",
"tests/e2e/profile.spec.ts",
"tests/e2e/settings.spec.ts",
"tests/e2e/admin-users.spec.ts"
]
}

View File

@@ -0,0 +1,30 @@
{
"id": "phase1-foundation-20",
"seq": "20",
"title": "Set up CI/CD pipeline with automated testing",
"status": "completed",
"depends_on": ["19"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/standards/test-coverage.md"
],
"acceptance_criteria": [
"GitHub Actions workflow file created at .github/workflows/ci.yml",
"Workflow runs on push and pull requests",
"Build step validates Next.js build",
"Test step runs Vitest unit tests",
"Coverage report generated and uploaded",
"E2E test step runs Playwright tests",
"Coverage thresholds enforced (critical 100%, high 90%, medium 80%)",
"Build fails if tests fail or coverage below threshold",
"Workflow tested and passes on push"
],
"deliverables": [
".github/workflows/ci.yml",
"vitest.config.ts",
"playwright.config.ts",
".nycrc (coverage config)",
"README.md (updated with CI/CD info)"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase1-foundation",
"name": "Phase 1: Foundation",
"status": "active",
"objective": "Establish core infrastructure: project setup, database, authentication, user management, and CI/CD pipeline",
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/TASKS.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/standards/code-quality.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/standards/test-coverage.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"exit_criteria": [
"Next.js 15 project created with TypeScript and configured",
"PostgreSQL database with Drizzle ORM and all 20+ tables",
"Redis caching configured and tested",
"Complete JWT-based authentication system with email verification",
"User management APIs and UI (profile, settings, admin)",
"CI/CD pipeline with automated testing (Vitest, Playwright)",
"All acceptance criteria from context.md met"
],
"subtask_count": 20,
"completed_count": 20,
"created_at": "2026-01-19T00:00:00Z"
}

View File

@@ -0,0 +1,28 @@
{
"id": "phase2-core-features-01",
"seq": "01",
"title": "Create organization CRUD APIs",
"status": "completed",
"depends_on": [],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md"
],
"acceptance_criteria": [
"POST /api/organizations creates organization with valid data",
"GET /api/organizations returns user's organizations",
"GET /api/organizations/:id returns single organization",
"PATCH /api/organizations/:id updates organization fields",
"DELETE /api/organizations/:id soft deletes organization",
"All endpoints validate user permissions",
"APIs return proper error responses"
],
"deliverables": [
"src/app/api/organizations/route.ts",
"src/app/api/organizations/[id]/route.ts",
"src/services/organization.service.ts",
"src/lib/db/schema.ts (organizations table)",
"src/middleware.ts (updated for org permissions)"
]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase2-core-features-02",
"seq": "02",
"title": "Create organization member management APIs",
"status": "completed",
"depends_on": ["01"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md"
],
"acceptance_criteria": [
"POST /api/organizations/:id/members invites new member",
"GET /api/organizations/:id/members returns all members",
"PATCH /api/organizations/:id/members/:memberId updates member role",
"DELETE /api/organizations/:id/members/:memberId removes member",
"Only owners/admins can manage members",
"Members can view their own organization",
"Role-based permissions enforced"
],
"deliverables": [
"src/app/api/organizations/[id]/members/route.ts",
"src/app/api/organizations/[id]/members/[memberId]/route.ts",
"src/services/organization-member.service.ts",
"src/lib/db/schema.ts (organization_members table)"
]
}

View File

@@ -0,0 +1,29 @@
{
"id": "phase2-core-features-03",
"seq": "03",
"title": "Create organization management UI",
"status": "completed",
"depends_on": ["01", "02"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Organization creation form validates input",
"Organization dashboard displays org details",
"Member management page lists all members",
"Member role update works correctly",
"Member removal requires confirmation",
"Organization settings page updates org info",
"UI handles loading and error states"
],
"deliverables": [
"src/app/dashboard/organizations/new/page.tsx",
"src/app/dashboard/organizations/[id]/page.tsx",
"src/app/dashboard/organizations/[id]/members/page.tsx",
"src/app/dashboard/organizations/[id]/settings/page.tsx",
"src/components/organizations/OrganizationForm.tsx",
"src/components/organizations/MemberList.tsx",
"src/components/organizations/MemberActions.tsx"
]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase2-core-features-04",
"seq": "04",
"title": "Create project CRUD APIs",
"status": "completed",
"depends_on": ["01"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md"
],
"acceptance_criteria": [
"POST /api/projects creates project in organization",
"GET /api/projects returns user's accessible projects",
"GET /api/projects/:id returns single project",
"PATCH /api/projects/:id updates project fields",
"DELETE /api/projects/:id soft deletes project",
"Projects scoped to organization",
"Slug uniqueness enforced per organization"
],
"deliverables": [
"src/app/api/projects/route.ts",
"src/app/api/projects/[id]/route.ts",
"src/services/project.service.ts",
"src/lib/db/schema.ts (projects table)"
]
}

View File

@@ -0,0 +1,29 @@
{
"id": "phase2-core-features-05",
"seq": "05",
"title": "Create project management UI",
"status": "completed",
"depends_on": ["04"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Project creation form validates input",
"Project list page displays all projects",
"Project dashboard shows project details",
"Project settings page updates project info",
"Project deletion requires confirmation",
"UI filters projects by organization",
"Loading and error states handled"
],
"deliverables": [
"src/app/dashboard/projects/new/page.tsx",
"src/app/dashboard/projects/page.tsx",
"src/app/dashboard/projects/[id]/page.tsx",
"src/app/dashboard/projects/[id]/settings/page.tsx",
"src/components/projects/ProjectForm.tsx",
"src/components/projects/ProjectList.tsx",
"src/components/projects/ProjectCard.tsx"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase2-core-features-06",
"seq": "06",
"title": "Implement project templates system",
"status": "completed",
"depends_on": ["04"],
"parallel": true,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Template system defined with default templates",
"Template selection UI displays available templates",
"Template preview shows template structure",
"Template customization allows modifying defaults",
"Project creation uses selected template",
"Templates include starter files and configuration"
],
"deliverables": [
"src/lib/templates/index.ts",
"src/lib/templates/default-templates.ts",
"src/components/projects/TemplateSelector.tsx",
"src/components/projects/TemplatePreview.tsx",
"src/services/template.service.ts"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase2-core-features-07",
"seq": "07",
"title": "Create chat CRUD APIs",
"status": "completed",
"depends_on": ["04"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md"
],
"acceptance_criteria": [
"POST /api/projects/:id/chats creates new chat",
"GET /api/projects/:id/chats returns project chats",
"GET /api/chats/:id returns single chat",
"DELETE /api/chats/:id deletes chat",
"Chats scoped to project",
"Chat title auto-generated from first message"
],
"deliverables": [
"src/app/api/projects/[id]/chats/route.ts",
"src/app/api/chats/[id]/route.ts",
"src/services/chat.service.ts",
"src/lib/db/schema.ts (chats table)"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase2-core-features-08",
"seq": "08",
"title": "Create message APIs with streaming",
"status": "pending",
"depends_on": ["07"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md"
],
"acceptance_criteria": [
"POST /api/chats/:id/messages creates user message",
"GET /api/chats/:id/messages returns chat messages",
"Message streaming endpoint returns chunks",
"Messages stored with metadata (tokens, tool calls)",
"Message order preserved by timestamp",
"Streaming handles connection errors"
],
"deliverables": [
"src/app/api/chats/[id]/messages/route.ts",
"src/app/api/chats/[id]/messages/stream/route.ts",
"src/services/message.service.ts",
"src/lib/db/schema.ts (messages table)"
]
}

View File

@@ -0,0 +1,29 @@
{
"id": "phase2-core-features-09",
"seq": "09",
"title": "Create chat UI components",
"status": "pending",
"depends_on": ["07", "08"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Chat interface displays message list",
"Message input supports multiline text",
"User and assistant messages styled differently",
"Chat history sidebar shows all chats",
"New chat button creates fresh conversation",
"Chat deletion requires confirmation",
"Auto-scroll to latest message"
],
"deliverables": [
"src/app/dashboard/projects/[id]/chat/page.tsx",
"src/components/chat/ChatInterface.tsx",
"src/components/chat/MessageList.tsx",
"src/components/chat/MessageItem.tsx",
"src/components/chat/MessageInput.tsx",
"src/components/chat/ChatSidebar.tsx",
"src/components/chat/ChatHistory.tsx"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase2-core-features-10",
"seq": "10",
"title": "Implement real-time chat updates",
"status": "pending",
"depends_on": ["08", "09"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Real-time message streaming works",
"Typing indicators display for AI responses",
"Connection status shown (connected/disconnected)",
"Reconnection logic handles disconnects",
"Message updates reflect in real-time",
"Streaming errors handled gracefully"
],
"deliverables": [
"src/lib/websocket/chat-socket.ts",
"src/components/chat/StreamingMessage.tsx",
"src/components/chat/TypingIndicator.tsx",
"src/components/chat/ConnectionStatus.tsx",
"src/hooks/useChatStream.ts"
]
}

View File

@@ -0,0 +1,29 @@
{
"id": "phase2-core-features-11",
"seq": "11",
"title": "Create AI provider configuration",
"status": "pending",
"depends_on": [],
"parallel": true,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md"
],
"acceptance_criteria": [
"AI provider interfaces defined",
"OpenAI provider configured",
"Anthropic provider configured",
"Google provider configured",
"Custom provider support added",
"Provider selection works correctly",
"API key management per provider"
],
"deliverables": [
"src/lib/ai/providers/index.ts",
"src/lib/ai/providers/openai.ts",
"src/lib/ai/providers/anthropic.ts",
"src/lib/ai/providers/google.ts",
"src/lib/ai/providers/types.ts",
"src/lib/db/schema.ts (ai_providers, ai_models tables)"
]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase2-core-features-12",
"seq": "12",
"title": "Create AI service with streaming",
"status": "pending",
"depends_on": ["11"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"AI client factory creates provider clients",
"Message streaming implemented",
"Tool calls handled correctly",
"Context window managed properly",
"Token counting works",
"Streaming errors handled",
"Rate limiting applied"
],
"deliverables": [
"src/services/ai.service.ts",
"src/lib/ai/client-factory.ts",
"src/lib/ai/stream-handler.ts",
"src/lib/ai/token-counter.ts",
"src/lib/ai/context-manager.ts"
]
}

View File

@@ -0,0 +1,29 @@
{
"id": "phase2-core-features-13",
"seq": "13",
"title": "Create AI model management APIs and UI",
"status": "pending",
"depends_on": ["11"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"GET /api/ai/models returns available models",
"GET /api/ai/providers returns configured providers",
"User API key management works",
"Model selection UI displays options",
"API key input validates format",
"Keys encrypted in database",
"Active provider shown in UI"
],
"deliverables": [
"src/app/api/ai/models/route.ts",
"src/app/api/ai/providers/route.ts",
"src/app/api/ai/keys/route.ts",
"src/components/ai/ModelSelector.tsx",
"src/components/ai/ApiKeyManager.tsx",
"src/services/ai-key.service.ts",
"src/lib/db/schema.ts (user_api_keys table)"
]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase2-core-features-14",
"seq": "14",
"title": "Implement AI code generation",
"status": "pending",
"depends_on": ["12", "13"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Code generation prompts defined",
"Generated code parsed correctly",
"File operations handled (create/update)",
"Code validation runs before applying",
"Syntax errors caught and reported",
"Code formatting applied",
"Generation history tracked"
],
"deliverables": [
"src/lib/ai/prompts/code-generation.ts",
"src/lib/ai/code-parser.ts",
"src/lib/ai/code-validator.ts",
"src/services/code-generation.service.ts",
"src/components/ai/CodeGenerationPanel.tsx"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase2-core-features-15",
"seq": "15",
"title": "Integrate Monaco Editor",
"status": "pending",
"depends_on": [],
"parallel": true,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"@monaco-editor/react installed",
"Monaco Editor configured",
"Syntax highlighting works for multiple languages",
"Auto-completion enabled",
"Theme customization works",
"Editor resizes correctly",
"Keyboard shortcuts functional"
],
"deliverables": [
"src/components/editor/MonacoEditor.tsx",
"src/lib/monaco/config.ts",
"src/lib/monaco/themes.ts",
"src/lib/monaco/languages.ts"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase2-core-features-16",
"seq": "16",
"title": "Create file management APIs",
"status": "pending",
"depends_on": ["04"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"GET /api/projects/:id/files returns file tree",
"GET /api/projects/:id/files/* returns file content",
"PUT /api/projects/:id/files/* creates/updates file",
"DELETE /api/projects/:id/files/* deletes file",
"File paths validated",
"File size limits enforced",
"Binary files handled correctly"
],
"deliverables": [
"src/app/api/projects/[id]/files/route.ts",
"src/app/api/projects/[id]/files/[...path]/route.ts",
"src/services/file.service.ts",
"src/lib/storage/file-storage.ts"
]
}

View File

@@ -0,0 +1,29 @@
{
"id": "phase2-core-features-17",
"seq": "17",
"title": "Create file management UI",
"status": "pending",
"depends_on": ["15", "16"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"File tree displays project structure",
"File editor opens selected file",
"File creation dialog works",
"File deletion requires confirmation",
"File search filters results",
"File tabs allow switching between files",
"Unsaved changes indicator shown"
],
"deliverables": [
"src/app/dashboard/projects/[id]/editor/page.tsx",
"src/components/editor/FileTree.tsx",
"src/components/editor/FileEditor.tsx",
"src/components/editor/FileTabs.tsx",
"src/components/editor/CreateFileDialog.tsx",
"src/components/editor/FileSearch.tsx",
"src/hooks/useFileOperations.ts"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase2-core-features-18",
"seq": "18",
"title": "Implement file operations",
"status": "pending",
"depends_on": ["16", "17"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Create file operation works",
"Update file operation saves changes",
"Delete file operation removes file",
"Rename file operation updates path",
"Move file operation changes location",
"Operations validate permissions",
"Error messages displayed clearly"
],
"deliverables": [
"src/services/file-operations.service.ts",
"src/components/editor/RenameFileDialog.tsx",
"src/components/editor/MoveFileDialog.tsx",
"src/hooks/useFileOperations.ts (updated)"
]
}

View File

@@ -0,0 +1,24 @@
{
"id": "phase2-core-features-19",
"seq": "19",
"title": "Create preview API",
"status": "pending",
"depends_on": ["04"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"GET /api/projects/:id/preview returns preview URL",
"Preview URL generated correctly",
"Preview updates trigger refresh",
"Preview authentication handled",
"Preview timeout configured",
"Error responses returned properly"
],
"deliverables": [
"src/app/api/projects/[id]/preview/route.ts",
"src/services/preview.service.ts",
"src/lib/preview/url-generator.ts"
]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase2-core-features-20",
"seq": "20",
"title": "Create preview UI components",
"status": "pending",
"depends_on": ["19"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Preview iframe displays project",
"Responsive device toggle works (desktop/tablet/mobile)",
"Refresh button reloads preview",
"Open in new tab button works",
"Loading state shown during load",
"Error state displayed on failure",
"Preview URL displayed"
],
"deliverables": [
"src/app/dashboard/projects/[id]/preview/page.tsx",
"src/components/preview/PreviewFrame.tsx",
"src/components/preview/DeviceToggle.tsx",
"src/components/preview/PreviewControls.tsx",
"src/components/preview/PreviewUrl.tsx"
]
}

View File

@@ -0,0 +1,27 @@
{
"id": "phase2-core-features-21",
"seq": "21",
"title": "Implement live preview with auto-refresh",
"status": "pending",
"depends_on": ["18", "20"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Auto-refresh triggers on file save",
"Hot module replacement works",
"Debounce prevents excessive refreshes",
"Manual refresh available",
"Refresh status indicator shown",
"Build errors displayed in preview",
"Connection errors handled gracefully"
],
"deliverables": [
"src/lib/preview/hot-reload.ts",
"src/lib/preview/debounce.ts",
"src/components/preview/LivePreview.tsx",
"src/components/preview/RefreshIndicator.tsx",
"src/hooks/useLivePreview.ts"
]
}

View File

@@ -0,0 +1,28 @@
{
"id": "phase2-core-features-22",
"seq": "22",
"title": "Create version control APIs",
"status": "pending",
"depends_on": ["04"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md"
],
"acceptance_criteria": [
"POST /api/projects/:id/versions creates version",
"GET /api/projects/:id/versions returns version history",
"GET /api/versions/:id returns version details",
"POST /api/versions/:id/rollback restores version",
"Version numbers auto-incremented",
"Current version flag managed",
"Rollback creates new version"
],
"deliverables": [
"src/app/api/projects/[id]/versions/route.ts",
"src/app/api/versions/[id]/route.ts",
"src/app/api/versions/[id]/rollback/route.ts",
"src/services/version.service.ts",
"src/lib/db/schema.ts (project_versions table)"
]
}

View File

@@ -0,0 +1,28 @@
{
"id": "phase2-core-features-23",
"seq": "23",
"title": "Create version control UI",
"status": "pending",
"depends_on": ["22"],
"parallel": false,
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md"
],
"acceptance_criteria": [
"Version history list displays all versions",
"Version comparison shows differences",
"Rollback confirmation dialog works",
"Version tags displayed",
"Current version highlighted",
"Version details shown on click",
"Rollback creates new version entry"
],
"deliverables": [
"src/app/dashboard/projects/[id]/versions/page.tsx",
"src/components/versions/VersionList.tsx",
"src/components/versions/VersionComparison.tsx",
"src/components/versions/RollbackDialog.tsx",
"src/components/versions/VersionDetails.tsx",
"src/components/versions/VersionTag.tsx"
]
}

View File

@@ -0,0 +1,26 @@
{
"id": "phase2-core-features",
"name": "Phase 2: Core Features",
"status": "active",
"objective": "Implement core features including organization management, project management, chat interface, AI integration, code editor, preview system, and version control",
"context_files": [
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/.tmp/sessions/phase1-foundation/context.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/SPECIFICATION.md",
"/Users/kunthawatgreethong/Gitea/moreminimore-vibe/Websitebuilder/TASKS.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/standards/code-quality.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/standards/test-coverage.md",
"/Users/kunthawatgreethong/.config/opencode/context/core/essential-patterns.md"
],
"exit_criteria": [
"Organization CRUD APIs and UI fully functional",
"Project CRUD APIs and UI with template system",
"Chat interface with real-time message streaming",
"AI integration with multiple providers and code generation",
"Monaco editor integrated with file management",
"Live preview system with auto-refresh",
"Version control with rollback functionality"
],
"subtask_count": 23,
"completed_count": 0,
"created_at": "2026-01-22T00:00:00Z"
}