Comments (4)
[](930c2c5)
from fitnis.
![image](https://private-user-images.githubusercontent.com/44730386/289400292-3c98a915-4d18-4e17-b6f4-74407070e288.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxODY1MDEsIm5iZiI6MTcyNTE4NjIwMSwicGF0aCI6Ii80NDczMDM4Ni8yODk0MDAyOTItM2M5OGE5MTUtNGQxOC00ZTE3LWI2ZjQtNzQ0MDcwNzBlMjg4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDEwMjMyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY5YWM1MmY1YTY3NzA1OWQ4NDY0YWE1NzJhMjc3MjA0ODkxMGM0MDlmNTQ3NzhjMTliNWMyOGI5NzI3NTA4YWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.rQrQFpUjl11pWubRs1kuUd9Mx535iihWBzTwNpil4SE)
These arrows should only be rendered if there is something to expand
from fitnis.
Need to remodel how data is being set to backend
Front-End:
Collects and structures the data in an easily manageable format:
data: {
programname: "...",
exercises: [
{
exerciseid: "...",
exercisename: "...",
sets: [
{ set: 1, reps: 8, RPE: 7, Notes: "Felt good" },
{ set: 2, reps: 8, RPE: 8, Notes: "Tough but manageable" },
]
},
]
}
Back-End:
Receives the data and processes it to fit the relational database schema:
Extracts the programname and creates a new workout program entry if needed.
Iterates through each exercise in the exercises array:
Checks if the exerciseid already exists or if a new record should be created.
For each set in the sets array, creates a new entry in the Sets Table with the corresponding exerciseid, reps, RPE, and Notes.
Database Operations:
The workout plan, exercises, and sets are all stored in their respective tables, with relationships defined by foreign keys.
This could involve multiple insert queries, potentially within a transaction to ensure data consistency.
from fitnis.
Front-end:
Step 1: Add exercises to workout cart
Step 2: Add desired amount of sets + info (reps, rpe, notes) to each exercise
- currently storing the number of sets per exercise like [3,3,3,4,5]
- Might be better to do like [[8,8,8],[8,8,8]] (2d array where each element in parent array is an array of reps)
-
- if sets are needed can just find the length of the array
-
- Could do a similar weight array type thing
Step 3: name workout
from fitnis.
Related Issues (13)
- Define Database Schema
- Implement GET request for an exercise details HOT 1
- Implement GET request for a workout plan's details HOT 1
- Implement POST request for updating personal records
- Implement POST request for workout plan creation
- Implement GET request for viewing a user's workout plans
- Implement GET request for viewing community workouts
- Implement GET request for a user's workout history
- Create dockerfile to create local instance of postgres db
- Create Program Modal
- Make api routes in client dynamic HOT 2
- Log Workout HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fitnis.