107 lines
2.1 KiB
Markdown
107 lines
2.1 KiB
Markdown
# TimeTrack MVP
|
|
|
|
Minimal vertical slice for task management using:
|
|
|
|
- React + TypeScript + Tailwind CSS
|
|
- Java + Quarkus
|
|
- PostgreSQL
|
|
- Keycloak prepared for future authentication
|
|
|
|
## Structure
|
|
|
|
- `frontend/`: Vite React app with task list, task creation, and status updates
|
|
- `backend/`: Quarkus API with a simple Clean Architecture split
|
|
- `docker-compose.yml`: local PostgreSQL and Keycloak services
|
|
|
|
## Run infrastructure
|
|
|
|
Start PostgreSQL and Keycloak:
|
|
|
|
```bash
|
|
docker-compose up
|
|
```
|
|
|
|
Services:
|
|
|
|
- PostgreSQL: `localhost:5432`
|
|
- Keycloak: `http://localhost:8081`
|
|
- Keycloak admin: `admin` / `admin`
|
|
|
|
## Run the backend
|
|
|
|
The backend uses the Maven wrapper generated by Quarkus.
|
|
|
|
```bash
|
|
cd backend
|
|
./mvnw quarkus:dev
|
|
```
|
|
|
|
Default database settings point to the local Docker PostgreSQL instance, including in the `dev` profile:
|
|
|
|
- database: `beetask`
|
|
- user: `beetask`
|
|
- password: `beetask`
|
|
- JDBC URL: `jdbc:postgresql://localhost:5432/beetask`
|
|
|
|
If needed, you can override them with:
|
|
|
|
- `DB_URL`
|
|
- `DB_USER`
|
|
- `DB_PASSWORD`
|
|
|
|
Main API endpoints:
|
|
|
|
- `POST /tasks`
|
|
- `PATCH /tasks/{id}/status`
|
|
- `GET /tasks`
|
|
|
|
Example create request:
|
|
|
|
```bash
|
|
curl -X POST http://localhost:8080/tasks \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"name":"Prepare sprint review","description":"Collect release notes"}'
|
|
```
|
|
|
|
## Run the frontend
|
|
|
|
```bash
|
|
cd frontend
|
|
npm install
|
|
npm run dev
|
|
```
|
|
|
|
The Vite dev server runs on `http://localhost:5173` and proxies `/api/*` to the backend on `http://localhost:8080`.
|
|
|
|
If needed, you can override the API target with `VITE_API_URL`.
|
|
|
|
## Architecture notes
|
|
|
|
The backend keeps the vertical slice intentionally small:
|
|
|
|
- `domain`: task entity and status enum
|
|
- `application`: use cases and repository port
|
|
- `adapter/in`: REST API
|
|
- `adapter/out`: PostgreSQL persistence with Panache
|
|
|
|
Important pragmatic decisions:
|
|
|
|
- UUIDs are generated in the application layer to keep the slice simple.
|
|
- Flyway owns schema creation with a single migration.
|
|
- Keycloak is available locally now but not integrated into the app yet.
|
|
|
|
## Verification
|
|
|
|
Backend:
|
|
|
|
```bash
|
|
cd backend
|
|
./mvnw test
|
|
```
|
|
|
|
Frontend:
|
|
|
|
```bash
|
|
cd frontend
|
|
npm run build
|
|
```
|