You don't mention what the intent of your effort is to be. Are you looking to learn about javascript? physics? Or, do you know all about those, and you're just looking to code something? Or, are you just looking for something to take up time?
results for javascript physics just shows complete frameworks or toolkits and i want to write it myself. So, Where should i start?
Depends on how many applications you've written already. If you have your own framework, the benefit is that you're familiar with it - just starting adding pieces to that.
If you haven't successfully written a framework or engine before, and you're not looking to just waste some time, study other frameworks - see how they're organized, what features they offer that you do or don't want to incorporate, learn coding practices from them. Assuming you're not looking to just waste some time, don't reinvent the wheel. You don't have to use exactly what others have done. Why you're hesitant to learn from others isn't clear.
In either case, from the looks of the video you posted, you're going to need some sort of collision detection in addition to the physics. Unless you understand all the interactions that appear in the video (e.g., shape drawing, collision detection, force and torque, friction, etc.), take a few days to brush up on those principles.
Then - draw something. Make it move. Figure out how to determine if a moving object has collided with a stationary object. Figure out how to determine if a moving object has collided with another moving object. That's the collision part. Then determine how you want the object to behave when it collides with another object. That's the physics part.
Continue the process based on your experience and intelligence.