feat: add Projects management feature (CRUD API + UI)#770
Open
devin-ai-integration[bot] wants to merge 4 commits into
Open
feat: add Projects management feature (CRUD API + UI)#770devin-ai-integration[bot] wants to merge 4 commits into
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
- Add projects table to database schema (name, description, client_id, start_date, status with active/completed/on-hold) - Add Joi validation schemas for project creation and updates - Add /api/projects CRUD endpoints following existing patterns - Register project routes in Express server - Add 24 unit tests for all project endpoints - Add Project TypeScript interfaces and API client methods - Add ProjectsPage with table view, create/edit dialog, status chips - Add Projects navigation item to sidebar layout
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…/await - Extract findAll, findOne, runQuery, buildUpdateQuery into database/helpers.js - Rewrite projects route with async/await (structurally distinct from callback-based clients route) - Rewrite tests to mock the helper module instead of raw sqlite3 callbacks - Reduces new code duplication for SonarCloud quality gate compliance
- Validate clientId belongs to authenticated user in POST/PUT routes - Return 400 if referenced client does not belong to user - Fix description clearing: use null for updates so backend receives the field - Add 2 tests for client ownership validation (POST and PUT)
Joi.date().iso() converts input to a Date object which SQLite stores as epoch milliseconds. Using Joi.string().isoDate() keeps the value as a YYYY-MM-DD string throughout the pipeline, so the frontend date input works correctly when editing projects.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds a full "Projects" management feature — backend API, validation, tests, and a React frontend page — following the existing
clientspatterns.Data model — new
projectstable with columns:name,description,client_id(FK → clients, ON DELETE SET NULL),start_date,status(enum:active/completed/on-hold), scoped peruser_email.Backend (
/api/projects):GET /,GET /:id,POST /,PUT /:id,DELETE /:idprojectSchema,updateProjectSchema) for input validationclientsto includeclient_namein responsesFrontend:
ProjectsPagewith table view, status<Chip>colors, and create/edit<Dialog>/projects) and sidebar nav (FolderOpenIcon)apiClientclass + TypeScript interfaces (Project,CreateProjectRequest,UpdateProjectRequest)Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/1ee4ae60605148ddb796e9dc8db1385a
Requested by: @bsmitches