Knot Floer homology and bordered algebras