feat: add Projects management feature with full CRUD#472
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
feat: add Projects management feature with full CRUD#472devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
- Add projects table with name, description, client_id, start_date, status - Create REST API endpoints (GET, POST, PUT, DELETE) with auth and validation - Add Joi validation schemas for create and update operations - Write comprehensive backend tests (30+ test cases) - Create ProjectsPage frontend component with table and CRUD dialog - Add project types, API client methods, routing, and navigation
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:
|
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 new "Projects" resource to the app with full create/read/update/delete support across backend and frontend.
Backend:
projectstable (name, description, client_id FK, start_date, status with CHECK constraint for active/completed/on-hold, user_email FK, timestamps) with indexesprojectSchema) and update (updateProjectSchema)/api/projects— all user-scoped, with LEFT JOIN to includeclient_name, and client ownership validation when assigning a clientFrontend:
Project,CreateProjectRequest,UpdateProjectRequestTypeScript interfacesProjectsPagecomponent with table view, create/edit dialog (name, client dropdown, date picker, status select, description), and delete with confirmation/projects, navigation item added to sidebarReview & Testing Checklist for Human
/api/projects/:id(backend/src/routes/projects.js): The update route dynamically builds SET clauses and a params array based on which fields are provided. Verify no off-by-one or missing field mapping bugs, especially forclientId → client_idandstartDate → start_datefield name translations.0as a sentinel for "no client" in the Select, converting tonullbefore API calls. Backend checksif (clientId)to decide whether to validate client ownership. Confirm this handles explicit unassignment (setting clientId to null on an existing project) correctly.toISOString().split('T')[0]which uses UTC. A user in a negative UTC offset picking a date could see it shift back one day. Verify this is acceptable or if local date formatting is preferred./projects, and exercise the full CRUD flow — create a project with and without a client, edit status/name/dates, delete. Verify the table updates correctly after each mutation.CREATE TABLE IF NOT EXISTSininit.jsworks for in-memory SQLite (recreated on restart) but won't affect already-existing persistent databases. Confirm this matches the deployment model.Notes
CreateProjectRequestandUpdateProjectRequesttypes are defined intypes/api.tsbut the API client methods use inline type annotations instead of referencing these interfaces — minor consistency gap, no functional impact.SET NULLon associated projects'client_id(FK constraint). This is intentional but worth being aware of.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/fed3787d437b460680227291e4790f38