{"id":19596278,"url":"https://github.com/peroxy/starsky-frontend","last_synced_at":"2025-04-23T08:18:10.896Z","repository":{"id":124135433,"uuid":"309097369","full_name":"peroxy/starsky-frontend","owner":"peroxy","description":"Starsky is a management application for employee scheduling. ","archived":false,"fork":false,"pushed_at":"2021-09-15T13:26:28.000Z","size":3040,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T08:17:55.683Z","etag":null,"topics":["employee-management","employee-scheduling","frontend","starsky"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peroxy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-11-01T13:04:25.000Z","updated_at":"2024-07-31T11:05:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b608030-0c6a-4cc7-993b-446959a5156c","html_url":"https://github.com/peroxy/starsky-frontend","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroxy%2Fstarsky-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroxy%2Fstarsky-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroxy%2Fstarsky-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroxy%2Fstarsky-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peroxy","download_url":"https://codeload.github.com/peroxy/starsky-frontend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250395289,"owners_count":21423400,"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","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":["employee-management","employee-scheduling","frontend","starsky"],"created_at":"2024-11-11T08:52:39.084Z","updated_at":"2025-04-23T08:18:10.876Z","avatar_url":"https://github.com/peroxy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Starsky frontend :star:\n\nStarsky frontend represents the website of the starsky application for employee scheduling.\nIt uses React, Node.js and TypeScript.\n\nBackend Java REST API is located in a repository called [starsky-backend](https://github.com/peroxy/starsky-backend).\n\n![image](https://user-images.githubusercontent.com/15001760/129161508-35f30c0c-e6b4-4c4d-83bb-6def163b9e58.png)\n\n## Requirements :clipboard:\n\n- [docker](https://docs.docker.com/get-docker/)\n- [docker-compose](https://docs.docker.com/compose/install/) (at least 3.8 version support)\n- (optionally for debugging) [nodejs](https://nodejs.org/en/download/) (v14.15.5 or higher)\n\n## Development :computer:\n\n### Running with docker :whale2:\n\nPlease note that this has only been tested with docker on Ubuntu 20.04.\n\n1. Download frontend source files and go to `docker` directory:\n\n```shell script\ngit clone https://github.com/peroxy/starsky-frontend.git\ncd starsky-frontend/docker\n```\n\n2. Build and run the entire stack with `docker-compose`:\n\n```shell script\ndocker-compose up\n```\n\n3. You will now be able to access:\n\n- Frontend application at http://localhost:3000/,\n- API at http://localhost:8080/ and swagger-ui at http://localhost:8080/api/swagger-ui.html,\n- database at http://localhost:5432/.\n\nThe `docker-compose.override.yml` file is used for development configuration. It will bind your local `starsky-frontend` folder as a docker volume to enable live-reload.\n\n### Debugging\nYou can run and debug the frontend locally using your favorite JavaScript IDE:\n1. Run the backend REST API and database:\n\n```shell script\ncd starsky-backend/docker\ndocker-compose up database api\n```\n2. Run (`npm run start`) and debug the application with your IDE.\n\n### OpenAPI client\nWe are using the [OpenAPI client generator](https://github.com/OpenAPITools/openapi-generator) library with [typescript-fetch generator](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/typescript-fetch.md).\nTypeScript code files (using `fetch`) will be output to `src/api/__generated__` folder.\n\nTo generate/update the client you can use the npm script specified inside `packages.json`:\n\n```shell\nnpm run generate-api-client\n```\n\n## Deployment :rocket:\n\nWe host entire infrastructure on Azure, specifically using Azure Virtual Machine.\n\nPlease see [server requirements](https://github.com/peroxy/starsky-backend#server-requirements) section from starsky-backend for more information.\n\n### Repository secrets\n\nThese are the required secrets that should be stored inside Github repository secrets:\n\n- Dockerhub:\n    - `DOCKERHUB_USERNAME`\n    - `DOCKERHUB_TOKEN` - see [Create an access token](https://docs.docker.com/docker-hub/access-tokens/#create-an-access-token) for more information\n- Server host (Azure VM):\n    - `REMOTE_HOST` - remote host IP address / domain to SSH into\n    - `REMOTE_USER` - username to SSH with\n    - `SERVER_SSH_KEY` - private SSH key (OpenSSH, for example the contents of your `~/.ssh/id_rsa` key) to connect to your server\n- Frontend:\n    - `REACT_APP_BACKEND_HOST` - backend REST API base url (e.g. https://example.com/api)\n\n### How to deploy\n\nPush a tag `*.*.*` (e.g. `1.0.3`) to `master` branch and it will automatically deploy everything via Github workflow.\nSee `.github/main.yml` workflow for more info.\n\nIn short, it does this if it gets triggered by a new tag:\n\n- Takes source code from `master` branch and extracts the newest version from tag.\n- Configures environment variables used by docker containers from Github repository's secrets.\n- Builds and pushes all apps as Docker images to DockerHub.\n- Copies environment variables and docker-compose files to Azure VM.\n- Stops `starsky-frontend` containers on Azure VM, pulls the newest images and starts the containers again.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperoxy%2Fstarsky-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperoxy%2Fstarsky-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperoxy%2Fstarsky-frontend/lists"}