diff --git a/README.md b/README.md index 14ba5e7..7935e62 100644 --- a/README.md +++ b/README.md @@ -1,235 +1,343 @@ -

Worklog

+ +

Worklog

- Languages:
- Portuguese | - English + Track your daily work activities with automatic time tracking.
+ A full-stack portfolio project built with Spring Boot, Angular and PostgreSQL.

-Worklog is a **full-stack** application for daily activity tracking in software teams. It allows employees to register tasks by **Program, Team, Language, Activity, and Subactivity**, with automatic time tracking per activity. +

+ Live demo + CI + License: MIT +

-The system supports: +

+ Java 21 + Spring Boot + PostgreSQL + Flyway + Angular + TypeScript + Docker + GitHub Actions + Render + Vercel + Neon +

-- Starting a new activity and automatically closing the previous running one -- Finishing the day with a single action (`Save Day`) -- Daily history with durations and current running task highlight -- Centralized API error handling and frontend notifications +--- -## Project Motivation +## What is Worklog? -This project was built from a real operational need: improve daily work registration with a simple but consistent workflow for developers. +Worklog is a small web app where an employee records what they work on during the day. You pick a **Program, Team, Language, Activity and Subactivity**, press **New**, and the app starts a timer. When you start the next activity, the previous one is closed automatically. At the end of the day you press **Save Day**. -The goal was to keep the **UX clear** while maintaining strong backend business rules for: +It was built to show how I design and ship a complete application: a REST API with business rules, a relational database with migrations, a responsive Angular client, automated tests, CI and a live deployment. -- one open activity at a time -- one workday per employee per date -- explicit day finalization +## Try it online -## Current Features +| | Link | +|---|---| +| **App** | https://worklogtrack.vercel.app | +| **API documentation (Swagger)** | https://worklog-api-ndza.onrender.com/swagger-ui.html | +| **API health check** | https://worklog-api-ndza.onrender.com/health | -### Backend (Spring Boot + PostgreSQL) +**Good to know before you open it** -- REST API for worklog flow: - - `POST /api/worklog/{employeeId}/start` - - `POST /api/worklog/{employeeId}/save` - - `GET /api/worklog/{employeeId}?date=YYYY-MM-DD` -- Lookups API: - - `GET /api/lookups` - - `GET /api/lookups/subactivities?activityId=...` -- Employees API: - - `GET /api/employees` -- Business rules: - - closes previous running activity when a new one starts - - prevents starting activities after day is finished - - validates Activity x Subactivity relationship -- Seed data (`data.sql`) for programs, teams, languages, activities, subactivities, employees -- Global exception handler with standardized error response -- CORS config for Angular dev environment +- **The first request can take up to 2 minutes.** The backend runs on a free plan that sleeps after about 15 minutes without traffic. The app shows a "Waking up the server..." notice while it starts. After that it responds in milliseconds. +- **It is a public demo.** There is no login. You choose an employee from a list, and everyone who visits shares the same data. The employees and all sample data are fictional. Please do not enter personal information. +- A workday can only be finished once per day. If the demo says the day is already finished, choose another employee. -### Frontend (Angular) +**Quick tour:** open the app, choose an employee, fill the form, press **New**, start a second activity to see the first one close, then press **Save Day**. -- Worklog page with: - - employee selector - - activity form - - running timer and summary - - activity history table -- Form behavior: - - dependent subactivity list by selected activity - - clear form after `New` - - lock form when day is finished -- UX: - - global top loading bar - - toast notifications for API feedback - - day-finished banner and clear disabled states - - responsive layout with horizontal scroll for history table on small screens +## Screenshots -## Worklog Flow +| Home | Filling the form | +|---|---| +| ![Home screen](docs/screenshots/home.png) | ![Form filled with an activity](docs/screenshots/form-filled.png) | -1. Select employee -2. Choose Program, Team, Language, Activity, Subactivity -3. Click `New` to start tracking -4. Start another activity to automatically close the previous one -5. Click `Save Day` to close running activity and finish the day +| Running activity and history | Day finished | +|---|---| +| ![Running timer, day summary and activity history](docs/screenshots/running-activity.png) | ![Finished day with a locked form](docs/screenshots/day-finished.png) | -## Technologies +| On a phone (activities as cards) | API documentation (Swagger UI) | +|---|---| +| ![Phone layout](docs/screenshots/mobile.png) | ![Swagger UI of the deployed API](docs/screenshots/api-docs.png) | -### Backend +## Features -- Java 21 -- Spring Boot -- Spring Data JPA -- PostgreSQL -- Maven +**For the user** + +- Choose an employee and register activities by Program, Team, Language, Activity and Subactivity. +- The Subactivity list depends on the selected Activity. +- Optional note on each activity. +- Automatic time tracking: starting a new activity closes the running one and stores its duration. +- Running timer and a day summary (number of activities and total time). +- Activity history of the day, newest first, with the running activity highlighted. +- **Save Day** closes the running activity and finishes the day. A finished day is locked until the next date. +- Clear feedback: loading bar, toast messages for success and errors, and a notice when the server is slow to respond. +- Responsive layout: two columns on desktop, a single column on tablets, and activities shown as cards on phones. + +**For the engineer** + +- Business rules live in the backend and are protected by the database (see [Business rules](#business-rules)). +- Versioned database schema with Flyway migrations. +- Standard error responses with correct HTTP status codes (400, 404, 409, 500). +- Configurable CORS origins and time zone, so the same build runs locally and in production. +- Interactive API documentation (OpenAPI / Swagger UI). +- Unit, controller and integration tests (real PostgreSQL with Testcontainers) and frontend unit tests. +- GitHub Actions CI and Dependabot for weekly dependency updates. +- Docker image for the backend and Docker Compose for local development. + +## Business rules + +- Only **one activity can be running** at a time for a workday. The database enforces this with a partial unique index. +- Starting a new activity **closes the previous one** and stores its duration in seconds. +- There is **one workday per employee per date** (unique constraint). "Today" is calculated in the time zone configured on the server (`APP_TIMEZONE`), so the browser time zone never changes which day is used. +- After **Save Day**, no activity can be started on that date. +- The Subactivity must belong to the selected Activity. +- A note can have at most 255 characters. + +## Architecture + +```mermaid +flowchart LR + User([Browser]) -->|HTTPS| Web["Angular app
(Vercel)"] + Web -->|REST / JSON| Api["Spring Boot API
(Render, Docker)"] + Api -->|JDBC + SSL| Db[("PostgreSQL
(Neon)")] +``` -### Frontend +- **Frontend:** Angular standalone components. A small store (`BehaviorSubject`) keeps the page state, HTTP interceptors handle the loading bar and error toasts. +- **Backend:** layered Spring Boot application: `controller` (REST), `service` (business rules), `repository` (Spring Data JPA), `dto` and `mapper` (API models), `exception` (global error handling). +- **Database:** PostgreSQL. The schema is created and changed only by Flyway migrations. Hibernate just validates it. -- Angular (standalone components) -- TypeScript -- SCSS -- RxJS +### Tech stack -## How to Run Locally +| Area | Technologies | +|---|---| +| Backend | Java 21, Spring Boot 4 (Web MVC, Data JPA, Validation), Hibernate, Flyway, springdoc-openapi, Lombok, Maven | +| Database | PostgreSQL | +| Frontend | Angular 20, TypeScript, RxJS, SCSS | +| Tests | JUnit 5, Mockito, Spring MockMvc, Testcontainers, Karma and Jasmine | +| DevOps | Docker (multi-stage image), Docker Compose, GitHub Actions, Dependabot | +| Hosting | Render (API), Vercel (frontend), Neon (database) | -1. Clone: +### Project structure + +```text +worklog/ +├─ backend/ Spring Boot API +│ ├─ src/main/java/com/pitercoding/backend/ +│ │ ├─ config/ CORS, clock/time zone, OpenAPI +│ │ ├─ controller/ REST endpoints +│ │ ├─ dto/ mapper/ API models and conversion +│ │ ├─ exception/ Global error handling +│ │ ├─ model/ repository/ JPA entities and Spring Data +│ │ └─ service/ Business rules +│ ├─ src/main/resources/db/migration/ Flyway migrations (V1, V2, V3) +│ ├─ src/test/ Unit, controller and integration tests +│ └─ Dockerfile +├─ frontend/ Angular app +│ └─ src/app/ +│ ├─ core/ Endpoints, interceptors, toasts, notices +│ ├─ features/worklog/ Page, components, store, API services, models +│ └─ shared/ Reusable pipes +├─ docs/screenshots/ Images used in this README +├─ .github/ CI workflow and Dependabot configuration +├─ docker-compose.yml Local PostgreSQL (and optional backend) +└─ render.yaml Render service description +``` + +## Run it locally + +### Requirements + +- Java 21 +- Node.js 22 (Angular 20 needs Node 20.19+ or 22.12+) +- Docker Desktop (for the database and for the backend tests) ```bash git clone https://github.com/pitercoding/worklog.git cd worklog ``` -2. Configure database credentials in environment variables: +### Option A: Docker for the database and the API, Angular on your machine ```bash -DB_USER=your_user -DB_PASSWORD=your_password +# 1. PostgreSQL + backend in containers (the first build takes a few minutes) +docker compose --profile full up -d --build + +# 2. Frontend +cd frontend +npm install +npm start ``` -3. Run backend: +Open http://localhost:4200. The API runs at http://localhost:8080 (Swagger UI at http://localhost:8080/swagger-ui.html). + +Stop everything with `docker compose --profile full down` (add `-v` to also delete the database data). + +### Option B: run each part separately (best for development) + +**1. Database** + +```bash +docker compose up -d +``` + +This starts only PostgreSQL (container `worklog-postgres`) on port **5433**. The port avoids a clash with a PostgreSQL that may already be installed on your machine. Stop it with `docker compose down`. + +**2. Backend** ```bash cd backend +export DB_URL=jdbc:postgresql://localhost:5433/worklog +export DB_USER=worklog +export DB_PASSWORD=worklog_dev_password ./mvnw spring-boot:run ``` -4. Run frontend: +On Windows PowerShell, set the variables with `$env:DB_USER = "worklog"` and run `.\mvnw.cmd spring-boot:run`. + +On the first start, Flyway creates the tables and loads the sample data. Check http://localhost:8080/health (it answers `OK`). + +**3. Frontend** ```bash cd frontend npm install -ng serve +npm start ``` -5. Open: +Open http://localhost:4200. In development the app calls the API at `http://localhost:8080/api`. -- Frontend: `http://localhost:4200` -- Backend: `http://localhost:8080` +### Run the tests -## API Notes +```bash +# Backend: unit, controller and integration tests (needs Docker for PostgreSQL via Testcontainers) +cd backend +./mvnw verify -- The frontend uses employee selection (no authentication flow yet). -- Workday is date-based; once finished, it can only start again on the next date. +# Frontend: unit tests in headless Chrome +cd frontend +npm run test:ci +``` -## Testing Status +If Karma cannot find Chrome, set `CHROME_BIN` to the Chrome executable path first. -Current status: +### Backend configuration -- core frontend/backend integration tested manually -- production-grade unit/integration test coverage still pending +All settings have a development default except the database user and password. -Recommended next test scope: +| Variable | Description | Default | +|---|---|---| +| `DB_URL` | JDBC URL of the database | `jdbc:postgresql://localhost:5432/worklog` | +| `DB_USER` | Database user | required | +| `DB_PASSWORD` | Database password | required | +| `PORT` | HTTP port | `8080` | +| `CORS_ORIGINS` | Allowed frontend origins, comma separated | `http://localhost:4200` | +| `APP_TIMEZONE` | Time zone that decides what "today" is (for example `Europe/Berlin`) | server time zone | +| `SHOW_SQL` | Log the SQL queries | `false` | +| `SPRING_PROFILES_ACTIVE` | Use `prod` in production (quieter logs, small connection pool) | none | -- backend service tests for start/save day rules -- controller tests for response/validation behavior -- frontend store and component tests for state transitions +`backend/.env.example` lists the same values. The frontend API URL is set in `frontend/src/environments/` (`environment.development.ts` for local work, `environment.ts` for production). -## Next Improvements +### Troubleshooting -### Authentication and Security +- **`password authentication failed` or `connection refused`:** another PostgreSQL may be using the port. This project uses `5433` for that reason. Check `DB_URL` and that `docker ps` shows `worklog-postgres`. +- **Port 8080 already in use:** stop the other process, or run the API on another port with `PORT=8081` and update `environment.development.ts`. +- **`docker compose down` leaves the backend running:** it was started with the `full` profile. Use `docker compose --profile full down`. -- Add login with JWT -- Replace employee dropdown with authenticated user context -- Add role-based access for admin/user operations +## API -### Product and UX +Interactive documentation: [`/swagger-ui.html`](https://worklog-api-ndza.onrender.com/swagger-ui.html) (OpenAPI spec at `/v3/api-docs`). -- Add date picker to view previous workdays -- Add edit/correct flow for mistaken entries -- Add dashboard and reports (time by activity, team, language) +| Method | Path | Description | +|---|---|---| +| `POST` | `/api/worklog/{employeeId}/start` | Start an activity (closes the running one) | +| `POST` | `/api/worklog/{employeeId}/save` | Finish the day | +| `GET` | `/api/worklog/{employeeId}?date=YYYY-MM-DD` | Get a workday with its activities (`date` is optional and defaults to today) | +| `GET` | `/api/lookups` | Programs, teams, languages, activities and subactivities | +| `GET` | `/api/lookups/subactivities?activityId=` | Subactivities of one activity | +| `GET` | `/api/employees` | Active employees | +| `GET` | `/health` | Health check | -### Engineering and Quality +Example request: -- Add unit and integration tests (backend + frontend) -- Introduce Flyway/Liquibase migrations for schema versioning -- Add CI pipeline (lint, test, build) +```bash +curl -X POST http://localhost:8080/api/worklog/1/start \ + -H "Content-Type: application/json" \ + -d '{"programId":1,"teamId":1,"languageId":1,"activityId":1,"subactivityId":1,"note":"Fixing a bug"}' +``` -### Deployment +Errors always use the same JSON format: -- No deployment yet -- Future setup suggestion: - - Backend: Render or Railway - - Frontend: Vercel or Netlify - - Database: managed PostgreSQL (Neon/Supabase/Aiven) +```json +{ + "timestamp": "2026-11-28T11:00:00Z", + "status": 409, + "error": "Conflict", + "message": "Workday is already finished for employee: 1", + "path": "/api/worklog/1/start" +} +``` -## Folder Structure +| Status | Meaning | +|---|---| +| `400` | Invalid request (missing field, bad date, subactivity of another activity, note too long) | +| `404` | Employee, lookup item or workday not found | +| `409` | The workday is already finished (or there is no open workday to save) | +| `500` | Unexpected error (details are logged on the server, not returned) | -```text -worklog/ -├─ backend/ # Spring Boot API -│ ├─ src/main/java/com/pitercoding/backend/ -│ │ ├─ config/ # CORS and app-level config -│ │ ├─ controller/ # REST endpoints (worklog, lookups, employees) -│ │ ├─ dto/ # Request/response payloads -│ │ ├─ exception/ # Global exception handling -│ │ ├─ mapper/ # Entity -> DTO mapping -│ │ ├─ model/ # JPA entities and enums -│ │ ├─ repository/ # Spring Data repositories -│ │ ├─ service/ # Business rules and application logic -│ │ └─ BackendApplication.java # Spring Boot entrypoint -│ ├─ src/main/resources/ -│ │ ├─ application.properties # Base configuration -│ │ ├─ application-dev.properties # Dev profile configuration -│ │ └─ data.sql # Seed data (lookups, employees) -│ └─ pom.xml # Maven dependencies and build -├─ frontend/ # Angular client app -│ ├─ src/app/ -│ │ ├─ core/ # Constants, interceptors, global UI services -│ │ ├─ features/worklog/ # Worklog domain (pages, components, state, services) -│ │ ├─ shared/ # Reusable pipes and utils -│ │ ├─ app.config.ts # Global providers setup -│ │ └─ app.routes.ts # Routing configuration -│ ├─ src/assets/ -│ │ ├─ images/ # Logos and static image assets -│ │ └─ screenshots/ # Project screenshots and capture plan -│ ├─ src/main.ts # Angular bootstrap -│ └─ package.json # Frontend scripts and dependencies -├─ README.md # Documentation (English) -└─ README.pt.md # Documentation (Portuguese) -``` +## Database + +Flyway runs the migrations in `backend/src/main/resources/db/migration` when the application starts: + +| Migration | Content | +|---|---| +| `V1__initial_schema.sql` | Tables, keys and constraints | +| `V2__activity_entry_indexes.sql` | One running activity per workday (partial unique index) and a history index | +| `V3__seed_reference_data.sql` | Sample programs, teams, languages, activities, subactivities and employees | + +Main tables: `employees`, `workdays` (one per employee and date), `activity_entries` (the tracked activities) and the lookup tables `programs`, `teams`, `languages`, `activities` and `subactivities`. To change the schema, add a new migration; never edit one that was already applied. + +## Quality: tests and CI + +- **Backend:** unit tests for the business rules (with a fixed clock), controller tests (validation and error responses) and integration tests against a real PostgreSQL started with Testcontainers (full day flow, unique constraints, API documentation). +- **Frontend:** unit tests for the state store, the form, the day summary, the history table, the loading state, the error interceptor and the duration pipe. +- **GitHub Actions** (`.github/workflows/ci.yml`) runs on every pull request and push to `main`: backend build and tests, backend Docker image build, frontend build and tests. +- **Dependabot** opens weekly pull requests for the backend (Maven), the frontend (npm, with the Angular packages grouped) and the GitHub Actions versions. -## Screenshots & Visuals +## Deployment -### Worklog Home (No Employee Selected) +| Part | Service | Notes | +|---|---|---| +| Frontend | [Vercel](https://vercel.com) | Root directory `frontend`. Settings in `frontend/vercel.json` (build output and single-page-app routing). | +| Backend | [Render](https://render.com) | Docker web service built from `backend/Dockerfile`, Frankfurt region, free plan. Health check on `/health`. `render.yaml` documents the settings. | +| Database | [Neon](https://neon.com) | Managed PostgreSQL. Flyway creates the schema on the first start. | -![Worklog Home Empty](frontend/src/assets/screenshots/worklog-home-empty.png) +Environment variables set on Render: `SPRING_PROFILES_ACTIVE=prod`, `APP_TIMEZONE`, `DB_URL` (format `jdbc:postgresql:///?sslmode=require`), `DB_USER`, `DB_PASSWORD` and `CORS_ORIGINS` (the exact URL of the Vercel site). No secret is stored in the repository. -### Activity Form Filled +To deploy your own copy: create the Neon database, create the Render service from the repository with the variables above, set `apiUrl` in `frontend/src/environments/environment.ts` to the Render URL, and import the repository on Vercel with `frontend` as the root directory. -![Worklog Form Filled](frontend/src/assets/screenshots/worklog-form-filled.png) +**Free plan limits:** the Render service sleeps after about 15 minutes without traffic and needs 1 to 2 minutes to wake up. The Neon database also suspends when idle and wakes up in a few seconds. Limits can change, so check each provider's pricing page. -### Running Activity & Activity History +## Limitations and ideas -![Worklog Running Activity](frontend/src/assets/screenshots/worklog-running-activity.png) +This is a portfolio demo, so some choices are intentional: -### Day Finished +- **No authentication.** The employee is chosen from a list and all data is public. A real product would add login and per-user permissions. +- The screen shows **today only**. The API already accepts a `date`, but there is no date picker yet. +- Entries cannot be edited after they are created. -![Worklog Day Finished](frontend/src/assets/screenshots/worklog-day-finished.png) +Possible next steps: a date picker for past days, correcting entries, reports (time per activity, team or language) and optional authentication. ## License -This project is licensed under the **MIT License** — feel free to use, study, and modify it. +This project is licensed under the **MIT License**. See [LICENSE](LICENSE). ## Author -**Piter Gomes** — Computer Science Student (6th Semester) & Full-Stack Developer +**Piter Gomes**: Computer Science Student (7th Semester) & Full-Stack Developer [Email](mailto:piterg.bio@gmail.com) | [LinkedIn](https://www.linkedin.com/in/piter-gomes-4a39281a1/) | [GitHub](https://github.com/pitercoding) | [Portfolio](https://portfolio-pitergomes.vercel.app/) diff --git a/README.pt.md b/README.pt.md deleted file mode 100644 index 14592a0..0000000 --- a/README.pt.md +++ /dev/null @@ -1,244 +0,0 @@ -

Worklog

- -

- Idiomas:
- Portugues | - English -

- -# Worklog - -Worklog é uma aplicação **full-stack** para registro diário de atividades em equipes de tecnologia. Ela permite que colaboradores registrem tarefas por **Programa, Time, Linguagem, Atividade e Subatividade**, com contagem automática de tempo por atividade. - -O sistema oferece: - -- Início de nova atividade com fechamento automático da anterior em andamento -- Finalização do dia com uma única ação (`Save Day`) -- Histórico diário com durações e destaque da atividade atual -- Tratamento centralizado de erros da API e notificações no frontend - -## Motivação do Projeto - -Este projeto nasceu de uma necessidade real de registro operacional de funcionários no dia a dia. - -A proposta foi manter uma **UX simples e objetiva**, com regras de negócio consistentes no backend para garantir: - -- Apenas uma atividade aberta por vez -- Apenas um *workday* por funcionário por data -- Finalização explícita do dia - -## Funcionalidades Atuais - -### Backend (Spring Boot + PostgreSQL) - -- API REST para fluxo de worklog: - - `POST /api/worklog/{employeeId}/start` - - `POST /api/worklog/{employeeId}/save` - - `GET /api/worklog/{employeeId}?date=YYYY-MM-DD` -- API de lookups: - - `GET /api/lookups` - - `GET /api/lookups/subactivities?activityId=...` -- API de funcionários: - - `GET /api/employees` -- Regras de negócio: - - Fecha atividade em andamento ao iniciar uma nova - - Bloqueia início de atividades após o dia estar finalizado - - Valida relação entre Atividade e Subatividade - -- Seed de dados (`data.sql`) com programas, times, linguagens, atividades, subatividades e funcionários - -- Handler global de exceções com resposta de erro padronizada - -- Configuração de CORS para ambiente Angular local - -## Frontend (Angular) - -- Página de Worklog com: - - Seletor de funcionário - - Formulário de atividade - - Timer em execução e resumo - - Histórico de atividades - -- Comportamento do formulário: - - Subatividades dependentes da atividade selecionada - - Limpeza do formulário após `New` - - Bloqueio do formulário quando o dia está finalizado - -- UX: - - Barra global de loading no topo - - Toasts para feedback da API - - Banner de dia finalizado e estados de botão claros - - Layout responsivo com scroll horizontal na tabela em telas pequenas - -## Fluxo de Uso - -1. Selecione o funcionário -2. Escolha Programa, Time, Linguagem, Atividade e Subatividade -3. Clique em `New` para iniciar o tracking -4. Inicie outra atividade para fechar automaticamente a anterior -5. Clique em `Save Day` para finalizar o dia - -## Tecnologias - -### Backend - -- Java 21 -- Spring Boot -- Spring Data JPA -- PostgreSQL -- Maven - -### Frontend - -- Angular (componentes standalone) -- TypeScript -- SCSS -- RxJS - -## Como Rodar Localmente - -1. Clone o repositório: - -```bash -git clone https://github.com/pitercoding/worklog.git -cd worklog -``` - -2. Configure credenciais do banco em variáveis de ambiente: - -```bash -DB_USER=seu_usuario -DB_PASSWORD=sua_senha -``` - -3. Execute o backend: - -```bash -cd backend -./mvnw spring-boot:run -``` - -4. Execute o frontend: - -```bash -cd frontend -npm install -ng serve -``` - -5. Acesse: - -- Frontend: `http://localhost:4200` -- Backend: `http://localhost:8080` - -## Observações da API - -- O frontend ainda utiliza seleção de funcionário (sem autenticação). -- O workday é baseado em data; após finalizar, só é possível iniciar novamente na próxima data. - -## Status de Testes - -Status atual: - -- Integração frontend/backend validada manualmente -- Cobertura de testes unitários e de integração ainda pendente - -Escopo recomendado para a próxima etapa: - -- Testes de service no backend para regras de start/save day -- Testes de controller para validação e respostas -- Testes de store/component no frontend para transições de estado - -## Próximas Melhorias - -### Autenticação e Segurança - -- Adicionar login com JWT -- Substituir seletor de funcionário por usuário autenticado -- Adicionar controle de acesso por perfil (admin/user) - -### Produto e UX - -- Adicionar seletor de data para consultar dias anteriores -- Adicionar fluxo de correção/edição de registros -- Adicionar dashboard e relatórios (tempo por atividade, time, linguagem) - -### Engenharia e Qualidade - -- Adicionar testes unitários e de integração (backend e frontend) -- Introduzir Flyway/Liquibase para versionamento de schema -- Adicionar pipeline de CI (lint, test, build) - -### Deploy - -- Projeto ainda sem deploy - -Sugestão futura: - -- Backend: Render ou Railway -- Frontend: Vercel ou Netlify -- Banco: PostgreSQL gerenciado (Neon, Supabase ou Aiven) - -## Estrutura de Pastas - -```text -worklog/ -├─ backend/ # API Spring Boot -│ ├─ src/main/java/com/pitercoding/backend/ -│ │ ├─ config/ # CORS e configurações da aplicação -│ │ ├─ controller/ # Endpoints REST (worklog, lookups, employees) -│ │ ├─ dto/ # Payloads de request/response -│ │ ├─ exception/ # Tratamento global de exceções -│ │ ├─ mapper/ # Conversão Entity -> DTO -│ │ ├─ model/ # Entidades JPA e enums -│ │ ├─ repository/ # Repositórios Spring Data -│ │ ├─ service/ # Regras de negócio e lógica da aplicação -│ │ └─ BackendApplication.java # Entrypoint do Spring Boot -│ ├─ src/main/resources/ -│ │ ├─ application.properties # Configuração base -│ │ ├─ application-dev.properties # Configuração do perfil dev -│ │ └─ data.sql # Seed de dados (lookups, employees) -│ └─ pom.xml # Dependências e build Maven -├─ frontend/ # Aplicação Angular -│ ├─ src/app/ -│ │ ├─ core/ # Constantes, interceptors e serviços globais de UI -│ │ ├─ features/worklog/ # Domínio Worklog (pages, components, state, services) -│ │ ├─ shared/ # Pipes e utilitários reutilizáveis -│ │ ├─ app.config.ts # Providers globais -│ │ └─ app.routes.ts # Configuração de rotas -│ ├─ src/assets/ -│ │ ├─ images/ # Logos e imagens estáticas -│ │ └─ screenshots/ # Screenshots do projeto e plano de captura -│ ├─ src/main.ts # Bootstrap do Angular -│ └─ package.json # Scripts e dependências do frontend -├─ README.md # Documentação em inglês -└─ README.pt.md # Documentação em português -``` - -## Screenshots & Visuals - -### Tela Inicial (Sem Funcionário Selecionado) - -![Worklog Home Empty](frontend/src/assets/screenshots/worklog-home-empty.png) - -### Formulário de Atividade Preenchido - -![Worklog Form Filled](frontend/src/assets/screenshots/worklog-form-filled.png) - -### Atividade em Andamento & Histórico de Atividades - -![Worklog Running Activity](frontend/src/assets/screenshots/worklog-running-activity.png) - -### Dia Finalizado - -![Worklog Day Finished](frontend/src/assets/screenshots/worklog-day-finished.png) - -## **Licença** - -Este projeto está sob a licença **MIT**. - -## Autor - -**Piter Gomes** — Aluno de Ciências da Computação (6º Semestre) & Desenvolvedor Full-Stack - -📧 [Email](mailto:piterg.bio@gmail.com) | 💼 [LinkedIn](https://www.linkedin.com/in/piter-gomes-4a39281a1/) | 💻 [GitHub](https://github.com/pitercoding) | 🌐 [Portfolio](https://portfolio-pitergomes.vercel.app/) diff --git a/docs/screenshots/api-docs.png b/docs/screenshots/api-docs.png new file mode 100644 index 0000000..84e6e56 Binary files /dev/null and b/docs/screenshots/api-docs.png differ diff --git a/docs/screenshots/day-finished.png b/docs/screenshots/day-finished.png new file mode 100644 index 0000000..a7d65e2 Binary files /dev/null and b/docs/screenshots/day-finished.png differ diff --git a/docs/screenshots/form-filled.png b/docs/screenshots/form-filled.png new file mode 100644 index 0000000..90817fe Binary files /dev/null and b/docs/screenshots/form-filled.png differ diff --git a/docs/screenshots/home.png b/docs/screenshots/home.png new file mode 100644 index 0000000..5d6be3e Binary files /dev/null and b/docs/screenshots/home.png differ diff --git a/docs/screenshots/mobile.png b/docs/screenshots/mobile.png new file mode 100644 index 0000000..7f7c9e3 Binary files /dev/null and b/docs/screenshots/mobile.png differ diff --git a/docs/screenshots/running-activity.png b/docs/screenshots/running-activity.png new file mode 100644 index 0000000..2193208 Binary files /dev/null and b/docs/screenshots/running-activity.png differ diff --git a/frontend/src/assets/screenshots/worklog-day-finished.png b/frontend/src/assets/screenshots/worklog-day-finished.png deleted file mode 100644 index 3570e84..0000000 Binary files a/frontend/src/assets/screenshots/worklog-day-finished.png and /dev/null differ diff --git a/frontend/src/assets/screenshots/worklog-form-filled.png b/frontend/src/assets/screenshots/worklog-form-filled.png deleted file mode 100644 index 7001c41..0000000 Binary files a/frontend/src/assets/screenshots/worklog-form-filled.png and /dev/null differ diff --git a/frontend/src/assets/screenshots/worklog-home-empty.png b/frontend/src/assets/screenshots/worklog-home-empty.png deleted file mode 100644 index eed6dd9..0000000 Binary files a/frontend/src/assets/screenshots/worklog-home-empty.png and /dev/null differ diff --git a/frontend/src/assets/screenshots/worklog-running-activity.png b/frontend/src/assets/screenshots/worklog-running-activity.png deleted file mode 100644 index eba529c..0000000 Binary files a/frontend/src/assets/screenshots/worklog-running-activity.png and /dev/null differ