Giter VIP home page Giter VIP logo

poplar's Introduction

Poplar

Poplar

Poplar is a social networking application written by React Native, backend is implemented based on microservice architecture. I choose MySQL and Redis as persistent and cache solution. The focus of Poplar is on social and interest, enables you to build a social theme application on Poplar quickly.

2.0 brings the following updates:

  • More unified UI style

  • Upgrade React from 15.3.2 to 16.0.0

  • Upgrade React Native from 0.36.1 to 0.50.4

  • Change to React Navigation

  • Using react-redux manage application status

  • Move Spring/Spring MVC 3.X to Spring Boot 1.5.13

  • Micro service resolution

show

Install Poplar

git clone https://github.com/lvwangbeta/Poplar.git 
cd Poplar/poplar-app && npm install
react-native link

double click ios/Poplar.xcodeproj run it directly from Xcode

App Configue

edit /App/api/URLConf.js to configue backend server url and image server address.

Example:

  • Application server

    const APP_SERVER_HOST = 'http://127.0.0.1:8080';
  • Image server address, upload and download images. Follow qiniu-sdk to configue qiniu image storage.

    const IMG_BASE_URL = 'http://ogj1ador4.bkt.clouddn.com/'; 

Server Configue

NOTE: Make sure you have installed Maven and Docker

cd Poplar && ./build.sh

Introduction

framework

Dependencies

react-native-image-crop-picker
react-native-keyboard-spacer
react-native-navbar
react-native-parallax-scroll-view
react-native-photo-view
react-native-qiniu
react-native-scrollable-tab-view
react-native-swiper
react-native-tab-navigator
react-native-wechat

License MIT

poplar's People

Contributors

lvwangbeta 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  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  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  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  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

poplar's Issues

API文档在哪里可以看?

SOUL 用了Poplar,我看运营的还不错

以下URL,最好能整理一个API文档,这样我们可以重写一个服务端...对JSP不熟悉啊
const API_BASE = APP_SERVER_HOST + '/com.lvwang.osf/api';
const COMMENT_URL = URLConf.API_HOST + '/comment/';
const COMMENT_CREATE_URL = COMMENT_URL + '/create';
url: basePath + '/comment/create',
var url = basePath+"/like";
url += '/undo' 已经喜欢 点击取消喜欢
var url=basePath+'/tag/'+tag_id;
/tag/${tag.id }
url: basePath + '/tag/'+tag_id+'/'+action,
url = basePath + '/tag/'+tag_id+'/interest';
/tag/${id}/page/2
url: basePath + '/explore/page/'+page_num,
/user/${popuser.id }
url = basePath + '/follow/'+following_user_id;
url = basePath + '/follow/undo/'+following_user_id;
const NOTIFY_URL = URLConf.API_HOST + '/notify/all';
const FEED_URL = URLConf.API_HOST + '/timeline/';
const NEW_FEED_URL = FEED_URL + 'new';
/search/feed?term=${term }
/search/tag
const TAG_FEED_URL = URLConf.API_HOST + '/tag/';
const LOGIN_URL = URLConf.API_HOST + '/account/login';
url: basePath+'/account/login',

const LOGOUT_URL = URLConf.API_HOST + '/account/logout';
url: basePath + '/guide/ok',
/search/feed
/search/feed?term=${term }
url:basePath+"/account/resetpwd",
url: basePath + '/post/create',
url: basePath + '/spost/create',
url: basePath + '/account/activation/mail/resend?email='+email,

/user/${comment.comment_author }
url: basePath + '/account/setting/info',

/followings
/followers
/search/user
/user/${u.id }
/user/${feed.user_id }
url += '/do';
/album/upload
/notifications/comment
/notifications/like
/user/${comment.comment_author }
/post/${event.object_id }
var url = path+'?ts=123456&sign=' + sign;
/account/setting/info 个人信息
/account/setting/avatar 头像

url: basePath+'/album/upload/photo',
url: basePath+'/album/upload/avatar',
var COMMENT_URL = 'http://localhost:8080/com.lvwang.osf/api/v1/comment/';
/user/${u.id }
url: basePath+'/account/register',
const REGISTER_URL = URLConf.API_HOST + '/account/register';
var activationUrl = basePath + '/account/activation/mail/send?email='+email;

var sign = Md5.hex_md5('/com.lvwang.osf/api/v1/comment/create?ts=123456&'+'osf');
var url = COMMENT_URL+'create?ts=123456&sign=' + sign;
var url = URLConf.API_HOST + '/account/check/email/';

运行 build.sh失败

我的服务端环境是
系统环境:centos7
Maven:
[root@localhost ~]# mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /opt/tyrone/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-693.el7.x86_64", arch: "amd64", family: "unix"

当我运行 build.sh时出现以下错误,请问是什么原因导致的

[root@localhost Poplar-master]# sh build.sh
Docker version 18.06.0-ce, build 0ffa825
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /opt/tyrone/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-693.el7.x86_64", arch: "amd64", family: "unix"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] poplar-common
[INFO] poplar
[INFO] poplar-api
[INFO] poplar-feed-service
[INFO] poplar-user-service
[INFO] poplar-action-service
[INFO] poplar-tag-service
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building poplar-common 2.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ poplar-common ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ poplar-common ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ poplar-common ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ poplar-common ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ poplar-common ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ poplar-common ---
[INFO]
[INFO] --- docker-maven-plugin:1.0.0:build (default-cli) @ poplar-common ---
[INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier]
[INFO] Skipping docker build
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building poplar 2.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.13.RELEASE:repackage (default) @ poplar ---
[INFO]
[INFO] --- docker-maven-plugin:1.0.0:build (default-cli) @ poplar ---
[INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] poplar-common ...................................... SUCCESS [ 28.995 s]
[INFO] poplar ............................................. FAILURE [ 2.841 s]
[INFO] poplar-api ......................................... SKIPPED
[INFO] poplar-feed-service ................................ SKIPPED
[INFO] poplar-user-service ................................ SKIPPED
[INFO] poplar-action-service .............................. SKIPPED
[INFO] poplar-tag-service ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.570 s
[INFO] Finished at: 2018-08-06T23:43:12+08:00
[INFO] Final Memory: 37M/90M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build (default-cli) on project poplar: Exception caught: basedir /root/Poplar-master/target does not exist -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :poplar
[ERROR] build failed.

Could not find com.github.yalantis:ucrop:2.2.1-native

PS D:\Projects\Test\Poplar\Poplar2\Poplar\poplar-app> react-native run-android
Scanning folders for symlinks in D:\Projects\Test\Poplar\Poplar2\Poplar\poplar-app\node_modules (61ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-image-crop-picker'.
> Could not resolve all dependencies for configuration ':react-native-image-crop-picker:_debugPublishCopy'.
> Could not find com.github.yalantis:ucrop:2.2.1-native.
Required by:
Poplar:react-native-image-crop-picker:unspecified

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 19.768 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

ParallaxScrollView 中 feedlist 不断加载onEndReached

ParallaxScrollView 中 FlatList 会不断加载onEndReached
请问您是怎么解决的呢?

    <FlatList
      isComment={this.state.isComment}
      keyExtractor={(item, index) => index.toString()}
      data={this.state.feeds}
      renderItem={(item) => this.renderFeed(item)}
      renderFooter={() => this.renderFooter()}
      onEndReached={() => this.onEndReached()}
      onEndReachedThreshold={0.01}
      refreshing={this.state.isRefreshing}
      onRefresh={() => this.onRefresh()}
      style={styles.listView}
    />

如果把onEndReachedThreshold设置成0将不会加载下一页

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.