Skip to content

feat(projects): multi-step project creation wizard - #249

Merged
07prajwal2000 merged 1 commit into
Fluxify-rest:mainfrom
07prajwal2000:feature/project-creation-wizard
Aug 14, 2026
Merged

feat(projects): multi-step project creation wizard#249
07prajwal2000 merged 1 commit into
Fluxify-rest:mainfrom
07prajwal2000:feature/project-creation-wizard

Conversation

@07prajwal2000

Copy link
Copy Markdown
Collaborator

What

Replaces the single-field "new project" modal with a dedicated 3-step wizard, and extends the create endpoint to accept what the wizard collects.

Server — POST /v1/projects

  • Accepts { name, description?, members[], settings{} }. Members and settings are written inside the existing db.transaction alongside the insert — all three repository functions already took an optional tx, so this is atomic without new plumbing. A project that exists but is missing the access grants it was created with can only be repaired by a system admin, so partial creation isn't an acceptable state.
  • CREATE_TIME_SETTING_KEYS in create/dto.ts is the single source shared by the request schema and the wizard. Connection-id keys (AI agent, telemetry) are deliberately excluded — they need the live connection test that only settings/keys/upsert performs. Adding a future non-connection key is a one-line change there.

Server — bugs found on the way

  • Duplicate-name check never fired. create/service.ts imported checkProjectExist from routes/create/repository, whose signature is (id: string) and which matches eq(projectsEntity.id, id). It was querying id = <the project name>, always returned false, and the 409 was dead code — duplicate project names were silently allowed. The correct checkProjectExists(name) was sitting unused in projects/create/repository.ts. Now used, and covered by a test asserting it's called with the name.
  • varchar(50) vs zod. projects.name is varchar({ length: 50 }) but create/dto.ts allowed max(100) and update/dto.ts allowed max(255), so a 51+ character name passed validation and then failed at the DB. Both DTOs now cap at 50.
  • create/tests/create.spec.ts was a copy-pasted get-all stub (it("test 01", () => {})). Replaced with real tests.

Portal

  • New route /projects/new (_authed/projects.new.tsx), behind the same isSystemAdmin gate as the old modal. Three steps — basics, members, config — split this way so future config keys have a home rather than crowding the name field.
  • Members step is a two-column transfer panel: searchable available users on the left, chosen members on the right with a per-row role dropdown reusing ROLES from RoleSelector rather than retyping the three roles.
  • ProjectsTab loses the modal and navigates to the wizard.

Notes

  • No new DB columns and no migration. Future project metadata goes to the existing project-settings key/value table.
  • hidden is untouched — it's the live archive flag used by get-all and update, not something to set at creation.
  • All new styling uses design-system tokens. AGENT.md gains a rule documenting this, after a first pass copied literal hex from a neighbouring file.

Testing

  • bun run lint — clean across all 10 packages (also runs on pre-commit).
  • Server project tests: 19/19 pass. Portal tests: 71/71 pass.
  • vite build succeeds; routeTree.gen.ts picks up the new route (it's gitignored and generated at build time, so it doesn't appear in the diff).
  • Not yet manually clicked through in a running portal — worth a look at the wizard before merge, particularly the transfer panel.

🤖 Generated with Claude Code

Server:
- POST /v1/projects now accepts description, members[] and settings{},
  all written in the existing db.transaction so a project can never exist
  without the access grants it was created with.
- CREATE_TIME_SETTING_KEYS is the single source shared by the API schema
  and the wizard; connection-id keys stay out (they need integration wiring).
- Fix dead duplicate-name check: create/service used checkProjectExist(id)
  from routes/create, so it matched name against id and never fired.
- Fix name length: projects.name is varchar(50) but create/update DTOs
  allowed 100/255, so long names passed zod then died on the insert.
- Replace the copy-pasted get-all stub spec with real create tests.

Portal:
- New /projects/new wizard route (basics -> members -> config), behind the
  existing isSystemAdmin gate. Members step is a two-column transfer panel
  with a per-member role dropdown reusing ROLES from RoleSelector.
- Drop the single-field new-project modal from ProjectsTab.
- All styling uses design-system tokens; no hardcoded colors.

AGENT.md: document the never-hardcode-colors rule.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@07prajwal2000
07prajwal2000 added this pull request to the merge queue Aug 14, 2026
Merged via the queue into Fluxify-rest:main with commit 25db92b Aug 14, 2026
10 checks passed
@07prajwal2000
07prajwal2000 deleted the feature/project-creation-wizard branch August 14, 2026 16:46
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