Coder Social home page Coder Social logo

wahyd4 / libr Goto Github PK

View Code? Open in Web Editor NEW
27.0 7.0 11.0 10.8 MB

一个借阅书籍、分享书籍、展示书架、相关可视化数据展示的应用。(打开网站,有警告,关闭警告即可。Click 'cancel' if you see a popup)

Home Page: http://libr.herokuapp.com/

Ruby 84.94% CoffeeScript 0.02% JavaScript 5.89% CSS 9.15%
rails mobile ruby-on-rails sidekiq

libr's Introduction

Libr

基于图书与阅读的社交应用,目前主要focus 在移动客户端

Website:

Libr: http://librme.com

Build Status

Build Status Code Climate

如果在本地运行服务端应用

  • git clone 代码
  • 下载postgres 数据库软件(mac:http://postgresapp.com/
  • 进入代码目录,执行 bundle install 下载安装依赖
  • rails s 启动服务器
  • 如需支持导入豆瓣图书还需额外安装 redis 数据库(mac: brew install redis)
  • redis-server 启动redis
  • 进入项目目录并另外执行 bundle exec sidekiq (执行后台job,用于导入豆瓣图书)

移动平台客户端

更新日志

  • 2013.2.17 添加个人信息编辑,设置昵称、电子邮箱、所在城市
  • 2013.2.17 添加API KEY 为后期在微信上借书、查询等做准备
  • 2013.2.17 为图书列表添加分页功能
  • 2013.2.18 添加基本API:图书信息、用户信息、图书列表
  • 2013.2.18 添加Auth key 功能,用户可以生成自己的key
  • 2013.2.19 用户可以删除自己的key
  • 2013.2.21 添加图书搜索API
  • 2013.2.26 添加归还已经借阅图书的API
  • 2013.2.27 修改借书逻辑,由之前的系统自动查找合适人选,变为借书者自行选择合适的拥有书者。修改bookinfo API增加返回所有当前可借的实例信息
  • 2013.2.28 添加私有书籍选项,用户在添加书籍是可以设置书籍为私有书籍,私有书籍他人不可见,仅用户自己可见
  • 2013.3.11 添加用户书籍API
  • 2013.4.15 添加历史记录
  • 2013.4.16 开始添加微信公共账号feature
  • 2013.4.17 通过添加go_serv 微信公共账号,输入1 即可获取书籍信息。please give a try.
  • 2014.1.16 升级到Rails4,并为Libr 2做准备
  • 2014.1.17 开始Libr2, 引入Devise,重新加入用户注册等功能,原有功能基本以不能再使用了。
  • 2014.1.19 添加基于token的客户端API 授权,验证。方便在移动断进行调用。
  • 2014.1.23 取消通过API调用时的CROS 验证。
  • 2014.1.26 添加百度地图API,根据经纬度返回目前所在地址
  • 2014.2.7 添加用于客户端上传常用地址的API
  • 2014.2.9 添加显示用户所有上传的地址API
  • 2014.2.10 添加删除用户位置的API
  • 2014.2.12 更新添加图书API,获取更多的图书信息
  • 2014.2.13 显示用户的图书
  • 2014.2.17 修复通过网页添加图书的BUG
  • 2014.2.18 添加通过ISBN查询书籍详细信息的API
  • 2014.2.20 修复通过API 扫描ISBN 创建图书的问题
  • 2014.2.23 添加API获取更新书籍, 禁止用户创建重复的书籍
  • 2014.2.24 为图书添加可排序的ID字段
  • 2014.2.26 添加为用户推荐附近流行书API
  • 2014.2.27 添加为用户他最可能喜欢的书籍API
  • 2014.3.3 修复获取更新书籍的bug,为书籍添加评论和获取书籍的所有评论
  • 2014.3.5 修复查询书籍详情API
  • 2014.3.6 添加默认头像
  • 2014.3.7 注册时从gravatar获取用户邮箱的头像
  • 2014.3.10 为移动端更换新的首页
  • 2014.3.11 添加注册API
  • 2014.3.12 升级首页图片,减小尺寸
  • 2014.3.27 链接用户的豆瓣书籍
  • 2014.3.28 使用sidekiq 异步同步用户的豆瓣书籍
  • 2014.4.3 部署应用到Dokku 容器,不需要修改database.yml ,只需要在dokku 里面配置 DATABASE_URL 环境变量就可以了
  • 2014.4.10 由于豆瓣API的变动,导致jquery jsonp方式不再工作了,因此,在图书详情页面只使用了自带的一些图书属性。
  • 2014.4.11 让部分API变得更符合restful规范
  • 2014.4.13 返回用户绑定的豆瓣账号信息

JSON API使用指南

 编写中.......

Road map:

  • 移动客户端的支持,用户可以在手机上查找图书,通过扫描二维码添加图书。
  • 用户长时间借书未归还,自动提醒(邮件、微信?)
  • 微信查书?
  • 用户私有书架,用户可以选择不对外公开展示自己的书籍,只供自己查看。
  • 为用户添加 组织、地址标签,方便借书与分享书时,选择最优方案。
  • 用户可以创建书单,书单为一系列书的集合。如:java程序员必读的10本书。
  • 用户可以选择开始读某一书单。并可以看到自己读这一书单的进度,以及需要向那些人借书,以及看到有多少其他人已经读了这个书单等等统计。用户读完书单,可以发布感想。如果扯远来:有书单,也就可以有 各种进度、统计、勋章、虚拟奖励等等。
  • 各种深入的数据统计。如:某用户平均借书周期、哪段时间看书较多等等......
  • ....... 等你们来补充

License

    The MIT License (MIT)

Bitdeli Badge

libr's People

Contributors

bitdeli-chef avatar wahyd4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

libr's Issues

请问这个项目还在维护吗?我遇到了问题,不知道如何解决

我在安装了相关的依赖后,运行rails s,应用提示"PG::ConnectionBad", 错误堆栈如下:

PG::ConnectionBad (fe_sendauth: no password supplied
):
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `initialize'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `new'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `connect'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
  /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
  /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:87:in `connection'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/query_cache.rb:51:in `restore_query_cache_settings'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/query_cache.rb:43:in `rescue in call'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/query_cache.rb:32:in `call'
  vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:82:in `run_callbacks'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/reloader.rb:73:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:38:in `call_app'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `block in call'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:26:in `tagged'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:in `tagged'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.1.0/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/static.rb:64:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/engine.rb:514:in `call'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/application.rb:144:in `call'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `public_send'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `method_missing'
  vendor/bundle/ruby/2.3.0/gems/rack-1.5.2/lib/rack/deflater.rb:25:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
  vendor/bundle/ruby/2.3.0/gems/thin-1.6.2/lib/thin/connection.rb:86:in `block in pre_process'
  vendor/bundle/ruby/2.3.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `catch'
  vendor/bundle/ruby/2.3.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `pre_process'
  vendor/bundle/ruby/2.3.0/gems/thin-1.6.2/lib/thin/connection.rb:53:in `process'
  vendor/bundle/ruby/2.3.0/gems/thin-1.6.2/lib/thin/connection.rb:39:in `receive_data'
  vendor/bundle/ruby/2.3.0/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run_machine'
  vendor/bundle/ruby/2.3.0/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run'
  vendor/bundle/ruby/2.3.0/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
  vendor/bundle/ruby/2.3.0/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
  vendor/bundle/ruby/2.3.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:in `run'
  vendor/bundle/ruby/2.3.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/commands/server.rb:69:in `start'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
  vendor/bundle/ruby/2.3.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
  bin/rails:4:in `require'
  bin/rails:4:in `<main>'

从log分析应该是没有配置密码,但是我没有找到配置密码的地方,能够指导下,谢谢

请问如何添加图书?

是不是通过后台添加?如果是,那后台的默认密码是多少呢?

我登录到如下地址的后台,进去使用注册的用户名密码不能登录,报出以下错误:

登录地址:http://localhost:3000/admin/login

Can't mass-assign protected attributes for AdminUser: remember_me

Rails.root: /home/ts/githubPro/Libr

Application Trace | Framework Trace | Full Trace
Request

Parameters:

{"utf8"=>"✓",
 "authenticity_token"=>"TZmlgNw42ks/V5GniB30crHCrdW7UDS5KvVwccFy3Y1=",
 "admin_user"=>{"email"=>"[email protected]",
 "password"=>"[FILTERED]",
 "remember_me"=>"1"},
 "commit"=>"Login"}

修改部分API 接口

使得其更符合RESTFUL 接口标准,从而也可以部分解决客户端部分缓存问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.