Coder Social home page Coder Social logo

buff's Introduction

Hi there ๐Ÿ‘‹

buff's People

Contributors

bluehotdog avatar dependabot[bot] avatar itayadler avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

buff's Issues

Define package file

We need to define something like package.json.
I've done some research about this. some of the stuff from npm that might be relevant:

    Access - x
    Name - x
    Description - x
    Keywords - x
    Homepage - x
    Bugs
    License?
    Contributors
        Name
        Email
        URL
    Repository - x
        Type
        URL
        Directory - For mono-repo support
    - Dependencies

Users should be able to login/logout

should prob be done after #3

Users should be able to call an login API callback, getting back an authentication token.
I've done a bit of research and i think the following should suffice:

  • JWT subject is the user id.
  • JWT is signed using the user password as the secret -> this means that invalidating a token is as easy as changing a user password.

Pros:

  • Easy to implement, we can also extend later on with expiration fields etc
  • Easy to do token invalidation

Cons:

  • For each protected access you'll need to do a user lookup, but i think that this needs to happen almost in any case and we can make it super fast.
  • Is it a cons to sign using the user password?

Alternatives:
Sign using some hard-coded secret, and store a field on the user marking the last time he changed the password, if the token was issued before the last time the user had changed his pass, then the token is invalid.

what do you think?
@aaron-hak @itayadler

Define API to push a package

Client should be able to push a vaild package.
We need to see if there are any validations we need to do on the server side or everything can be done on the client side.
If we can do everything on the client-side, than we can call this operation Publish
else we need to split between Push and Publish.

Our main operations are:
Lint + Backwards breakage change.
Feels like both can be done on the client-side, but things like backwards compatibility change needs to be also guaranteed on the server-side

Add validation to package publish

Currently we don't validate a published package at all but accept its artifact binary as is. What sort of validation should we do to the artifact? @BlueHotDog

Validations:
Check if valid tar.gz
Check for size limit 5MB

User management

I suggest 3 levels of hierarchy:
Users: Represent a real person, this is the entity through which you login the system
Teams: Users can belong to a team, teams have access to packages, represents a group of people working on something.
Organizations: A group of teams, By default each org will have the Developers team to which all users will belong by default.

Each package will be owned by either an Org or a User.
Beside having a single owner, package should have multiple teams able to work on it with various permissions.

First iteration:
Create entities representing this hierarchy, minus permissions checks.

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.