Code Monkey home page Code Monkey logo

harpers's Introduction

Harpers

Installation

  1. Import database by .sql file in /db.

  2. Update database configuration in /src/common/config/db.js.

// step1: 
mysql -u root -p 

// step2: 
create database harpers;

// step3:
exit;

// step4:
cd db
mysql -uroot -p harpers < harpers_2017-02-09.sql

  1. Set github login auth key in /src/common/env/development.js.

    Github redirect uri will like xxx.com/api/user?_method=post&type=github.

// step1:
https://github.com/settings/applications/new

// step2: 
Application name: harpers
Homepage URL: http://localhost
Authorization callback URL: http://local.webpack-china.org/api/user?_method=post&type=github

// step3:
fill Client ID and Client Secret and redirect_uri (Authorization callback URL) in `/src/common/env/development.js`.
  1. Run npm start, open http://local.webpack-china.org:9000/

  2. Visit http://local.webpack-china.org:9000/api/user?_method=post&type=github to login

API Documentation

Open xxx.com/doc/index.html, like http://local.webpack-china.org/doc/index.html

Contribution

License

harpers's People

Contributors

akira-cn avatar dear-lizhihua avatar hzuhyb avatar lcxfs1991 avatar lizheming avatar lzhfe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

harpers's Issues

首页

在sketch文件 - home

功能列表

Harpers

一期功能列表

国际化

  • /zh-cn/…… 中文(默认)
  • /en-us/…… 英文

Home

问答社区

问答

  • /question/:id
  • /question/new 提问
  • /question/:id/save 提交/更新问题
  • /question/:id/answer/:id
  • /question/:id/answer/:id/new 回答
  • /question/:id/answer/:id/save 提交/更新回答
  • /question/:id/[answer/:id/]comment/new 发表评论
  • /question/:id/[answer/:id/]comment/:id/save 提交/更新评论

话题

问答的 tag 聚合

  • /topic/:id

  • /user/:id
  • /user/:id/timeline 用户动态
  • /user/:id/profile 用户信息
  • /user/:id/settings 用户设置
  • /user/:id/follow 关注/取消关注

消息

  • /notice 系统消息
  • /timeline 动态(自己的和关注人的)

其他功能

  • /search 搜索(问题/回答/用户/话题等等)

Admin

系统管理后台

  • /admin/dashboard
  • /admin/question
  • /admin/answer
  • /admin/tag
  • /admin/topic
  • /admin/user
  • /admin/notice
  • /admin/timeline
  • /admin/settings

表结构设计讨论

harpers 表结构设计:

  • user 用户表
    • id 用户 id
    • name 用户名称
    • nickname 用户昵称
    • password 密码
    • type 用户类型(0普通,1管理员)
    • email 用户邮箱
    • status 用户状态(0正常,1禁用)
    • github 用户 github 账号
    • follow_count 用户关注数
    • follower_count 用户粉丝数
    • question_count 用户问题数
    • answer_count 用户答案数
    • create_time 创建时间
    • create_ip 创建 ip
    • last_login_time 上一次登陆时间
    • last_login_ip 上一次登陆 ip
  • question 问题表
    • id 问题 id
    • user_id 用户 id
    • markdown_content 问题内容 markdown
    • content 问题内容 html
    • status 问题状态(0 正常,1 关闭回答,2 审核中,3 审核失败,4 隐藏, 5 被举报)
    • agree_count 同意数
    • against_count 反对数
    • comment_count 评论数
    • create_time 创建时间
    • update_time 更新时间
  • answer 答案表
    • id 回答id
    • user_id 用户id
    • question_id 问题id
    • markdown_conetnt 答案内容 markdown
    • content 答案内容 html
    • status 答案状态(0 正常,1 被折叠,2 被举报)
    • agree_count 同意数
    • against_count 反对数
    • comment_count 评论数
    • create_time 创建时间
    • update_time 更新时间
  • comment 评论表
    • id 评论 id
    • user_id 评论作者 id
    • parent_id 父评论 id
    • question_id 评论对应问题 id
    • answer_id 评论对应答案 id
    • markdown_content 评论内容 markdown
    • content 评论内容 html
    • agree_count 赞数
    • against_count 踩数
    • create_time 创建时间
    • update_time 更新时间
  • tag 标签表
    • id 标签 id
    • name 标签名称
    • pathname 标签 url (默认=name)
    • description 标签描述
  • question_answer_log 问题答案版本记录表
    • id 版本记录 id
    • user_id 当前版本创建用户 id
    • question_id 版本记录对应问题 id
    • answer_id 版本记录答案 id
    • markdown_content 当前版本的内容
    • create_time 当前版本创建时间
  • operation_log 用户操作记录表
    • id 操作 id
    • user_id 操作用户
    • question_id 问题 id
    • answer_id 答案 id
    • op_name 操作名称
    • op_value 操作值
  • repot 举报表
    • id 举报数据 id
    • user_id 举报用户
    • question_id 举报问题 id
    • answer_id 举报答案 id
    • reason 举报原因
    • result 处理结果
    • operator_id 处理人
  • question_tag 问题标签关系表
    • id 关系id
    • question_id 问题 id
    • tag_id 标签 id
  • follow 用户关注表
    • id 关系 id
    • user_id 关注者 id
    • follow_id 被关注 id
  • options 网站配置信息表
    • site_key 配置键
    • site_value 配置值
    • site_desc 配置描述

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.