{"id":32733743,"url":"https://github.com/tiim/swim-times-manager","last_synced_at":"2026-06-30T19:32:35.115Z","repository":{"id":320795452,"uuid":"1083145410","full_name":"Tiim/swim-times-manager","owner":"Tiim","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-25T22:30:03.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-26T00:07:18.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tiim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-25T12:42:54.000Z","updated_at":"2025-10-25T22:30:06.000Z","dependencies_parsed_at":"2025-10-26T00:07:22.804Z","dependency_job_id":"06ed7027-4490-41f7-9e9c-725226c7fcb7","html_url":"https://github.com/Tiim/swim-times-manager","commit_stats":null,"previous_names":["tiim/swim-times-manager"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Tiim/swim-times-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiim%2Fswim-times-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiim%2Fswim-times-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiim%2Fswim-times-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiim%2Fswim-times-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tiim","download_url":"https://codeload.github.com/Tiim/swim-times-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiim%2Fswim-times-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34981390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-03T06:07:07.104Z","updated_at":"2026-06-30T19:32:35.104Z","avatar_url":"https://github.com/Tiim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwimTimes Manager\n\nA client-side React application for swim coaches to track athlete performance and automatically calculate personal bests. Features a spreadsheet-like interface for managing swim times across multiple athletes, events, strokes, and pool types.\n\n## Features\n\n- 📊 **Personal Bests Dashboard** - Automatic calculation and display of personal bests\n- 👥 **Athlete Management** - Track multiple athletes with individual performance profiles\n- ⏱️ **Time Entry \u0026 Editing** - Form-based interface for adding and editing swim times\n- 🔍 **Advanced Filtering** - Search and filter by athlete, stroke, pool type, and more\n- 📥 **Import/Export** - Backup and restore data via JSON export/import\n- 💾 **Local Storage** - All data stored locally in browser (no server required)\n- 🌓 **Dark/Light Mode** - Built-in theme switching\n- 📱 **Responsive Design** - Works on desktop, tablet, and mobile\n\n## Tech Stack\n\n- **React 18** with TypeScript\n- **Vite** - Fast build tooling and development server with HMR\n- **Wouter** - Lightweight client-side routing\n- **Shadcn/ui** - Beautiful UI components built on Radix UI\n- **Tailwind CSS** - Utility-first styling\n- **localStorage** - Client-side data persistence\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+ and npm\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd SwimTimesManager\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n### Running with Hot Reloading\n\nStart the development server with Hot Module Replacement (HMR) enabled:\n\n```bash\nnpm run dev\n```\n\nThis will:\n- Start the Vite development server on `http://localhost:5173` (or next available port)\n- Enable Hot Module Replacement - changes to your code will instantly update in the browser without full page reloads\n- Watch for file changes automatically\n\nThe terminal will display the local URL where the app is running. Open it in your browser and start developing!\n\n**Hot reloading features:**\n- React components update instantly when you save changes\n- CSS/Tailwind changes apply immediately\n- TypeScript errors appear in both the terminal and browser overlay\n\n### Other Available Commands\n\n```bash\nnpm run build    # Build for production (outputs to dist/)\nnpm run preview  # Preview production build locally\nnpm run check    # Run TypeScript type checking\n```\n\n## Project Structure\n\n```\nSwimTimesManager/\n├── client/\n│   ├── src/\n│   │   ├── components/      # Reusable UI components\n│   │   │   ├── ui/          # Shadcn/ui primitives\n│   │   │   ├── AddTimeForm.tsx\n│   │   │   ├── TimeEntryTable.tsx\n│   │   │   ├── PBCard.tsx\n│   │   │   └── ...\n│   │   ├── pages/           # Route components\n│   │   │   ├── Dashboard.tsx\n│   │   │   ├── Athletes.tsx\n│   │   │   ├── AllTimes.tsx\n│   │   │   ├── AddTime.tsx      # Handles both /add-time and /edit-time/:id\n│   │   │   ├── AthleteProfile.tsx\n│   │   │   └── ImportExport.tsx\n│   │   ├── lib/\n│   │   │   └── storage.ts   # localStorage wrapper and data logic\n│   │   ├── hooks/           # Custom React hooks\n│   │   ├── App.tsx          # Main app component with routing\n│   │   └── main.tsx         # App entry point\n│   ├── index.html\n│   └── public/              # Static assets\n├── vite.config.ts           # Vite configuration\n├── tsconfig.json            # TypeScript configuration\n├── tailwind.config.js       # Tailwind CSS configuration\n└── package.json\n```\n\n## Data Storage\n\nAll swim time data is stored locally in your browser using **localStorage**:\n\n- Data persists across browser sessions\n- Data is specific to each browser/device\n- No data is sent to any server\n- Storage key: `swim-times-data`\n\n### Backing Up Your Data\n\nTo backup your data:\n1. Navigate to **Import/Export** page in the app\n2. Click **Export Data**\n3. Save the downloaded JSON file\n\nTo restore data:\n1. Navigate to **Import/Export** page\n2. Click **Import Data**\n3. Select your JSON backup file\n\n## Building for Production\n\nCreate an optimized production build:\n\n```bash\nnpm run build\n```\n\nThis creates a `dist/` folder with static files ready for deployment.\n\nPreview the production build locally:\n\n```bash\nnpm run preview\n```\n\n## Deployment\n\nThe application is a static website and can be deployed to any static hosting service:\n\n### Netlify / Vercel / Cloudflare Pages\n\n1. Build the project: `npm run build`\n2. Deploy the `dist/` folder\n3. Configure redirects for client-side routing:\n\n**Netlify** - Create `netlify.toml`:\n```toml\n[[redirects]]\n  from = \"/*\"\n  to = \"/index.html\"\n  status = 200\n```\n\n**Vercel** - Create `vercel.json`:\n```json\n{\n  \"rewrites\": [{ \"source\": \"/(.*)\", \"destination\": \"/index.html\" }]\n}\n```\n\n### GitHub Pages\n\n1. Build: `npm run build`\n2. Push `dist/` folder to `gh-pages` branch\n3. Enable GitHub Pages in repository settings\n\n### Traditional Web Server (nginx, Apache)\n\n1. Build: `npm run build`\n2. Upload contents of `dist/` to your web server\n3. Configure your server to serve `index.html` for all routes\n\n**nginx example:**\n```nginx\nlocation / {\n  try_files $uri $uri/ /index.html;\n}\n```\n\n## Development\n\n### Adding a New Page\n\n1. Create component in `client/src/pages/`\n2. Add route in `App.tsx`:\n   ```typescript\n   \u003cRoute path=\"/my-page\" component={MyPage} /\u003e\n   ```\n3. Add navigation link in `client/src/components/app-sidebar.tsx`\n\n### Using the Storage API\n\n```typescript\nimport { swimStorage } from \"@/lib/storage\";\n\n// Get all swim times\nconst times = swimStorage.getAllSwimTimes();\n\n// Create new time\nconst newTime = swimStorage.createSwimTime({\n  athleteName: \"John Doe\",\n  eventName: \"Regionals 2025\",  // Meet/practice name, not \"100m Freestyle\"\n  date: \"2025-10-25\",\n  measuredTime: \"52.34\",\n  stroke: \"Freestyle\",\n  distance: 100,\n  poolLength: \"SCM\",\n  splits: null\n});\n\n// Update after changes\nwindow.dispatchEvent(new Event('storage-updated'));\n```\n\n### Storage Methods Available\n\n- `getAllSwimTimes()` - Get all times sorted by date\n- `getSwimTimeById(id)` - Get single time\n- `getSwimTimesByAthlete(name)` - Get athlete's times\n- `createSwimTime(data)` - Create new time\n- `updateSwimTime(id, updates)` - Update existing time\n- `deleteSwimTime(id)` - Delete time\n- `getPersonalBests()` - Calculate all PBs\n- `getPersonalBestsForAthlete(name)` - Get athlete PBs\n- `getAthletes()` - Get all athletes with stats\n- `exportData()` - Export as JSON string\n- `importData(json)` - Import from JSON\n- `clearAll()` - Delete all data\n\n## Data Model\n\n### SwimTime Interface\n\n```typescript\n{\n  id: string;                   // UUID\n  athleteName: string;\n  eventName: string;            // Name of the meet/practice where this time was recorded\n                                // Examples: \"Training Trip 2025\", \"Regionals 2025\", \"practice\"\n                                // NOT a swimming event like \"100m Freestyle\"\n  date: string;                 // ISO date format (YYYY-MM-DD)\n  measuredTime: string;         // MM:SS.ss or SS.ss\n  stroke: \"Freestyle\" | \"Backstroke\" | \"Breaststroke\" | \"Butterfly\" | \"IM\";\n  distance: number;             // meters\n  poolLength: \"SCM\" | \"SCY\" | \"LCM\" | \"LCY\";\n  splits?: string | null;\n}\n```\n\n### Pool Length Abbreviations\n\n- **SCM** - Short Course Meters (25m)\n- **SCY** - Short Course Yards (25yd)\n- **LCM** - Long Course Meters (50m)\n- **LCY** - Long Course Yards (50yd)\n\n## Design Philosophy\n\n- **Data density over decoration** - Inspired by Linear, Notion, and Airtable\n- **Dark mode first** - With light mode support\n- **Monospace fonts** - For all time displays (tabular-nums)\n- **Form-based editing** - Edit times via dedicated form page for better data input\n- **No decorative imagery** - Icon-based navigation only\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiim%2Fswim-times-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiim%2Fswim-times-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiim%2Fswim-times-manager/lists"}