在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:simple-bbs开源软件地址:https://gitee.com/greenlaw110/simple-bbs开源软件介绍:Simple BBSLive demo sitehttp://simple-bbs.actframework.org BackgroundThe project is created to finish the coding challenge I've raised to @AutoPlus. I've also use this project to demonstrate on the following features of ActFramework:
Known issuesSee https://git.oschina.net/greenlaw110/simple-bbs/issues Requirement1 It shall allow user to register/login to the system through Github oauth service2 It shall be able to display user's github profile3 It shall allow user to publish a message4 The message must have the following fields
5 It shall be able to display a message detail including title, body, author and time6 It shall display message list7 It shall allow author to edit message including title and body8 It shall allow author to delete message he/she published non-functional requirements
Platform and DatabaseYou must have MongoDB, JDK7+ and the corresponding JCE installed in order to play with this project. You must install maven to build the application Build/Run/DeployTo build and run the app locally mvn clean compile exec:exec This will start the app in actframework default port: 5460 To build package for deployment mvn clean package This will generate a distribution package in To run the distribution package, unzip it and type Note about Github applicationThis app require user to authenticate through GitHub OAuth service. Thus you must register your Github app. Callback URLAny OAuth app requrie the app owner to provide a callback URL. You must make sure your callback URL looks like: http://<my-domain>/~/social/callback?provider=github Once you registered the github application, you need to open More about running locallySince Github allows only one callback URL, if you registered a callback URL for live demo site (like me) then it needs to do some tricks in order to get the app running on local box:
127.0.0.1 localhost simple-bbs.actframework.org ExtraThis project provides some extra functions in addition to the requirements stated above Authentication/Authorisation/AuditingThis app demonstrate how to use act-aaa to implement Authentication/Authorization/Auditing. When user post new message or update existing message, the app will audit the action into > use bbsswitched to db bbs> db.audit.find().pretty(){ "_id" : ObjectId("58c4b2daaa5dcb61026fe597"), "className" : "simple_bbs.model.Audit", "target" : "simple_bbs.model.Message[]", "principal" : "[email protected]", "success" : true, "permission" : "update", "_created" : NumberLong("1489285850015"), "_modified" : NumberLong("1489285850015"), "v" : NumberLong(1)}{ "_id" : ObjectId("58c4b2deaa5dcb61026fe598"), "className" : "simple_bbs.model.Audit", "target" : "simple_bbs.model.Message[]", "principal" : "[email protected]", "success" : true, "permission" : "update", "_created" : NumberLong("1489285854817"), "_modified" : NumberLong("1489285854817"), "v" : NumberLong(1)}{ "_id" : ObjectId("58c4b2e7aa5dcb61026fe599"), "className" : "simple_bbs.model.Audit", Adding test dataThis app provides a console command allow you to add test data. Before you start generating test data. Make sure you have at least one user in the system by open your browser navigating to the app and click on Run __ ___ _ _ _ _ __ (_ | |\/| |_) | |_ |_) |_) (_ __) _|_ | | | |_ |_ |_) |_) __) powered by ActFramework v1.1.0-f544 version: ${project.version}scan pkg: simple_bbsbase dir: /home/luog/p/greenlaw110/simple-bbs pid: 29282 profile: dev mode: DEV zen: If the implementation is hard to explain, it's a bad idea.Simple BBS[2k9b0dZP]> Type Simple BBS[2k9b0dZP]>help -ahelp -aAPPLICATION COMMANDSdata.gen - Generate test data Type Simple BBS[2k9b0dZP]>data.gen -hdata.gen -hUsage: data.genGenerate test dataOptions: -n,--n Number of record to be generatedShortcuts: .dg, d.g, d.gen, data.g, da.ge Now suppose you want to generate 30 posts, type Simple BBS[2k9b0dZP]>data.gen -n 30data.gen -n 30Test data generatedSimple BBS[2k9b0dZP]> You will get the data generated. LOC statisticsluog@luog-Satellite-P50-A:~/p/greenlaw110/simple-bbs$ loc src-------------------------------------------------------------------------------- Language Files Lines Blank Comment Code-------------------------------------------------------------------------------- Java 9 395 71 43 281 HTML 5 269 24 0 245 XML 2 133 21 20 92 JavaScript 3 85 7 2 76 Batch 2 14 0 0 14 YAML 1 15 3 0 12 CSS 1 3 0 0 3-------------------------------------------------------------------------------- Total 23 914 126 65 723--------------------------------------------------------------------------------``` Should you have any questions, please comment below or submit an issue. |
请发表评论