{"id":13694831,"url":"https://github.com/gothinkster/spring-boot-realworld-example-app","last_synced_at":"2025-05-15T10:01:55.956Z","repository":{"id":38015326,"uuid":"101670294","full_name":"gothinkster/spring-boot-realworld-example-app","owner":"gothinkster","description":"Example Spring codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld API spec.","archived":false,"fork":false,"pushed_at":"2024-07-13T10:14:03.000Z","size":759,"stargazers_count":1360,"open_issues_count":1,"forks_count":708,"subscribers_count":56,"default_branch":"master","last_synced_at":"2025-04-11T19:59:24.137Z","etag":null,"topics":["mybatis","realworld","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/gothinkster.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},"funding":{"github":["geromegrignon"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"geromegrignon","custom":null}},"created_at":"2017-08-28T17:43:55.000Z","updated_at":"2025-04-11T00:12:25.000Z","dependencies_parsed_at":"2024-01-14T19:12:17.588Z","dependency_job_id":"ab9f79ef-8f23-4634-aa03-1955710b5242","html_url":"https://github.com/gothinkster/spring-boot-realworld-example-app","commit_stats":{"total_commits":98,"total_committers":15,"mean_commits":6.533333333333333,"dds":0.2551020408163265,"last_synced_commit":"ee17e31aafe733d98c4853c8b9a74d7f2f6c924a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gothinkster%2Fspring-boot-realworld-example-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gothinkster%2Fspring-boot-realworld-example-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gothinkster%2Fspring-boot-realworld-example-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gothinkster%2Fspring-boot-realworld-example-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gothinkster","download_url":"https://codeload.github.com/gothinkster/spring-boot-realworld-example-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319715,"owners_count":22051072,"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":["mybatis","realworld","spring-boot"],"created_at":"2024-08-02T17:01:44.355Z","updated_at":"2025-05-15T10:01:55.277Z","avatar_url":"https://github.com/gothinkster.png","language":"Java","funding_links":["https://github.com/sponsors/geromegrignon","https://buymeacoffee.com/geromegrignon"],"categories":["Java"],"sub_categories":[],"readme":"# ![RealWorld Example App using Kotlin and Spring](example-logo.png)\n\n[![Actions](https://github.com/gothinkster/spring-boot-realworld-example-app/workflows/Java%20CI/badge.svg)](https://github.com/gothinkster/spring-boot-realworld-example-app/actions)\n\n\u003e ### Spring boot + MyBatis codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld-example-apps) spec and API.\n\nThis codebase was created to demonstrate a fully fledged full-stack application built with Spring boot + Mybatis including CRUD operations, authentication, routing, pagination, and more.\n\nFor more information on how to this works with other frontends/backends, head over to the [RealWorld](https://github.com/gothinkster/realworld) repo.\n\n# *NEW* GraphQL Support  \n\nFollowing some DDD principles. REST or GraphQL is just a kind of adapter. And the domain layer will be consistent all the time. So this repository implement GraphQL and REST at the same time.\n\nThe GraphQL schema is https://github.com/gothinkster/spring-boot-realworld-example-app/blob/master/src/main/resources/schema/schema.graphqls and the visualization looks like below.\n\n![](graphql-schema.png)\n\nAnd this implementation is using [dgs-framework](https://github.com/Netflix/dgs-framework) which is a quite new java graphql server framework.\n# How it works\n\nThe application uses Spring Boot (Web, Mybatis).\n\n* Use the idea of Domain Driven Design to separate the business term and infrastructure term.\n* Use MyBatis to implement the [Data Mapper](https://martinfowler.com/eaaCatalog/dataMapper.html) pattern for persistence.\n* Use [CQRS](https://martinfowler.com/bliki/CQRS.html) pattern to separate the read model and write model.\n\nAnd the code is organized as this:\n\n1. `api` is the web layer implemented by Spring MVC\n2. `core` is the business model including entities and services\n3. `application` is the high-level services for querying the data transfer objects\n4. `infrastructure`  contains all the implementation classes as the technique details\n\n# Security\n\nIntegration with Spring Security and add other filter for jwt token process.\n\nThe secret key is stored in `application.properties`.\n\n# Database\n\nIt uses a ~~H2 in-memory database~~ sqlite database (for easy local test without losing test data after every restart), can be changed easily in the `application.properties` for any other database.\n\n# Getting started\n\nYou'll need Java 11 installed.\n\n    ./gradlew bootRun\n\nTo test that it works, open a browser tab at http://localhost:8080/tags .  \nAlternatively, you can run\n\n    curl http://localhost:8080/tags\n\n# Try it out with [Docker](https://www.docker.com/)\n\nYou'll need Docker installed.\n\t\n    ./gradlew bootBuildImage --imageName spring-boot-realworld-example-app\n    docker run -p 8081:8080 spring-boot-realworld-example-app\n\n# Try it out with a RealWorld frontend\n\nThe entry point address of the backend API is at http://localhost:8080, **not** http://localhost:8080/api as some of the frontend documentation suggests.\n\n# Run test\n\nThe repository contains a lot of test cases to cover both api test and repository test.\n\n    ./gradlew test\n\n# Code format\n\nUse spotless for code format.\n\n    ./gradlew spotlessJavaApply\n\n# Help\n\nPlease fork and PR to improve the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgothinkster%2Fspring-boot-realworld-example-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgothinkster%2Fspring-boot-realworld-example-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgothinkster%2Fspring-boot-realworld-example-app/lists"}