implement homepage local db

Use local JSON db if offline.