Merged
Conversation
…odule - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles
… role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member)
- Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation
- Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date
…h pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty
exploitenomah
added a commit
that referenced
this pull request
Mar 9, 2026
* test(auth): add signup validation tests (missing fields, invalid email, no password) * refactor: update folder structure to use modules * feat: Create signup API for organization owner * refactor: Update user model to accept firstName & lastName * refactor: Update organization to be uniquely identified by slug * feat: Add catch all not found route handler * refactor: Update error handler to provide stack in development * feat: Improve error handling by providing details * Update .gitignore * docs: Update README, Create documentation process * docs: Update signup documentation * chore: setup env validation with zod * chore: setup env validation with zod * chore: setup env validation with zod * chore: restructure test directory * test: Write unit tests for email verification * chore: install zeptomail library * chore: add script for unit testing * chore: add new paths to config * chore: add new env variables * chore: create type declaration for zeptomail * chore: increase timeout for test hooks * feat: add feature to send emailverification code * feat: add verify-email endpoint * test: integration tests for email verification * refactor: updates to email verification to ensure tests pass * test: resend verification email tests * feat: add resend email verification endpoint * fix: call toBeFalsy method to ensure check runs * refactor: replace try/catch with routeTryCatcher helper * refactor: replace try/catch with routeTryCatcher helper * refactor: create clearVerificationEmailData method on user * chore: remove redundant comment * Create node.js.yml * chore: update ci script * Create PULL_REQUEST_TEMPLATE.md * chore: update folder structure * Husky Setup (#5) * chore: fix linting errors * chore: husky pre-commit setup * Login and Refresh token feature (#7) * feat: create login endpoint * tests: fix failing tests * refactor: auth utils refactoring * fix: documentation setup * feat: create get /me route * feat: create get /me route * feat: create tests and logout route * Feature/Change-Password (#9) - Create shared test helpers for auth tests (testHelpers.ts) - Extract common test constants (verifiedUserEmail, testPassword, etc.) - Extract createSignedAccessTokenCookie function to shared helpers - Update all auth integration tests to use shared helpers - Add reusable passwordSchema with conventional password rules: - Minimum 8 characters - At least one uppercase letter - At least one lowercase letter - At least one number - At least one special character - Update signupSchema and changePasswordSchema to use passwordSchema * feat: implement forgot password and reset password features (#11) - Add forgot password endpoint (POST /api/v1/auth/forgot-password) - Add reset password endpoint (POST /api/v1/auth/reset-password) - Extract email template keys to environment variables - Create reusable emailSchema for DRY validation - Add password reset fields and methods to user model - Refactor code generation to use shared helper function - Add comprehensive integration tests for forgot/reset password - Add unit tests for password reset code logic - Fix verify email unit test to properly test clearing - Update user model pre-save hooks to handle null values correctly * Simplify signup to remove organization creation (#13) - Remove organization creation logic from signup flow - Simplify signup schema to only require user fields - Rename signupOwner to signup for clarity - Remove organization-related fields from signup input/output - Update tests to remove organization-related test cases - Clean up verifyEmail tests to remove unused organization fields - Update API documentation to reflect simplified signup * Feature/organization endpoints (#15) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Feature/organization endpoints (#17) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Feature/organization endpoints (#19) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Update render.yaml * Install pino pretty as a dep
exploitenomah
added a commit
that referenced
this pull request
Mar 9, 2026
* test(auth): add signup validation tests (missing fields, invalid email, no password) * refactor: update folder structure to use modules * feat: Create signup API for organization owner * refactor: Update user model to accept firstName & lastName * refactor: Update organization to be uniquely identified by slug * feat: Add catch all not found route handler * refactor: Update error handler to provide stack in development * feat: Improve error handling by providing details * Update .gitignore * docs: Update README, Create documentation process * docs: Update signup documentation * chore: setup env validation with zod * chore: setup env validation with zod * chore: setup env validation with zod * chore: restructure test directory * test: Write unit tests for email verification * chore: install zeptomail library * chore: add script for unit testing * chore: add new paths to config * chore: add new env variables * chore: create type declaration for zeptomail * chore: increase timeout for test hooks * feat: add feature to send emailverification code * feat: add verify-email endpoint * test: integration tests for email verification * refactor: updates to email verification to ensure tests pass * test: resend verification email tests * feat: add resend email verification endpoint * fix: call toBeFalsy method to ensure check runs * refactor: replace try/catch with routeTryCatcher helper * refactor: replace try/catch with routeTryCatcher helper * refactor: create clearVerificationEmailData method on user * chore: remove redundant comment * Create node.js.yml * chore: update ci script * Create PULL_REQUEST_TEMPLATE.md * chore: update folder structure * Husky Setup (#5) * chore: fix linting errors * chore: husky pre-commit setup * Login and Refresh token feature (#7) * feat: create login endpoint * tests: fix failing tests * refactor: auth utils refactoring * fix: documentation setup * feat: create get /me route * feat: create get /me route * feat: create tests and logout route * Feature/Change-Password (#9) - Create shared test helpers for auth tests (testHelpers.ts) - Extract common test constants (verifiedUserEmail, testPassword, etc.) - Extract createSignedAccessTokenCookie function to shared helpers - Update all auth integration tests to use shared helpers - Add reusable passwordSchema with conventional password rules: - Minimum 8 characters - At least one uppercase letter - At least one lowercase letter - At least one number - At least one special character - Update signupSchema and changePasswordSchema to use passwordSchema * feat: implement forgot password and reset password features (#11) - Add forgot password endpoint (POST /api/v1/auth/forgot-password) - Add reset password endpoint (POST /api/v1/auth/reset-password) - Extract email template keys to environment variables - Create reusable emailSchema for DRY validation - Add password reset fields and methods to user model - Refactor code generation to use shared helper function - Add comprehensive integration tests for forgot/reset password - Add unit tests for password reset code logic - Fix verify email unit test to properly test clearing - Update user model pre-save hooks to handle null values correctly * Simplify signup to remove organization creation (#13) - Remove organization creation logic from signup flow - Simplify signup schema to only require user fields - Rename signupOwner to signup for clarity - Remove organization-related fields from signup input/output - Update tests to remove organization-related test cases - Clean up verifyEmail tests to remove unused organization fields - Update API documentation to reflect simplified signup * Feature/organization endpoints (#15) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Feature/organization endpoints (#17) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Feature/organization endpoints (#19) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Update render.yaml * Install pino pretty as a dep * Remove pino pretty from dev deps
exploitenomah
added a commit
that referenced
this pull request
Mar 9, 2026
* test(auth): add signup validation tests (missing fields, invalid email, no password) * refactor: update folder structure to use modules * feat: Create signup API for organization owner * refactor: Update user model to accept firstName & lastName * refactor: Update organization to be uniquely identified by slug * feat: Add catch all not found route handler * refactor: Update error handler to provide stack in development * feat: Improve error handling by providing details * Update .gitignore * docs: Update README, Create documentation process * docs: Update signup documentation * chore: setup env validation with zod * chore: setup env validation with zod * chore: setup env validation with zod * chore: restructure test directory * test: Write unit tests for email verification * chore: install zeptomail library * chore: add script for unit testing * chore: add new paths to config * chore: add new env variables * chore: create type declaration for zeptomail * chore: increase timeout for test hooks * feat: add feature to send emailverification code * feat: add verify-email endpoint * test: integration tests for email verification * refactor: updates to email verification to ensure tests pass * test: resend verification email tests * feat: add resend email verification endpoint * fix: call toBeFalsy method to ensure check runs * refactor: replace try/catch with routeTryCatcher helper * refactor: replace try/catch with routeTryCatcher helper * refactor: create clearVerificationEmailData method on user * chore: remove redundant comment * Create node.js.yml * chore: update ci script * Create PULL_REQUEST_TEMPLATE.md * chore: update folder structure * Husky Setup (#5) * chore: fix linting errors * chore: husky pre-commit setup * Login and Refresh token feature (#7) * feat: create login endpoint * tests: fix failing tests * refactor: auth utils refactoring * fix: documentation setup * feat: create get /me route * feat: create get /me route * feat: create tests and logout route * Feature/Change-Password (#9) - Create shared test helpers for auth tests (testHelpers.ts) - Extract common test constants (verifiedUserEmail, testPassword, etc.) - Extract createSignedAccessTokenCookie function to shared helpers - Update all auth integration tests to use shared helpers - Add reusable passwordSchema with conventional password rules: - Minimum 8 characters - At least one uppercase letter - At least one lowercase letter - At least one number - At least one special character - Update signupSchema and changePasswordSchema to use passwordSchema * feat: implement forgot password and reset password features (#11) - Add forgot password endpoint (POST /api/v1/auth/forgot-password) - Add reset password endpoint (POST /api/v1/auth/reset-password) - Extract email template keys to environment variables - Create reusable emailSchema for DRY validation - Add password reset fields and methods to user model - Refactor code generation to use shared helper function - Add comprehensive integration tests for forgot/reset password - Add unit tests for password reset code logic - Fix verify email unit test to properly test clearing - Update user model pre-save hooks to handle null values correctly * Simplify signup to remove organization creation (#13) - Remove organization creation logic from signup flow - Simplify signup schema to only require user fields - Rename signupOwner to signup for clarity - Remove organization-related fields from signup input/output - Update tests to remove organization-related test cases - Clean up verifyEmail tests to remove unused organization fields - Update API documentation to reflect simplified signup * Feature/organization endpoints (#15) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Feature/organization endpoints (#17) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Feature/organization endpoints (#19) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Update render.yaml * Install pino pretty as a dep * Remove pino pretty from dev deps * Feature/organization endpoints (#22) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Update render.yaml * Install pino pretty as a dep * Fix docs build error
exploitenomah
added a commit
that referenced
this pull request
Mar 14, 2026
* test(auth): add signup validation tests (missing fields, invalid email, no password) * refactor: update folder structure to use modules * feat: Create signup API for organization owner * refactor: Update user model to accept firstName & lastName * refactor: Update organization to be uniquely identified by slug * feat: Add catch all not found route handler * refactor: Update error handler to provide stack in development * feat: Improve error handling by providing details * Update .gitignore * docs: Update README, Create documentation process * docs: Update signup documentation * chore: setup env validation with zod * chore: setup env validation with zod * chore: setup env validation with zod * chore: restructure test directory * test: Write unit tests for email verification * chore: install zeptomail library * chore: add script for unit testing * chore: add new paths to config * chore: add new env variables * chore: create type declaration for zeptomail * chore: increase timeout for test hooks * feat: add feature to send emailverification code * feat: add verify-email endpoint * test: integration tests for email verification * refactor: updates to email verification to ensure tests pass * test: resend verification email tests * feat: add resend email verification endpoint * fix: call toBeFalsy method to ensure check runs * refactor: replace try/catch with routeTryCatcher helper * refactor: replace try/catch with routeTryCatcher helper * refactor: create clearVerificationEmailData method on user * chore: remove redundant comment * Create node.js.yml * chore: update ci script * Create PULL_REQUEST_TEMPLATE.md * chore: update folder structure * Husky Setup (#5) * chore: fix linting errors * chore: husky pre-commit setup * Login and Refresh token feature (#7) * feat: create login endpoint * tests: fix failing tests * refactor: auth utils refactoring * fix: documentation setup * feat: create get /me route * feat: create get /me route * feat: create tests and logout route * Feature/Change-Password (#9) - Create shared test helpers for auth tests (testHelpers.ts) - Extract common test constants (verifiedUserEmail, testPassword, etc.) - Extract createSignedAccessTokenCookie function to shared helpers - Update all auth integration tests to use shared helpers - Add reusable passwordSchema with conventional password rules: - Minimum 8 characters - At least one uppercase letter - At least one lowercase letter - At least one number - At least one special character - Update signupSchema and changePasswordSchema to use passwordSchema * feat: implement forgot password and reset password features (#11) - Add forgot password endpoint (POST /api/v1/auth/forgot-password) - Add reset password endpoint (POST /api/v1/auth/reset-password) - Extract email template keys to environment variables - Create reusable emailSchema for DRY validation - Add password reset fields and methods to user model - Refactor code generation to use shared helper function - Add comprehensive integration tests for forgot/reset password - Add unit tests for password reset code logic - Fix verify email unit test to properly test clearing - Update user model pre-save hooks to handle null values correctly * Simplify signup to remove organization creation (#13) - Remove organization creation logic from signup flow - Simplify signup schema to only require user fields - Rename signupOwner to signup for clarity - Remove organization-related fields from signup input/output - Update tests to remove organization-related test cases - Clean up verifyEmail tests to remove unused organization fields - Update API documentation to reflect simplified signup * Feature/organization endpoints (#15) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Feature/organization endpoints (#17) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Feature/organization endpoints (#19) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Update render.yaml * Install pino pretty as a dep * Remove pino pretty from dev deps * Feature/organization endpoints (#22) * feat(org): implement organization creation endpoint with membership module - Add POST /api/v1/org endpoint to create organizations - Create separate membership module with model, service, controller, routes, and docs - Create OWNER membership automatically when organization is created - Add comprehensive integration tests for organization creation - Fix unit tests for email verification and password reset (add save() calls for pre-save hooks) - Update organization service to use membership service - Follow existing codebase patterns and DRY principles * feat(org): add GET /org endpoint to retrieve organization with caller role - Add GET /api/v1/org endpoint that returns organization and user's role - Add getMembershipByUserAndOrg service method - Add getOrganizationWithUserRole service method - Update validateResource middleware to support query parameter validation - Remove console.log from resetPassword unit test - Add proper error handling (404 for not found, 403 for not a member) * feat(org): enforce one organization per user and simplify GET endpoint - Update POST /org to return 409 if user already has an organization - Simplify GET /org to automatically retrieve user's organization (no orgId needed) - Add getUserOrganization service method - Add AppError.conflict() for 409 status code - Update all tests to reflect one organization per user constraint - Refactor getOrganization tests to use separate describe blocks - Update API documentation * feat(org): add GET /org/members endpoint for OWNER/ADMIN - Add requireRole middleware for role-based access control - Implement getOrganizationMembers service method - Add getOrganizationMembers controller handler - Add GET /org/members route protected by OWNER/ADMIN roles - Add OrganizationMember and GetOrganizationMembersOutput types - Update API documentation - Add comprehensive integration tests (13 tests) - Update membership service to populate user data and sort by creation date * refactor * create accept invite endpoint * feat: add security middleware (helmet, rate-limit), cors config and integration tests * feat: implement time entry module, standardize ID mapping, and strengthen type safety * feat: add Phase 4 - Docker, Render config, and structured logging with pino - Add Dockerfile (multi-stage build) and docker-compose.yml (API + MongoDB) - Add .dockerignore and render.yaml (Render IaC blueprint) - Replace console.log/error with pino structured logging - Replace morgan with pino-http for HTTP request logging - Add server-side error logging in errorHandler - Remove debug console.log in membership.service - Uninstall morgan, install pino/pino-http/pino-pretty * ci: optimize CI to run affected tests on PRs and full suite on push * Update render.yaml * Install pino pretty as a dep * Fix docs build error * Add user first name and last name to me route output * Add user first name and last name to me route output
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.
No description provided.