Coder Social home page Coder Social logo

par-ity / on-the-spot Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 12.62 MB

map of user-submitted skate spots

Home Page: https://par-ity.github.io/on-the-spot/

License: GNU General Public License v3.0

HTML 1.13% JavaScript 95.61% CSS 1.73% Python 1.54%
skate spots map nz skateboarding streets spot guide handbook

on-the-spot's Introduction

on-the-spot

map of user-submitted skate spots to be built up over time as a resource for skaters

static site persistence with python, gmail and git

  • user submits form data via formspree API service
  • dedicated gmail account recieves form data from API
  • local python script reads and processes gmail data
  • geojson file and images are updated
  • git pushes updates back to static site

experiments

  • static site persistence without dedicated server/cloud services or fees
  • email processing script that only uses standard libraries (python 3.8^)
  • uses python subprocess to run git push to close the loop and update website
  • parsing email line-data into geojson to load into leaflet map library
  • using opinionated and predictable name formatting for data storage
  • config ini file for seperating environment variables (github values are fake)
  • using a free form submission API to avoid security concerns and server
  • formspree freemium base64 image-encoding and decoding workaround
  • mutation observer API to unify user and programmatic form-filling events
  • learning to scaffold fast responsive grid css with tailwind css
  • client-side ecmascript modules syntax for readability and modularity

note on security

As a for fun experiment, the python script uses entirely standard libraries to avoid the gmail API and associated credentials and authentication methods. This is not best practice and not reccomended if this app were handling any sensitive data, or pointed at a personal email account, or were to be used in any sort of production environment or run from an online location.

The following security mitigations are used:

As it stands, the security of this script is dependent upon the security of the local environment - which if compromised, poses much bigger threats than screwing with a collection of skate spots.

todo

possible

  • use event driven approach over scheduling via python/powershell/RSS/other
  • listen for windows user notification event (gmail itself offers desktop notifications)
  • call this python script from powershell and use to drive event api calls

on-the-spot's People

Contributors

par-ity avatar

Watchers

 avatar  avatar

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.