1.2 KiB
1.2 KiB
Body track
Svelte frontend Golang Backend HTTP API Postgres DB
How to dev
Read the makefile like a man
Import the insomnia workspace to test out the API
Body track backend rules
-
Database commandments
- All measurement values are in metric units - weight = kg - height = cm - calories = kcal
- All time values are in UTC
- All ip related values need to support both ipv4 and ipv6
- Email addresses are unique per user
-
HTTP APIs specs
- Authentication
- JWTs:
- 14 day maximum lease time
- claims (userid)
- OAuth2: scopes (email, profile, stats, workouts)
- JWTs:
- REST based design
- Allow export via CSV all personal data
- Allow deleting account data
- 80ms 95th percentile max response time for all calls
- Authentication
-
Frontend specs
- Support Chrome, Firefox, Safari
- Support mobile and desktop sizes
- All pages should be bookmarkable, including queries for charts and search
- Performance
- 2 seconds 95th pct for TTI
- Full page size must be under 500kb (including API calls)