Giter VIP home page Giter VIP logo

node-twitter's Introduction

Node Twitter

Build Status

Node twitter is an effort to rewrite some of Twitter's functionality using modern javascript based toolchain. It was mostly an effort to learn Node.js and trying to reverse engineer some of twitter's feature.

It has support for tweeting, commenting and following with analytics

You can support the development here by becoming a backer: https://opencollective.com/nodetwitter/

Prerequisites

You are required to have Node.js and MongoDB installed if you'd like to run the app locally.

Install sass and grunt too to compile the CSS files

sudo npm install -g grunt-cli
sudo npm install -g sass

The configuration is in config/config.js. Please create your own .env file. You can find an example of .env file in .env.example.

Create a github application and copy cliend id and secret to .env file:

GITHUB_CLIENT_SECRET="your_github_client_secret"
GITHUB_CLIENT_ID="your_github_client_id"

Usage via Docker

The fastest way to get this running is with docker. Docker bootstrap all dependencies and you can just run these couple of commands to get it up and running.

# first build the container
docker-compose --log-level DEBUG build

# then run the server and mongodb like this:

docker-compose up

Now, open the website on http://localhost:3000 and it should just work.

Before building Docker container change DB link to: mongodb://mongodb/ntwitter in .env file.

Usage

# First install all the project dependencies.
# run mongodb server
~/ mongod
~/node-twitter/ npm install
# Now run the app
~/node-twitter/ npm start

> [email protected] start ~/node-twitter
> node server.js

Express app started on port 3000

Contribute

Introduction

First, thank you for considering contributing to Node Twitter

! It's people like you that make the open source community such a great community! ๐Ÿ˜Š

We welcome any type of contribution, not only code. You can help with

  • QA: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
  • Marketing: writing blog posts, howto's, printing stickers, ...
  • Community: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
  • Code: take a look at the open issues. Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
  • Money: we welcome financial contributions in full transparency on our open collective.

Your First Contribution

Working on your first Pull Request? You can learn how from this free series, How to Contribute to an Open Source Project on GitHub.

Submitting code

Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.

Code review process

The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge. It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?

Financial contributions

We also welcome financial contributions in full transparency on our open collective. Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.

Questions

If you have any questions, create an issue (protip: do a quick search first to see if someone else didn't ask the same question before!). You can also reach us at [email protected]

Credits

Contributors

Thank you to all the people who have already contributed to node-twitter!

0 1 2 3 4 5 6 7

Backers

Thank you to all our backers! [Become a backer]

Sponsors

Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)

License

Apache License 2.0

FOSSA Status

Important

Twitter is a registered trademark of Twitter Inc. This project is just for learning purposes and should be treated as such.

node-twitter's People

Contributors

arshadkazmi42 avatar codingjwilliams avatar dependabot[bot] avatar fossabot avatar lgtm-migrator avatar monkeywithacupcake avatar robertcoopercode avatar samuelpinho avatar sergey48k avatar snyk-bot avatar thalkod avatar vinitkumar avatar yahilmadakiya 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

node-twitter's Issues

Design Profile Page

Design profile page:

  • Social Media flags based data presentation.
  • Nicely crafted user profile.
  • Give links to the user's profile on twitter, github and facebook.

Hacking - Sunday

  • Cleanup backend logic
  • Add twitter login
  • Write cleaner faster views.
  • Deploy latest to production.

Have tweet modal window appear on all pages

Currently, the tweet button is always in the navbar, but the modal can only be shown from the home page. We need to add the modal code to the right pug template in order for it to be globally accessible by all templates.

Improve UI

Following things could be improved to make UI better.

Landing Page

  • Better landing page and login option.

Home Page

  • Add font awesome to the project and add fonts in the place where it makes sense.

Left Sidebar

  • Add better profile
  • Add links to the project with important pages (License, creator, etc)

Tweet dashboard

  • Add creators profile picture.
  • Create timestamps as tweet links

Profile Link

  • Add user profile information.
  • Check the ability to create tweet from this screen.
  • Show a list of all tweets created by the user.

Set pagination

Currently there is no pagination for the tweets. Should be there.

Tweet edit broken after recent upgrades

@Engineering-Robert Seems like the tweet edit is broken after merging your code recently. We need to find the bug and fix it.

You seem to have done changes to templates and also to express.js in config and server.js. Seems like the bug has come in these commits.

Create follow and individual stream.

For Follow Users
Here is the checklist to be implemented

  • Add methods in the user model to get the followers when some sends a request to follow.
  • Two methods ๐Ÿ‘ one to follow and other to unfollow.
  • Add users to follower and following arrays when one follows another.
  • Add another user tweets to the stream of the user if he follows another user and vice versa.
    Working on stream

Expected features

The Expected features are:
For Dashboard:

  • Follow
  • Unfollow
  • Add twitter stream of those followed.
  • Favorite (Similar to like)

For User profile:

  • Name
  • Picture
  • Number of Tweets
  • Followers
  • Following
  • Own tweet Stream
  • Retweets

Build one to one messaging

Sample Model code

const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const MessageSchema = new Schema({
  message: { type: String, default: "", trim: true, maxlength: 200},
  sender: { type: Schema.ObjectId, ref: "User" },
  reciever: { type: Schema.ObjectId, ref: "User" }, 
  createdAt: { type: Date, default: Date.now },
});

So the idea here is that, we store the message, and time as well the users. And when you look at the chat window, it will basically find all chat between the sender and receiver.

Upgrade!

  • Cleanup code.
  • Upgrade to latest node
  • Deploy to Heroku.
  • Use free monogolab development sandbox.

Oversized page width on mobile

The page width goes beyond the viewport width on mobile devices. I suspect this has something to do with the header having responsiveness issues.

Remove Facebook & Twitter code

This functionality is no longer being used. We are only relying on Github authentication in order to log into the forum.

Reduce amount of pagination that shows

It would be nice to show the first few pages and as well as the last page in the pagination on the Analytics page. Right now, the pagination shows every single page, and it is taking up a lot of room.
I tried to look where the createPagination function was defined, but I couldn't find it anywhere! That is the function that is rendering the pagination in the Jade templates.

image

Responsive navbar

The navbar gets all jumbled up on smaller screen widths. This should also resolve issue #120.

Dashboard and Individual stream

Dashboard is the normal home page, these are the expected features.

  • User's tweets
  • Following's tweet
  • Add tweets to stream of new people with refresh

Individual stream, in users profile

  • show the number of tweets
  • Show the number of followers
  • Show the number of following
  • Show user's own tweet stream, sorted according to date.

Facebook and Twitter login functionality

I see there is some code related to retrieving information from Facebook and Twitter. I think it might be for user authentication purposes, but i'm not sure (haven't looked into it at all). I'm wondering if all the Facebook & Twitter code can be removed since it appears as though the only login method that shows up on the login screen is for Github.

@vinitkumar let me know about this.

Follow/unfollow button doesn't hold state

The button doesn't keep track of whether a user follows another person. It also doesn't allow you to unfollow someone. We need to use some sort of pug conditional that checks if the authenticated user already follows the req.user, with the option to unfollow the person.

Would also be good to update the styling of the button so that it has some good padding within the profile summary box.

NodeJS Hackathon

Project: Node Twitter

Features that could be worked upon:
Existing bugs:

  • Github Login
  • Add edit and delete option in the tweet.
  • Comment delete option need to be there.
  • Create a more detailed User interface.
  • Add time to the comment section.
  • Show the followers and following list.
  • Show individual tweet list.
  • Show User's dashboard and public dashboard.
  • Add image upload feature to via imgur API
  • Cleanup css and js, minify them for production.

Fix, clean and debug

  • Write API's as the only way to access DB.
  • Write the frontend in AngularJS.
  • Write tests for apis and frontend in angular.
  • Write proper stylesheets and document code.
  • Use twitter, facebook, github for login.

Node Twitter redesign goals

  • Built on top of latest express
  • Use mongoose mostly for schema design.
  • Error caching, exception handling.
  • Well documented API
  • Tests integrations with Travis/wercker
  • Built on bootstrap 4
  • More Twitter like functionality (Decide on this one)

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.