Coder Social home page Coder Social logo

maria / cub Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 6.73 MB

Connect Hub - Open Source. Code. Learn. Earn. Share.

Home Page: https://connecthub.herokuapp.com

License: GNU Affero General Public License v3.0

Python 54.53% JavaScript 28.55% HTML 9.80% CSS 6.96% Shell 0.15%

cub's People

Contributors

maria avatar mariuscoto avatar

Watchers

 avatar  avatar  avatar

cub's Issues

Repo forked and description attribute

Need

We need an attribute for the repo object that tells us if the repo is a fork or not and the description of the repo. We may also need to save the link to the original (we should discuss this).

User stats

Need

We need to have some user stats on his/her profile page.

Deliverables

Add the following attributes to /api/v1/myaccount/ response:

  • watchers - total number of watchers on all public repos (owned or collaborative ones)
  • stars - total number of stars on all public repos (owned or collaborative ones)
  • pulls - total number of pull requests on all public repos (owned or collaborative ones)

Rewrite backend using Flask + mongo

Need

Now we use Django with PostgreSQL and MongoDB, a hybrid which is hard to maintain and doesn't have much sense. Since the Django won't officially support Mongo in the upcoming releases and Flask is easier to implement with Mongo I suggest we move now, while we still can.

Solution

  • Create a new directory called api
  • Define a new file called app.py where our main Flask application will be defined
  • Define MongoDB as the database
  • Add a config file like settings.py
  • Define the api as http://flask-restful-cn.readthedocs.io/en/0.3.5/
  • Define api classes for each resourse
  • Define routes for logging in user, logging out and api
  • Remove django

Bonus points

Need

Have some bonus points for different git goodpractices, like:

  • no passwords found in any repos
  • all repos have descriptions
  • etc
    We can also use this for the 'teaching' side of the project.

Allow unauthenticated requests

Need

When a new (unauthenticated) user accesses the site, he should see some (not all) info about other users.

Deliverables

Provide new endpoints:

  • for profile: show name, username, avatar
  • for repos: show list of repos, but no score

No of open/closed issues

Need

Keep track of open and closed issues per repository.

Deliverables

Have open_issues and closed_issues attributes for the repo object.

Collaborative repos

Need

We need to include repositories where the user is a contributor for, because they are important for the score.

Deliverables

Display collaborative repos in the repos list.

Another user's profile

Need

Add ability to view another user's profile.

Deliverables

GET /api/v1/account/USER/?format=json
where USER is a GitHub username

Notes

We must include:

  • 404 page for users that have never logged in

Contact form

Need

Have a method to receive feedback from users.

Deliverables

Have a contact form in the Contact page.
Enable an POST /api/v1/contact endpoint, which send an email to us, containing the feedback from the contact form.

Update post endpoints

When you submit a post request to one of the contribution endpoints,
update the data.

  • Score
  • Pulls
  • Commits
  • Repos

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.