docs: sync project documentation
This commit is contained in:
+12
-11
@@ -4,15 +4,16 @@ Items that were out of scope for the initial 6-hour build, with notes on how to
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
### User management UI
|
### User creation / deletion UI
|
||||||
Currently, users are seeded via Flyway (`V2__seed_demo_data.sql`). A `POST /api/users` endpoint
|
Users are seeded via Flyway (`V2__seed_demo_data.sql`) and the selected user's name/default rate can
|
||||||
with a "New User" form in the frontend would complete the CRUD cycle. Straightforward to add
|
be edited from the top bar. A `POST /api/users` endpoint with a "New User" form, plus optional delete
|
||||||
following the same pattern as project creation.
|
support, would complete the CRUD cycle. Straightforward to add following the same pattern as project
|
||||||
|
creation.
|
||||||
|
|
||||||
### Edit existing time entry (project-create form was shipped; entry edit is partially done)
|
### Time entry edit smoke coverage
|
||||||
The backend `PUT /api/time-entries/{id}` endpoint exists. The frontend `TimeEntryForm` handles
|
Editing existing time entries is implemented end-to-end (`PUT /api/time-entries/{id}`, `TimeEntryForm`
|
||||||
editing when `editEntry` is passed. Wire up the Edit button per entry row in `WeeklyView` —
|
edit mode, and the `WeeklyView` Edit button). Add explicit frontend and/or MockMvc smoke coverage for
|
||||||
already scaffolded, just needs end-to-end smoke-testing.
|
the edit path so regressions are caught.
|
||||||
|
|
||||||
### Notes / description field on time entries
|
### Notes / description field on time entries
|
||||||
Add a `TEXT` column to `time_entries` (new Flyway migration), expose it in the DTOs, and add a
|
Add a `TEXT` column to `time_entries` (new Flyway migration), expose it in the DTOs, and add a
|
||||||
@@ -31,9 +32,9 @@ Add a `GET /api/reports/weekly.csv?userId=&week=` and `/monthly.csv` endpoint th
|
|||||||
## Technical quality
|
## Technical quality
|
||||||
|
|
||||||
### Full backend test pyramid
|
### Full backend test pyramid
|
||||||
The current happy-path tests cover the repository date-range query, service cost/budget logic, and
|
The current tests cover the repository date-range query, service cost/budget logic, one end-to-end
|
||||||
one end-to-end MockMvc flow. Gaps to fill:
|
MockMvc flow, and a few validation cases for user/project updates. Gaps to fill:
|
||||||
- `@WebMvcTest` controller-slice tests for validation error responses (400 on invalid fields).
|
- Dedicated `@WebMvcTest` controller-slice tests for validation error responses (400 on invalid fields).
|
||||||
- More `@DataJpaTest` cases (zero entries, multiple users, rate fallback).
|
- More `@DataJpaTest` cases (zero entries, multiple users, rate fallback).
|
||||||
- `@SpringBootTest` with Testcontainers so tests do not depend on an externally-running PostgreSQL.
|
- `@SpringBootTest` with Testcontainers so tests do not depend on an externally-running PostgreSQL.
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ Docker Compose — Flyway for schema migrations — Tailwind CSS v4 — Biome 1.
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Daily time entries** — date, project, duration (entered as h:mm), automatic cost from hourly rate
|
- **Daily time entries** — date, project, duration (entered as h:mm), automatic cost from hourly rate; entries can be created, edited, and deleted
|
||||||
- **Weekly view** — navigate by ISO week; see total hours per day and a running week total
|
- **Weekly view** — navigate by ISO week; see total hours per day, individual entries, and a running week total
|
||||||
- **Monthly view** — per-project summary with time and cost progress bars; red banner when a budget is exceeded
|
- **Monthly view** — per-project summary with time and cost progress bars; red banner when a budget is exceeded
|
||||||
- **Project management** — create projects with time and cost budgets; set a project-level hourly rate or fall back to the user's default
|
- **Project management** — create and edit projects with time and cost budgets; set a project-level hourly rate or fall back to the user's default
|
||||||
- **Multi-user** — pick any seeded user from the dropdown; cost is calculated using that user's rate when no project rate is set
|
- **Multi-user** — pick any seeded user from the dropdown and edit that user's name/default rate; cost is calculated using that user's rate when no project rate is set
|
||||||
- **Soft budget enforcement** — entries always save; over-budget projects are highlighted with a warning banner and colored bars
|
- **Soft budget enforcement** — entries always save; over-budget projects are highlighted with a warning banner and colored bars
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
@@ -68,7 +68,8 @@ Without mise:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# one-time setup
|
# one-time setup
|
||||||
sudo apt install openjdk-21-jdk nodejs npm docker-compose-plugin
|
sudo apt install openjdk-21-jdk docker-compose-plugin
|
||||||
|
# Install Node 22 with your preferred Node version manager or distro-specific package.
|
||||||
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 # adjust if your JDK is elsewhere
|
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 # adjust if your JDK is elsewhere
|
||||||
npm --prefix frontend install
|
npm --prefix frontend install
|
||||||
cp -n .env.example .env
|
cp -n .env.example .env
|
||||||
@@ -99,7 +100,8 @@ for demo users and projects). Hibernate is set to `validate` — it never modifi
|
|||||||
|
|
||||||
**API shape** — aggregation is done server-side via two dedicated endpoints:
|
**API shape** — aggregation is done server-side via two dedicated endpoints:
|
||||||
`GET /api/reports/weekly?userId=&week=YYYY-Www` and `GET /api/reports/monthly?userId=&month=YYYY-MM`.
|
`GET /api/reports/weekly?userId=&week=YYYY-Www` and `GET /api/reports/monthly?userId=&month=YYYY-MM`.
|
||||||
All other CRUD endpoints follow standard REST conventions under `/api/`.
|
Resource endpoints live under `/api/`: users can be listed and updated, projects can be listed,
|
||||||
|
created, and updated, and time entries can be listed by date range, created, updated, and deleted.
|
||||||
|
|
||||||
## Environment
|
## Environment
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user