{"id":26050980,"url":"https://github.com/niemiville/work-hours-tracker","last_synced_at":"2025-07-30T21:35:13.556Z","repository":{"id":279867578,"uuid":"940263782","full_name":"niemiville/work-hours-tracker","owner":"niemiville","description":"Work hours tracking by different tasks.","archived":false,"fork":false,"pushed_at":"2025-06-30T17:01:11.000Z","size":258,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T17:48:27.515Z","etag":null,"topics":["time-tracker","work-hours","work-hours-tracking","workhours"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niemiville.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-27T22:03:00.000Z","updated_at":"2025-06-30T17:01:14.000Z","dependencies_parsed_at":"2025-02-28T07:09:20.081Z","dependency_job_id":"75561c5b-c756-447a-886a-fedf4bedbaac","html_url":"https://github.com/niemiville/work-hours-tracker","commit_stats":null,"previous_names":["niemiville/work-hours-tracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/niemiville/work-hours-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niemiville%2Fwork-hours-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niemiville%2Fwork-hours-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niemiville%2Fwork-hours-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niemiville%2Fwork-hours-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niemiville","download_url":"https://codeload.github.com/niemiville/work-hours-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niemiville%2Fwork-hours-tracker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267945341,"owners_count":24170217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["time-tracker","work-hours","work-hours-tracking","workhours"],"created_at":"2025-03-08T03:22:14.494Z","updated_at":"2025-07-30T21:35:13.546Z","avatar_url":"https://github.com/niemiville.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Work Hours Tracker\n\nA full-stack application for tracking work hours with PostgreSQL database, Node.js backend, and React frontend.\n\n## Docker Setup\n\nThis application is fully containerized and can be run using Docker and Docker Compose.\n\n### Prerequisites\n\n- [Docker](https://docs.docker.com/get-docker/)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n\n### Running the Application\n\n1. Clone this repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd work-hours-tracker\n   ```\n\n2. Start the application:\n   ```bash\n   docker-compose up -d\n   ```\n\n3. Access the application:\n   - Frontend: http://\u003cyour-ip\u003e:20080\n   - Frontend SSL: https://\u003cyour-ip\u003e:20443\n   - Backend API: Available through the frontend at /api (not directly accessible)\n\n### Rebuilding the Application\n\nTo rebuild the application after making changes:\n\n1. Rebuild and restart with cache (for routine updates):\n   ```bash\n   docker-compose up --build -d\n   ```\n\n2. Force a complete rebuild ignoring cache (for troubleshooting or major changes):\n   ```bash\n   docker-compose build --no-cache \u0026\u0026 docker-compose up -d\n   ```\n\n### Services\n\nThe application consists of three main services:\n\n1. **Database (PostgreSQL)**\n   - Persists data in a mounted volume at /home/ville/work_postgres_data\n   - Automatically runs initialization scripts to create tables\n   - Accessible only locally on 127.0.0.1:5432\n\n2. **Backend (Node.js)**\n   - RESTful API built with Express\n   - JWT authentication\n   - Connected to the database service\n   - Not directly exposed outside Docker network\n   - Accessible through frontend's Nginx proxy at /api\n\n3. **Frontend (React)**\n   - Single page application built with React\n   - Served by Nginx\n   - Exposed on port 20080\n\n### Environment Variables\n\nThe following environment variables can be modified in the docker-compose.yml file:\n\n#### Database\n- `POSTGRES_USER`: Database username (default: toshiba)\n- `POSTGRES_PASSWORD`: Database password (default: change_db_password)\n- `POSTGRES_DB`: Database name (default: workhours)\n\n#### Backend\n- `DB_HOST`: Database host (default: db)\n- `DB_USER`: Database username (default: user)\n- `DB_PASSWORD`: Database password (default: password)\n- `DB_NAME`: Database name (default: workhours)\n- `DB_PORT`: Database port (default: 5432)\n- `PORT`: Backend port (default: 3001)\n\n#### Frontend\n- `VITE_API_URL`: Backend API URL (default: http://localhost:3001/api)\n\n### Development\n\nFor local development without Docker:\n\n1. **Database**: Set up a PostgreSQL database and run the scripts in `database/tables.sql`.\n2. **Backend**: Navigate to the `backend` directory, install dependencies with `npm install`, and start with `npm run dev`.\n3. **Frontend**: Navigate to the `frontend` directory, install dependencies with `npm install`, and start with `npm run dev`.\n\n### Data Persistence\n\nThe PostgreSQL database data is stored in a mounted volume at /home/ville/work_postgres_data, ensuring that your data persists across container restarts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniemiville%2Fwork-hours-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniemiville%2Fwork-hours-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniemiville%2Fwork-hours-tracker/lists"}