Skip to content

CodingGarden/hit-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Throwback Thursday - Visitor Hit Counter

Create an embedable image that displays the number of visitors to a webpage.

Unique Visitors

Total Visits

TODO

  • Design DB
    • Counters
      • ID
      • Secret Key (for updating)
      • Font Family
      • Background Color
      • Font Color
      • Width
      • Height
      • Font Size
      • Max Length
    • Visitors
      • ID
      • Counter ID
      • Date / Time
      • Visit Count
  • Setup Server
  • What DB to use?
    • Mongo
    • Postgres
    • MySQL
  • Setup DB Connection
  • Create Counter Route
    • Validate Body
    • Insert into DB
  • View SVG Counter Route
    • /counter/10ba038e-48da-487b-96e8-8d3b99b6d18a?unique=true
    • Check if cookie exists
      • If so, update visit count for visitor
      • If not, create visitor, set cookie
    • If unique param
      • Set counter value to be unique visitors
      • If no unique param, set counter to be total visits
    • Generate SVG
    • Respond with SVG

Stretch

  • What UI Framework to use?
    • jQuery
    • Knockout.js
    • Backbone.js
    • Angular 1.x
    • Vue.js
    • React
  • Create UI for Creating a counter
    • Show realtime preview with SVG
  • Get counter info by ID
    • GET /info/10ba038e-48da-487b-96e8-8d3b99b6d18a
      • Validate Secret Key
  • Update Counter Route
    • POST /info/10ba038e-48da-487b-96e8-8d3b99b6d18a
    • Validate Body
    • Validate Secret Key
    • Update Counter info in DB
  • Create UI for Updating a counter
    • Show realtime preview with SVG

Database Design

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published