{"id":14977558,"url":"https://github.com/tommycpp/athena","last_synced_at":"2025-08-10T10:03:43.626Z","repository":{"id":53538640,"uuid":"90213196","full_name":"TommyCpp/Athena","owner":"TommyCpp","description":":books: Spring Framework and RESTful API based Library Management System 基于Spring系列框架的图书馆管理系统","archived":false,"fork":false,"pushed_at":"2024-02-02T06:00:46.000Z","size":2994,"stargazers_count":18,"open_issues_count":20,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-01T23:07:13.974Z","etag":null,"topics":["angular","library-management-system","restful","spring-boot","spring-data-jpa","spring-framework","spring-mvc","spring-security"],"latest_commit_sha":null,"homepage":"","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/TommyCpp.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":"2017-05-04T02:30:55.000Z","updated_at":"2025-03-02T03:56:15.000Z","dependencies_parsed_at":"2024-09-18T22:05:56.591Z","dependency_job_id":"5ca444f9-0f8b-40b6-9bab-d64e5f53867f","html_url":"https://github.com/TommyCpp/Athena","commit_stats":{"total_commits":412,"total_committers":3,"mean_commits":"137.33333333333334","dds":0.2645631067961165,"last_synced_commit":"61d3f04fd3731c90a2c499afee4e946ebd2de316"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TommyCpp/Athena","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyCpp%2FAthena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyCpp%2FAthena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyCpp%2FAthena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyCpp%2FAthena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TommyCpp","download_url":"https://codeload.github.com/TommyCpp/Athena/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyCpp%2FAthena/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269706661,"owners_count":24462207,"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-08-10T02:00:08.965Z","response_time":71,"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":["angular","library-management-system","restful","spring-boot","spring-data-jpa","spring-framework","spring-mvc","spring-security"],"created_at":"2024-09-24T13:55:54.462Z","updated_at":"2025-08-10T10:03:43.580Z","avatar_url":"https://github.com/TommyCpp.png","language":"Java","readme":"# Athena\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/21467d5fe5e04162accce3d650b1b533)](https://www.codacy.com/app/a444529216/Athena?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=TommyCpp/Athena\u0026amp;utm_campaign=Badge_Grade)\n\n[Chinese Version / 中文版](https://github.com/TommyCpp/Athena/tree/master/doc/README.md)\n\n\nLibrary Management System based on Spring Framework and RESTful API\n\nCurrently, the Athena Project contains following components:\n\n* A RESTful API  `/src/main/java`\n* A WeChat Application `/src/main/javascript`\n* A frontend based on Angular `/src/main/typescript`\n\nMore components like *the Android application* will be included in future\n\nThis is project is inspired by the question from [here](http://www.cnsoftbei.com/bencandy.php?fid=148\u0026aid=1532)\n\n## Feature\n* Manage different kinds of publication from book, journal to audio and more\n* Configurable from config file\n* Test Driven Development\n* RESTful API\n* Angular as front-end framework\n* JWT \n\n\n## Install \u0026 Preparation\n### Setup database\nUse .sql file `/src/resource/database.sql` to setup the database.\n\n### Add config file\nTo install the application, first need to create some config file in resources\n\nOr you can copy the key in `/src/main/java/resource/application.properties.example` and `src/main/java/resource/config.properties.example` , then create corresponding new config file\n* application.properties\n\n    \u003e Config MySQL\n\n    key | value\n    ----|------\n    spring.datasource.url | The url of datasource\n    spring.datasource.username | Username\n    spring.datasource.password | Password\n    spring.datasource.driverClassName | Drive class\n\n    \u003e Config Redis\n    \n    \u003e Spring Boot has configure most of the configuration for us. Table below lists the configuration that I changed. See [this document](https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html) to find all the auto-configuration that Spring Boot defined\n\n    key | value\n    ----|------\n    spring.redis.database| Index of the redis, default 0\n    spring.redis.host| Host of the redis, default localhost\n    spring.redis.port| Port of the redis, default 6379\n    spring.redis.password| Password of the redis\n\n    \u003e Config MongoDB\n\n    key | value\n    ----|------\n    spring.data.mongodb.host | Mongo server host\n    spring.data.mongodb.authentication-database | Authentication database name\n    spring.data.mongodb.username |Login user of the mongo server\n    spring.data.mongodb.password |Login password of the mongo server\n    spring.data.mongodb.database |Database name\n\n* config.properties\n\n    \u003e Config [JWT](http://jwt.io)\n\n    key | value\n    ----|------\n    security.token.key|The key of JWT Authentication\n    security.token.header | The key of JWT in HTTP header\n    security.token.prefix | The prefix of JWT\n    security.token.expirationtime | The expiration time of JWT\n\n    \u003e Config search param\n\n    key | value\n    ----| -----\n    search.default.count| The default value on how much result to return per page\n    search.limit.expiredtime | How long before reset the time that unauthenticated user\n    search.limit.prefix | The prefix added to the remote address of the request when stored and queried in Redis\n    search.limit.get.times | How much get request can perform for unauthenticated user within expired time\n\n\n    \u003e Config url\n\n\n    key | value\n    ----| ----\n    web.url| the whole url prefix of project. e.g `http://localhost:8080/api/v1`\n    web.url.prefix| the url without protocol host and port e.g `/api/v1`\n    \n    \n    \u003e Config Privilege\n    \n    \n    key | value\n    ----| -----\n    privilege.sequence | The sequence that denote the importance of privilege.\n\n\n\n\n### Install required library\nRun following command in command line to install library by maven `mvn`\n\nThe following dependencies are required by Athena, you can also find them in the `pom.xml`\n\n* Spring Boot Starter\n    * spring-boot-starter-data-redis\n    * spring-boot-starter-data-jpa\n    * spring-boot-starter-web\n    * spring-boot-starter-security\n    * spring-boot-starter-data-mongodb\n* Mysql Connector\n* Apache Common\n* Jpinyin\n* Jjwt\n* Springfox Swagger2\n\nThe dependencies below are required for test\n\n* DBUnit\n* Spring Security Test\n  \u003e Note that the spring security does not contain some of useful component such as @WithMockUser\n* Kotlin Stdlib Jre8\n* Kotlin Test\n  \u003e Athena will use *Kotlin* for test\n* Fongo\n* NoSqlUnit\n\n\n## Start\nFirst, start the test databases by docker:\n```shell\ndocker-compose up -d\n```\nTo run the application, use\n```shell\nmvn spring-boot:run\n```\n\n\n## API\nTo access the api documentation,\nfirst run the application and then access the\n```\nhttp://localhost:8080/swagger-ui.html#/\n```\n\n## Exception Check List\nAmong the Athena, we may encounter different kind of exceptions. The Http standard status code(like 401,400) may not be enough. Thus, we introduce some custom status code which will be include in the response body when exception happens.\n\n\ncode | meaning\n-----|--------\n***400***|**BadRequest**\n4001 | Invalid Copy type\n4002 | Illegal entity attribute\n4003 | Illegal borrow request\n4004 | Illegal return request\n4005 | Unsupported Params\n***401*** | **Unauthorized**\n4010 | Unauthorized\n4011 | JWT token is expired\n4012 | JWT token uses an unsupported algorithm\n4013 | Malformed JWT token\n4014 | JWT token's signature is not supported\n***403***|**Forbidden**\n4031 | Cannot delete certain resource because some other resource is not deletable now.\n4032 | Current logged in user does not have enough permission to perform operation.\n***404*** | **Not Found**\n4040 | Resource not found\n4041 | Resource not found because the provided id is not exist\n40411| Copy cannot be stored because correspond book does not exist\n***429***| **Too Many Requests**\n4290 | Too many requests\n4291 | Too many requests for search\n***500***| **Server Error**\n5001| Error regarding database connection or repository\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommycpp%2Fathena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommycpp%2Fathena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommycpp%2Fathena/lists"}