{"id":16228040,"url":"https://github.com/mpiorowski/spring-react-auth","last_synced_at":"2025-03-19T13:31:16.443Z","repository":{"id":98034386,"uuid":"150580912","full_name":"mpiorowski/spring-react-auth","owner":"mpiorowski","description":"JWT authorization app with spring-boot, react and postgresql","archived":false,"fork":false,"pushed_at":"2022-10-08T11:29:10.000Z","size":4214,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T07:38:01.621Z","etag":null,"topics":["applications"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mpiorowski.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}},"created_at":"2018-09-27T12:09:43.000Z","updated_at":"2024-07-28T14:54:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ceb6f20-5c69-4f6e-a591-1553b5aadb2c","html_url":"https://github.com/mpiorowski/spring-react-auth","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpiorowski%2Fspring-react-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpiorowski%2Fspring-react-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpiorowski%2Fspring-react-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpiorowski%2Fspring-react-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpiorowski","download_url":"https://codeload.github.com/mpiorowski/spring-react-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244434797,"owners_count":20452259,"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":["applications"],"created_at":"2024-10-10T12:54:28.634Z","updated_at":"2025-03-19T13:31:16.438Z","avatar_url":"https://github.com/mpiorowski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT authorization app with spring-boot, react and postgresql\n\nSample application with separate frontend and backend, connected to postgresql database. Authorization via jwt tokens. Offers a basic ui to manage users and products data.\n\nFrontend  -\u003e react + antd + babel  \nBackend   -\u003e spring boot + flyway + mybatis + postgresql\n\n## Initial access\nhttp://localhost:3000 (dev) or http://localhost (prod)  \nusername: user  \npassword: pass  \n\n# Deployment\n\n## Prerequisites and Dependencies\nPrerequisites: node, npm, java, maven, docker, docker-compose\n\nDependencies (not needed for production installation using docker):\n```\nmvn -f ./api clean dependency:resolve; \\\nnpm --prefix ./ui install ./ui\n```\n\n## Development deployment\n\n### database\nPostgreSQL (configuration in application.yml):  \nport:   5432  \nscheme: auth  \nuser:   admin  \npass:   admin  \n\nor You can use docker-compose to setup simple database container\n```\ndocker-compose -f ./docker/docker-compose.database.yml up -d --build\n```\n\n### frontend and backend\nRun two separate shell windows for frontend and backend.\n(Or just use your favorite IDE :) )\n```\nmvn -f ./api spring-boot:run\n```\n```\nnpm --prefix ./ui start\n```\n\nAccess via http://localhost:3000\n\n\n## Production deployment using docker-compose\n\nThis one line creates a production ready downsized containers.  \nOnly docker and docker-compose are needed as prerequisites.  \nAfter the automatic startup, which may take a while, the application is ready to work.  \n```\ndocker-compose -f ./docker/docker-compose.prod.yml up -d --build\n```\nAccess via http://localhost\n\n\n## Production manual deployment\n\nDatabase need to be manually setup up as in application.yml config file.  \nServer proxy need to be set for frontend url to backed port:  \nlocalhost/api/ - localhost:9000/api/\n\nRun two separate shell windows for frontend and backend.\n```\nmvn -f ./api clean package; \\ \njava -jar ./api/target/api-0.0.1-SNAPSHOT.jar\n```\n```\nnpm --prefix ./ui run build; \\\nnpm install -g serve; \\\nserve -s ./ui/build\n```\nAccess via http://localhost\n\n# Swagger\nFor the development build there is an active swagger component for api documentation.  \nAccess via ui link or by entering http://localhost:9000/swagger-ui.html.  \nYou need to authorized it by clicking \"Authorize\" button and then passing your jwt token as: \"Bearer your_jwt_token\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpiorowski%2Fspring-react-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpiorowski%2Fspring-react-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpiorowski%2Fspring-react-auth/lists"}