Initial commit

This commit is contained in:
2026-06-20 04:28:24 +03:00
committed by GitHub
commit 07f02e0958
29 changed files with 1700 additions and 0 deletions
@@ -0,0 +1,25 @@
---
applyTo: "octofit-tracker/backend/**"
---
# Octofit Tracker Logic + Data Tier Guidelines
## Logic tier (Node.js + Express + TypeScript)
- Build API routes under `/api/`.
- Keep API service on port `8000`.
- Use environment-aware Codespaces URLs via `CODESPACE_NAME`.
Example base URL logic:
```ts
const codespaceName = process.env.CODESPACE_NAME;
const baseUrl = codespaceName
? `https://${codespaceName}-8000.app.github.dev`
: 'http://localhost:8000';
```
## Data tier (MongoDB + Mongoose)
- Use Mongoose models for users, teams, activities, leaderboard, and workouts.
- Connect to `octofit_db`.
- Validate endpoints with `curl` after wiring routes.
@@ -0,0 +1,18 @@
---
applyTo: "octofit-tracker/frontend/**"
---
# Octofit Tracker React Presentation Tier Guidelines
Use commands that target `octofit-tracker/frontend` without changing directories.
```bash
npm create vite@latest octofit-tracker/frontend -- --template react
npm install --prefix octofit-tracker/frontend
npm install bootstrap react-router-dom --prefix octofit-tracker/frontend
```
Add Bootstrap CSS import at the top of `octofit-tracker/frontend/src/main.jsx`.
## Images
Use `docs/octofitapp-small.png` for the app logo.
@@ -0,0 +1,66 @@
---
applyTo: "**"
---
# Octofit Tracker Multi-tier Application Setup Guidelines
## Application goals
Build an Octofit Tracker **multi-tier application** with:
- User authentication and profiles
- Activity logging and tracking
- Team creation and management
- Competitive leaderboard
- Personalized workout suggestions
## Command execution rules
- Never change directories in commands.
- Always reference target paths directly.
## Forwarded ports
- 8000: public (logic/API tier)
- 5173: public (presentation tier)
- 27017: private (data tier)
Do not propose any other ports to forward or make public.
## Project structure
```text
octofit-tracker/
├── backend/
│ ├── src/
│ ├── package.json
│ └── tsconfig.json
└── frontend/
├── src/
└── package.json
```
## Stack requirements
### Presentation tier
- React 19 with Vite
- react-router-dom for navigation
- bootstrap for styling
### Logic tier
- Node.js (LTS)
- Express
- TypeScript
### Data tier
- MongoDB (`mongodb-org`)
- Mongoose for data access
## MongoDB service expectations
- Always use `ps aux | grep mongod` to check whether mongod is running.
- `mongodb-org` is the official MongoDB package.
- `mongosh` is the official client tool.
- Use Mongoose models from the logic tier for schema/data work instead of ad-hoc raw scripts.