create account

Open sourcing HapRamp Alpha web app and adding Travis CI by singhpratyush

View this thread on: hive.blogpeakd.comecency.com
· @singhpratyush · (edited)
$131.62
Open sourcing HapRamp Alpha web app and adding Travis CI
#### Repository

HapRamp Alpha Web App - https://github.com/hapramp/alpha-web

### About
[Hapramp](https://hapramp.com/) is a Steem based Social Media platform which rewards cryptocurrency for posting your work which is valuable to the community.

In this post, I am introducing the Alpha Web app for the platform.

#### Technology
The web app uses [`React`](https://reactjs.org/) as the base UI library. Bootstrapped with [Create React App](https://github.com/facebook/create-react-app), it uses many other popular JS libraries such as [`redux`](https://redux.js.org/), [`react-router`](https://reacttraining.com/react-router/), [`lodash`](https://lodash.com/), etc.

You can find the full list of dependencies in project's [`package.json`](https://github.com/hapramp/alpha-web/blob/master/package.json) file.

#### Features
The web app is under rapid development and new features are added every day. Some of the current features are - 
- Authorization using user's username and private posting key.
- Seeing the posts from all users that are in the following list of the current user.
- Rating a post out of 5 (5 being best).
- Replying to a post.
- Seeing hot/latest/trending posts from all communities.
- Visiting a user's profile and seeing all their posts, communities and more.
- Following/Unfollowing a user.

#### Screenshots

Here are a few screenshots from the web app containing real data from the blockchain - 

##### User Feed
![User feed.png](https://ipfs.busy.org/ipfs/QmStBTj1FM9jyW7G33yarVDQ2xg57JfV4JHXoj17jwkr2g)

##### User Profile
![User profile.png](https://ipfs.busy.org/ipfs/QmQNntnPc4YnWA1XVhbJM7MXQ1f4MDV8m2F478XQ7RRDsc)

##### Single Post
![Full post.png](https://ipfs.busy.org/ipfs/Qmdt7R35idw2MpD6znv6uHtHztX1LNfjD7QFwJdH8qPvj3)

##### Post with embedded YouTube Video
![Post with embedded youtube video.png](https://ipfs.busy.org/ipfs/QmdjCAZjEqVc56vy8vt49yWbj44sv5VTZPf3Luw749gLmo)


##### Single Article
![article full view.png](https://ipfs.busy.org/ipfs/QmUjDyjpcNJKycQf8k8fregGquCJaWkUtc5S1zHRdGSvXx)


### Travis-CI Integration

The first thing that I did after putting the code open source is introducing Travis CI. Before this, the project used Gitlab CI.

I had to consider the following before writing the travis configuration - 
- I had to use `node@9.8.0` for builds.
- Yarn had to be used as package manager.
- We had to store `node_modules` and yarn related file to cache.
- We had to prepare the optimized build and run tests with CI.

To achieve this, the following configurations were used - 
```yml
language: node_js
node_js:
  - 9.8.0
cache:
  yarn: true
  directories:
  - node_modules
script:
  - yarn build
  - yarn test
```
[See [.travis.yml](https://github.com/hapramp/alpha-web/blob/master/.travis.yml)]

Here is a screenshot of the successful build of [`hapramp/alpha-web` on Travis](https://travis-ci.org/hapramp/alpha-web/) -
![travis build.png](https://ipfs.busy.org/ipfs/QmWfvra3pSYRx7MaewJyLLQ8D4LZucc56WfkVYvZ3ozwtv)

Check out the commit on Github - https://github.com/hapramp/alpha-web/commit/b1fddc32685c30df6c96b1162db8d6fe4e5776a0.

### Roadmap
We're planning to make the first public alpha release within 2 weeks now, so stay tuned.

### How to contribute?
You can contribute to the project in many ways, the easiest being [opening an issue](https://github.com/hapramp/alpha-web/issues/new) for reporting a bug or making a feature request. If you are an open source developer, you can create pull requests to improve the app.

#### Github Account
https://github.com/singhpratyush
πŸ‘  , , , , , , , , , , , , , , , , , , ,
properties (23)
authorsinghpratyush
permlinkopen-sourcing-hapramp-alpha-web-app-and-adding-travis-ci
categoryutopian-io
json_metadata{"community":"busy","app":"busy/2.4.0","format":"markdown","tags":["utopian-io","development","steem","technology","hapramp"],"links":["https://github.com/hapramp/alpha-web","https://hapramp.com/","https://reactjs.org/","https://github.com/facebook/create-react-app","https://redux.js.org/","https://reacttraining.com/react-router/","https://lodash.com/","https://github.com/hapramp/alpha-web/blob/master/package.json","https://github.com/hapramp/alpha-web/blob/master/.travis.yml","https://travis-ci.org/hapramp/alpha-web/"],"image":["https://ipfs.busy.org/ipfs/QmStBTj1FM9jyW7G33yarVDQ2xg57JfV4JHXoj17jwkr2g","https://ipfs.busy.org/ipfs/QmQNntnPc4YnWA1XVhbJM7MXQ1f4MDV8m2F478XQ7RRDsc","https://ipfs.busy.org/ipfs/Qmdt7R35idw2MpD6znv6uHtHztX1LNfjD7QFwJdH8qPvj3","https://ipfs.busy.org/ipfs/QmdjCAZjEqVc56vy8vt49yWbj44sv5VTZPf3Luw749gLmo","https://ipfs.busy.org/ipfs/QmUjDyjpcNJKycQf8k8fregGquCJaWkUtc5S1zHRdGSvXx","https://ipfs.busy.org/ipfs/QmWfvra3pSYRx7MaewJyLLQ8D4LZucc56WfkVYvZ3ozwtv"],"users":["9.8.0"]}
created2018-06-04 08:15:09
last_update2018-06-04 08:33:18
depth0
children6
last_payout2018-06-11 08:15:09
cashout_time1969-12-31 23:59:59
total_payout_value98.980 HBD
curator_payout_value32.642 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,549
author_reputation7,035,648,262,478
root_title"Open sourcing HapRamp Alpha web app and adding Travis CI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id59,168,325
net_rshares36,333,028,944,923
author_curate_reward""
vote details (20)
@gregory.latinier ·
$7.08
So another project displaying the blockchain content. My big question here is what do offer that is different from Steemit or Busy ? How do you enhance the Steem user experience ?

Some features are missing and will certainly prevent users from using your app like server side rendering. When people share steemit or busy posts, the first image and a text extract are displayed. You don't support multilanguage.

Here are some advice for your development.

I see that you've organized your app with a flat structure. An actions, a reducers and a components folder. This is not really a good idea as your application will grow you will have a lot of files in this folders and it will be more and more difficult to develop. You should consider separating your app by components.

You should better organize your package.json. For instance `webpack` packages belong to the `devDependencies`.

And now some things that I really don't like I raise a big flag !!! Do not use this application while this is not changed.

https://github.com/hapramp/alpha-web/blob/b3edaa6773e8df033e44a8dbf26ad347dd30e366/src/reducers/loginReducer.js#L23 => your are STORING THE POSTING KEY ON LOCALSTORAGE !!! This is really really really problematic. What happens if a user browse your website on a public computer ? His posting key could be stolen !!! This is why SteemConnect have been created,  to ensure that some bad things like that aren't happening.

https://github.com/hapramp/alpha-web/blob/master/src/actions/loginActions.js#L43-L53 => What the hell are you doing ??? Why are you posting a comment using the user's account and then delete it afterwards ? You are doing an action without the users knowledge.

So there is some work and I think it deserve an utopian vote. But given the quality of the login I advise Steem users to stay away from this app. Wait for some changes.

Good luck for your future developments

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2312224).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , ,
properties (23)
authorgregory.latinier
permlinkre-singhpratyush-open-sourcing-hapramp-alpha-web-app-and-adding-travis-ci-20180605t074524854z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://github.com/hapramp/alpha-web/blob/b3edaa6773e8df033e44a8dbf26ad347dd30e366/src/reducers/loginReducer.js#L23","https://github.com/hapramp/alpha-web/blob/master/src/actions/loginActions.js#L43-L53","https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2312224","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-06-05 07:45:24
last_update2018-06-05 07:45:24
depth1
children2
last_payout2018-06-12 07:45:24
cashout_time1969-12-31 23:59:59
total_payout_value6.447 HBD
curator_payout_value0.629 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,395
author_reputation34,278,323,818,021
root_title"Open sourcing HapRamp Alpha web app and adding Travis CI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,334,128
net_rshares2,148,945,171,061
author_curate_reward""
vote details (7)
@singhpratyush ·
Hi @gregory.latinier, thanks a lot for the time you spent on this deep analysis of the app.

We are still developing the application and improving it day by day. We are well aware of the problems that you mentioned and that's why we haven't released it for public use yet.

---
> I see that you've organized your app with a flat structure.

Yes, the structure at the moment is flat and we need to change it. When I started working on the project, I wasn't good at React and I'm still learning it. We hope that making the project open source helps us increase the quality of code in the project.

> You should consider separating your app by components.

This is certainly true and is being acted upon by us.

---

The login flow (the one with an automatic user comment) that we used and `localstorage` are certainly not good. We were just experimenting things a long time ago (sometime in Feb 2018). But we have lined up SteemConnect integration in our development timeline and will start working on it soon.

---

I request you to go through [this](https://busy.org/@hapramp/introducing-hapramp-project-a-steem-based-social-network-from-india-for-creative-communities) blog post and let us know what you think. I hope this would resolve some of the queries that you pointed out in the beginning.

--- 

Based on your comment, I have created a [few issues](https://github.com/hapramp/alpha-web/issues) on Github. We request you to report more issues as it would help us explore more priority action points.

---

Finally, I would like to thank you a lot on behalf of the whole team for this feedback. The Utopian community is really great and we are overwhelmed with such support and response from it.  We are working hard to make more contributions to the open source community and Steem ecosystem.

--
Pratyush
properties (22)
authorsinghpratyush
permlinkre-gregorylatinier-re-singhpratyush-open-sourcing-hapramp-alpha-web-app-and-adding-travis-ci-20180605t093627249z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"busy","app":"busy/2.4.0"}
created2018-06-05 09:36:30
last_update2018-06-05 09:36:30
depth2
children0
last_payout2018-06-12 09:36:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,812
author_reputation7,035,648,262,478
root_title"Open sourcing HapRamp Alpha web app and adding Travis CI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,345,871
net_rshares0
@utopian-io ·
Hey @gregory.latinier
Here's a tip for your valuable feedback! @Utopian-io loves and incentivises informative comments.

**Contributing on Utopian**
Learn how to contribute on <a href="https://join.utopian.io">our website</a>.

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlink20180605t075112645z
categoryutopian-io
json_metadata{"tags":["utopian.tip"],"app":"utopian-io"}
created2018-06-05 07:51:12
last_update2018-06-05 07:51:12
depth2
children0
last_payout2018-06-12 07:51:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length416
author_reputation152,955,367,999,756
root_title"Open sourcing HapRamp Alpha web app and adding Travis CI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,334,734
net_rshares0
@qubadov ·
like this )) good job ))
πŸ‘  
properties (23)
authorqubadov
permlinkre-singhpratyush-open-sourcing-hapramp-alpha-web-app-and-adding-travis-ci-20180605t112108786z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-06-05 11:21:09
last_update2018-06-05 11:21:09
depth1
children0
last_payout2018-06-12 11:21:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length24
author_reputation641,113,393
root_title"Open sourcing HapRamp Alpha web app and adding Travis CI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,357,170
net_rshares208,484,924
author_curate_reward""
vote details (1)
@resteemsupport ·
Hello singhpratyush!

Congratulations! This post has been randomly Resteemed! For a chance to get more of your content resteemed join the [Steem Engine Team](https://steemit.com/steemit/@steemengineteam/join-steemengine-today)
πŸ‘  
properties (23)
authorresteemsupport
permlinkre-open-sourcing-hapramp-alpha-web-app-and-adding-travis-ci-20180604t082008
categoryutopian-io
json_metadata""
created2018-06-04 08:20:18
last_update2018-06-04 08:20:18
depth1
children0
last_payout2018-06-11 08:20:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length226
author_reputation-6,530,562,082,764
root_title"Open sourcing HapRamp Alpha web app and adding Travis CI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,168,927
net_rshares235,068,121
author_curate_reward""
vote details (1)
@utopian-io ·
Hey @singhpratyush
**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Contributing on Utopian**
Learn how to contribute on <a href='https://join.utopian.io'>our website</a> or by watching <a href='https://www.youtube.com/watch?v=8S1AtrzYY1Q'>this tutorial</a> on Youtube.

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
πŸ‘  
properties (23)
authorutopian-io
permlinkre-open-sourcing-hapramp-alpha-web-app-and-adding-travis-ci-20180605t082008z
categoryutopian-io
json_metadata"{"app": "beem/0.19.29"}"
created2018-06-05 08:20:09
last_update2018-06-05 08:20:09
depth1
children0
last_payout2018-06-12 08:20:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length510
author_reputation152,955,367,999,756
root_title"Open sourcing HapRamp Alpha web app and adding Travis CI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,337,862
net_rshares600,927,136
author_curate_reward""
vote details (1)