Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bookworm",
"customizations": {
"codespaces": {
"openFiles": [
"README.md",
"dashboard/app.py"
]
},
"vscode": {
"settings": {},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}
},
"updateContentCommand": "[ -f packages.txt ] && sudo apt update && sudo apt upgrade -y && sudo xargs apt install -y <packages.txt; [ -f requirements.txt ] && pip3 install --user -r requirements.txt; pip3 install --user streamlit; echo '✅ Packages installed and Requirements met'",
"postAttachCommand": {
"server": "streamlit run dashboard/app.py --server.enableCORS false --server.enableXsrfProtection false"
},
"portsAttributes": {
"8501": {
"label": "Application",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [
8501
]
}
215 changes: 79 additions & 136 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,82 @@
# Logs
logs
# Miscellaneous
*.class
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
*.lock

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

*.lock will ignore dependency lock files that should be committed.

This pattern will exclude pubspec.lock (Flutter), package-lock.json, Pipfile.lock, poetry.lock, etc. Dependency lock files are essential for reproducible builds and should generally be tracked in version control. This likely intended to ignore only editor swap/lock files.

🐛 Proposed fix
-*.lock

If you need to ignore specific lock files (e.g., editor locks), use a more targeted pattern instead.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
*.lock
🤖 Prompt for AI Agents
In @.gitignore at line 4, The .gitignore currently contains a broad "*.lock"
pattern that will exclude important dependency lock files (e.g.,
package-lock.json, pubspec.lock, Pipfile.lock); update the .gitignore to remove
or replace the global "*.lock" entry with more targeted ignore patterns for
editor or OS lock/swap files (e.g., specific editor temp/lock filenames) so
dependency lockfiles (package-lock.json, pubspec.lock, poetry.lock,
Pipfile.lock) remain tracked; locate the "*.lock" entry and either delete it or
narrow it to the intended filenames.

*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# Flutter/Dart
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Android
android/app/libs/
android/app/src/main/assets/
android/app/src/main/res/
android/app/src/main/jniLibs/
android/app/src/main/obj/
android/app/src/main/symbols/
android/gradle/
android/gradlew
android/gradlew.bat
android/local.properties
android/.gradle
android/captures/
android/gradlew.bat
android/local.properties
Comment on lines +30 to +36

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Duplicate entries: android/gradlew.bat and android/local.properties appear twice.

Lines 31 & 35 both list android/gradlew.bat, and lines 32 & 36 both list android/local.properties.

Proposed fix
 android/gradle/
android/gradlew
android/gradlew.bat
android/local.properties
android/.gradle
android/captures/
-android/gradlew.bat-android/local.properties
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
android/gradlew
android/gradlew.bat
android/local.properties
android/.gradle
android/captures/
android/gradlew.bat
android/local.properties
android/gradlew
android/gradlew.bat
android/local.properties
android/.gradle
android/captures/
🤖 Prompt for AI Agents
In @.gitignore around lines 30 - 36, The .gitignore contains duplicate entries
for android/gradlew.bat and android/local.properties; remove the extra
occurrences so each of those patterns appears only once (leave a single entry
for android/gradlew.bat and a single entry for android/local.properties), and
tidy any accidental repeated lines to avoid redundancy.

.gradle
/android/.gradle/

# iOS
ios/Flutter/App.framework
ios/Flutter/Flutter.framework
ios/Flutter/Generated.xcconfig
ios/Flutter/app.flx
ios/Flutter/app.zip
ios/Flutter/flutter_assets/
ios/ServiceDefinitions.json
ios/Runner/GeneratedPluginRegistrant.*
ios/.generated/

# Visual Studio Code
.vscode/

# IntelliJ
.idea/
*.iml

# Python
__pycache__/
*.pyo
*.pyd
.Python
env/
venv/
pip-log.txt
pip-delete-this-directory.txt
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.mypy_cache
.pytest_cache
.hypothesise

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Typo: .hypothesise.hypothesis

The Hypothesis testing library uses .hypothesis/ as its cache directory.

-.hypothesise+.hypothesis/
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.hypothesise
.hypothesis/
🤖 Prompt for AI Agents
In @.gitignore at line 21, Replace the misspelled ignore entry ".hypothesise" in
.gitignore with the correct Hypothesis cache directory name ".hypothesis/" so
the intended directory is actually ignored; update the string ".hypothesise" to
".hypothesis/".


# Environment Variables
.env

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite logs files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
# Streamlit secrets
dashboard/.streamlit/secrets.toml
Empty file addedbackend/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions backend/database.py
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
import os
from motor.motor_asyncio import AsyncIOMotorClient

MONGODB_URI = os.environ.get("MONGODB_URI")

if MONGODB_URI:
client = AsyncIOMotorClient(MONGODB_URI)
db = client.get_database("workout_logger")
else:
db = None
Loading