{"id":14982954,"url":"https://github.com/callicoder/spring-security-react-ant-design-polls-app","last_synced_at":"2025-05-15T09:00:25.670Z","repository":{"id":30201649,"uuid":"123231656","full_name":"callicoder/spring-security-react-ant-design-polls-app","owner":"callicoder","description":"Full Stack Polls App built using Spring Boot, Spring Security, JWT, React, and Ant Design","archived":false,"fork":false,"pushed_at":"2023-12-10T06:23:57.000Z","size":3070,"stargazers_count":1798,"open_issues_count":47,"forks_count":1062,"subscribers_count":64,"default_branch":"master","last_synced_at":"2025-04-14T14:59:41.026Z","etag":null,"topics":["ant-design","antd","authentication","authorization","database","jwt","login","mysql","react","react-router","react-router-v4","reactjs","spring-boot","spring-mvc","spring-security","spring-security-jwt","spring-security-react","spring-security-tutorial"],"latest_commit_sha":null,"homepage":"https://www.callicoder.com/spring-boot-spring-security-jwt-mysql-react-app-part-1/","language":"Java","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/callicoder.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-02-28T05:01:35.000Z","updated_at":"2025-04-14T07:08:41.000Z","dependencies_parsed_at":"2023-02-14T10:50:24.136Z","dependency_job_id":"1fbcf098-2e1c-42a8-affd-14807d613308","html_url":"https://github.com/callicoder/spring-security-react-ant-design-polls-app","commit_stats":{"total_commits":69,"total_committers":3,"mean_commits":23.0,"dds":0.3188405797101449,"last_synced_commit":"362fad90cab17e76453b3b9e273c594de6ee3d7f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callicoder%2Fspring-security-react-ant-design-polls-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callicoder%2Fspring-security-react-ant-design-polls-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callicoder%2Fspring-security-react-ant-design-polls-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callicoder%2Fspring-security-react-ant-design-polls-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/callicoder","download_url":"https://codeload.github.com/callicoder/spring-security-react-ant-design-polls-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310509,"owners_count":22049467,"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":["ant-design","antd","authentication","authorization","database","jwt","login","mysql","react","react-router","react-router-v4","reactjs","spring-boot","spring-mvc","spring-security","spring-security-jwt","spring-security-react","spring-security-tutorial"],"created_at":"2024-09-24T14:06:29.567Z","updated_at":"2025-05-15T09:00:25.605Z","avatar_url":"https://github.com/callicoder.png","language":"Java","readme":"## Building a Full Stack Polls app similar to twitter polls with Spring Boot, Spring Security, JWT, React and Ant Design\n\n![App Screenshot](screenshot.png)\n\n### Tutorials\n\nI've written a complete tutorial series for this application on The CalliCoder Blog -\n\n+ [Part 1: Bootstrapping the Project and creating the basic domain models and repositories](https://www.callicoder.com/spring-boot-spring-security-jwt-mysql-react-app-part-1/)\n\n+ [Part 2: Configuring Spring Security along with JWT authentication and Building Rest APIs for Login and SignUp](https://www.callicoder.com/spring-boot-spring-security-jwt-mysql-react-app-part-2/)\n\n+ [Part 3: Building Rest APIs for creating Polls, voting for a choice in a Poll, retrieving user profile etc](https://www.callicoder.com/spring-boot-spring-security-jwt-mysql-react-app-part-3/)\n\n+ [Part 4: Building the front-end using React and Ant Design](https://www.callicoder.com/spring-boot-spring-security-jwt-mysql-react-app-part-4/)\n\n## Steps to Setup the Spring Boot Back end app (polling-app-server)\n\n1. **Clone the application**\n\n\t```bash\n\tgit clone https://github.com/callicoder/spring-security-react-ant-design-polls-app.git\n\tcd polling-app-server\n\t```\n\n2. **Create MySQL database**\n\n\t```bash\n\tcreate database polling_app\n\t```\n\n3. **Change MySQL username and password as per your MySQL installation**\n\n\t+ open `src/main/resources/application.properties` file.\n\n\t+ change `spring.datasource.username` and `spring.datasource.password` properties as per your mysql installation\n\n4. **Run the app**\n\n\tYou can run the spring boot app by typing the following command -\n\n\t```bash\n\tmvn spring-boot:run\n\t```\n\n\tThe server will start on port 8080.\n\n\tYou can also package the application in the form of a `jar` file and then run it like so -\n\n\t```bash\n\tmvn package\n\tjava -jar target/polls-0.0.1-SNAPSHOT.jar\n\t```\n5. **Default Roles**\n\t\n\tThe spring boot app uses role based authorization powered by spring security. To add the default roles in the database, I have added the following sql queries in `src/main/resources/data.sql` file. Spring boot will automatically execute this script on startup -\n\n\t```sql\n\tINSERT IGNORE INTO roles(name) VALUES('ROLE_USER');\n\tINSERT IGNORE INTO roles(name) VALUES('ROLE_ADMIN');\n\t```\n\n\tAny new user who signs up to the app is assigned the `ROLE_USER` by default.\n\n## Steps to Setup the React Front end app (polling-app-client)\n\nFirst go to the `polling-app-client` folder -\n\n```bash\ncd polling-app-client\n```\n\nThen type the following command to install the dependencies and start the application -\n\n```bash\nnpm install \u0026\u0026 npm start\n```\n\nThe front-end server will start on port `3000`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallicoder%2Fspring-security-react-ant-design-polls-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcallicoder%2Fspring-security-react-ant-design-polls-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallicoder%2Fspring-security-react-ant-design-polls-app/lists"}