Skip to content

Build octofit app - Add registration validation and more activities#2

Merged
lgpearson1771 merged 9 commits intomainfrom
build-octofit-app
Apr 8, 2025
Merged

Build octofit app - Add registration validation and more activities#2
lgpearson1771 merged 9 commits intomainfrom
build-octofit-app

Conversation

@lgpearson1771
Copy link
Copy Markdown
Owner

This pull request includes significant updates to the octofit-tracker project, adding backend functionality with Django and frontend setup using Create React App. The key changes involve setting up the Django project, defining models, views, serializers, and adding initial frontend configuration.

Backend Changes

  • Django Setup and Configuration:

    • Created manage.py to run administrative tasks and configured ASGI and WSGI for the project (octofit-tracker/backend/manage.py, octofit-tracker/backend/octofit_tracker/asgi.py, octofit-tracker/backend/octofit_tracker/wsgi.py). [1] [2] [3]
    • Configured Django settings including database setup with MongoDB using djongo (octofit-tracker/backend/octofit_tracker/settings.py).
  • Models and Admin:

    • Defined models for User, Team, Activity, Leaderboard, and Workout using djongo for MongoDB integration (octofit-tracker/backend/octofit_tracker/models.py).
    • Registered models with Django admin (octofit-tracker/backend/octofit_tracker/admin.py).
  • Database Population and API:

    • Added a management command to populate the database with test data (octofit-tracker/backend/octofit_tracker/management/commands/populate_db.py).
    • Created serializers and viewsets for the models to enable API operations (octofit-tracker/backend/octofit_tracker/serializers.py, octofit-tracker/backend/octofit_tracker/views.py). [1] [2]
    • Configured URL routing for the API (octofit-tracker/backend/octofit_tracker/urls.py).
  • Testing:

    • Added basic tests for models (octofit-tracker/backend/octofit_tracker/tests.py).

Frontend Changes

  • Initial Setup:

    • Initialized the frontend with Create React App and added dependencies (octofit-tracker/frontend/package.json).
    • Provided a README with instructions for running and building the React app (octofit-tracker/frontend/README.md).
    • Added .gitignore to exclude unnecessary files (octofit-tracker/frontend/.gitignore).
  • Assets:

    • Added a favicon for the project (octofit-tracker/frontend/public/favicon.ico).

Dependencies

  • Backend:
    • Added dependencies for Django, Django REST framework, djongo, pymongo, and other required packages (octofit-tracker/backend/requirements.txt).

These changes set up the foundation for the octofit-tracker project, enabling backend functionality with Django and MongoDB, and frontend development with React.

@lgpearson1771 lgpearson1771 requested a review from Copilot April 8, 2025 00:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 34 out of 39 changed files in this pull request and generated 1 comment.

Files not reviewed (5)
  • octofit-tracker/backend/requirements.txt: Language not supported
  • octofit-tracker/frontend/.gitignore: Language not supported
  • octofit-tracker/frontend/package.json: Language not supported
  • octofit-tracker/frontend/public/favicon.ico: Language not supported
  • octofit-tracker/frontend/public/index.html: Language not supported
Comments suppressed due to low confidence (1)

octofit-tracker/backend/octofit_tracker/management/commands/populate_db.py:41

  • Passing users[0].dict into the EmbeddedField may lead to unexpected issues. It is recommended to pass the model instance (e.g., users[0]) directly or use an appropriate serialization method.
Activity(id=ObjectId(), user=users[0].__dict__, type='Cycling', duration=60),

Comment thread octofit-tracker/backend/octofit_tracker/management/commands/populate_db.py Outdated
@lgpearson1771 lgpearson1771 merged commit aeffc33 into main Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants