Giter Site home page Giter Site logo

wingkoon / paws-patrol-lhlp11 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meatcow/paws-patrol-lhl

0.0 0.0 0.0 10.58 MB

Final group project for the Lighthouse Lab web dev bootcamp

License: MIT License

Shell 0.41% JavaScript 55.88% Python 3.67% TypeScript 30.34% CSS 6.63% HTML 3.05% Procfile 0.02%

paws-patrol-lhlp11's Introduction

Paws patrol

Paws Patrol is designed to protect your pets and you. Always know where your pets are without anyone else able to do the same.
Self-hosting allows you to choose your own middleware (ex. authelia, pomerium) for login while also providing security.
Open source software allows you to know your devices are only talking to each other.

Setup

cd server
npm run build && npm start
cd ../app
npm run dev

Dependencies

  • Node 16.x
  • Postgres 10.x
  • Express
  • Bootstrap 5

Api

Coordinates


/api/coordinate

post /:imei
	add coordinate for a device
	body = {lat, long, time}
	all required

get /:imei
	get most recent for a device

Devices


/api/device

get /
	list of all devices

post /:imei
	add device
	body = {name, microchip}
	all optional
get /:imei
	info about device with matching imei
patch /:imei
	update a device
	body = {name, microchip}
	all optional

Email


/api/email

post /
	send an email
	body = {to, subject, body}
	to is required
	subject and body are optional

Perimeters


/api/perimeter

get /
	get all perimeters in db

post /:imei
	add perimeter for a device
	body = {p1lat, p1long, p2lat, p2long}
	all required
get /:imei
	get perimeter for device with matching imei
patch /:imei
	update perimeter for a device
	body = {p1lat, p1long, p2lat, p2long}

Reset


/api/reset

get /
	reset db leaving it empty

get /seed
	reset db before seeding with dummy data
	1 device, user, coordinate, and perimeter

Trips


/api/trip

get /
	get all trips

post /:imei
	start a trip
	body = {name, start}
	name is optional
	start is required
get /:imei
	get all trips for a device with matching imei
patch /:imei
	end a trip
	body = {id, end}
	both required

get /:imei/:id
	get the coordinates for a trip

Users


/api/user

get /
	get user info
patch /
	change user info
	body = {name, phone, email, password}
	all required

paws-patrol-lhlp11's People

Contributors

firewallfail avatar meatcow avatar robbieprokop 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.