Commit Graph

12 Commits

Author SHA1 Message Date
40cd0e35bf Implement Phase 3 usage statistics API
- Add GET /api/admin/stats/overview (user counts, login stats)
- Add GET /api/admin/stats/active-users (time series with period toggle)
- Add GET /api/admin/stats/actions (action breakdown with date filter)
- Add GET /api/admin/stats/peak-times (hourly/daily averages)
- Implement 5-minute in-memory caching for expensive aggregations
- All 57 Phase 3 tests passing
2026-01-22 13:10:33 -07:00
c23afdf0b7 Implement Phase 2 activity monitoring API
- Add GET /api/admin/activity with pagination and filters
- Add GET /api/admin/users/:id/activity for user-specific history
- Add GET /api/admin/activity/export for CSV export
- Implement $lookup aggregation for user info (name, email)
- Add date range filtering with validation
- Export limited to 10,000 records with truncation headers
- All 50 Phase 2 tests passing
2026-01-22 13:01:48 -07:00
dbd8d81668 Implement Phase 1 admin dashboard backend
- Add database indexes for admin queries (role, isActive+role, createdAt, lastLoginAt)
- Update setUserActive to track disabledAt and disabledBy fields
- Add getPaginatedUsers function with search, filter, sort support
- Add updateUserRole function for promoting/demoting users
- Create admin routes with full user management API:
  - GET /api/admin/users - paginated list with search/filter/sort
  - GET /api/admin/users/:id - user details with recent activity
  - PATCH /api/admin/users/:id - enable/disable users
  - PATCH /api/admin/users/:id/role - promote/demote users
- Add validation for ObjectId format and self-modification prevention
- All 53 Phase 1 backend tests passing
2026-01-22 12:01:52 -07:00
39bd9b1e71 Add Jest test infrastructure for admin dashboard TDD
- Configure Jest with mongodb-memory-server for isolated testing
- Add phase 1-4 test suites covering all admin requirements
- Add test helpers and setup/teardown utilities
- Install jest, supertest, mongodb-memory-server dependencies
2026-01-22 11:57:49 -07:00
d6e56a6e40 Add AUTH.md documenting authentication implementation
Some checks failed
Deploy Apartment API / deploy (push) Failing after 1s
- Document completed Google OAuth authentication system
- Include implementation details, security measures, and troubleshooting
- Track future enhancements (admin dashboard, Apple Sign-In, partial public access)
2026-01-22 08:26:17 -07:00
ef4ddc0de0 Add Google OAuth authentication system (#4)
Some checks failed
Deploy Apartment API / deploy (push) Failing after 1s
Co-authored-by: Stephen Minakian <stephenminakian@gmail.com>
Co-committed-by: Stephen Minakian <stephenminakian@gmail.com>
2026-01-21 19:15:22 -07:00
04a78a21cc Add soonest field to available-units endpoint (#3)
Some checks failed
Deploy Apartment API / deploy (push) Failing after 1s
Co-authored-by: Stephen Minakian <stephenminakian@gmail.com>
Co-committed-by: Stephen Minakian <stephenminakian@gmail.com>
2026-01-21 12:04:26 -07:00
34ebace4de expanded-api (#2)
Some checks failed
Deploy Apartment API / deploy (push) Failing after 1s
Reviewed-on: #2
Co-authored-by: Stephen Minakian <stephenminakian@gmail.com>
Co-committed-by: Stephen Minakian <stephenminakian@gmail.com>
2026-01-21 10:18:46 -07:00
49bd77bec6 Try to rebuild and deploy
All checks were successful
Deploy Apartment API / deploy (push) Successful in 9m49s
2025-07-15 22:02:16 -06:00
4833f55b29 Remove health check
All checks were successful
Deploy Apartment API / deploy (push) Successful in 9m41s
2025-07-15 20:47:34 -06:00
4c3b63c4bf Added priority to traefik tag
All checks were successful
Deploy Apartment API / deploy (push) Successful in 9m44s
2025-07-15 20:36:12 -06:00
9153a2faf8 Initial commit
All checks were successful
Deploy Apartment API / deploy (push) Successful in 9m48s
2025-07-15 17:51:26 -06:00