{"id":20122061,"url":"https://github.com/pjiwm/swimtimes-api","last_synced_at":"2026-04-07T08:02:04.183Z","repository":{"id":217588638,"uuid":"743804113","full_name":"Pjiwm/swimtimes-api","owner":"Pjiwm","description":"API for storing and inspecting swimming results from competitions, using graphql and supabase for storing users","archived":false,"fork":false,"pushed_at":"2024-01-28T22:09:10.000Z","size":52128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T22:38:57.815Z","etag":null,"topics":["api","apollographql","axum","docker-compose","graphql","jwt-authentication","postgresql","react","restful-api","rust","sea-orm","shuttle-rs","tailw","typescript"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pjiwm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-01-16T02:51:26.000Z","updated_at":"2024-01-28T01:15:44.000Z","dependencies_parsed_at":"2024-11-13T19:36:06.883Z","dependency_job_id":"2dbb7066-46be-4f7d-ab9e-9ba937ca1262","html_url":"https://github.com/Pjiwm/swimtimes-api","commit_stats":null,"previous_names":["pjiwm/swimtimes-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pjiwm/swimtimes-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Fswimtimes-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Fswimtimes-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Fswimtimes-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Fswimtimes-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pjiwm","download_url":"https://codeload.github.com/Pjiwm/swimtimes-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Fswimtimes-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31504897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","apollographql","axum","docker-compose","graphql","jwt-authentication","postgresql","react","restful-api","rust","sea-orm","shuttle-rs","tailw","typescript"],"created_at":"2024-11-13T19:34:36.015Z","updated_at":"2026-04-07T08:02:04.165Z","avatar_url":"https://github.com/Pjiwm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swimtimes\n![GitHub commit activity](https://img.shields.io/github/commit-activity/w/Pjiwm/swimtimes-api)\n![GitHub top language](https://img.shields.io/github/languages/top/Pjiwm/swimtimes-api)\n\n![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge\u0026logo=rust\u0026logoColor=white)\n![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge\u0026logo=react\u0026logoColor=%2361DAFB)\n![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=for-the-badge\u0026logo=vite\u0026logoColor=white)\n![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n## Available via\n\n[Web UI](https://swimtimes-api.shuttleapp.rs/)\n\n[GraphQL API](https://swimtimes-api.shuttleapp.rs/api/graphql)\n\n## Installation\n\nTo install and run the Swimtimes application, follow these steps:\n\n1. Install Docker, Node, and the Rust compiler.\n2. Create a `secrets.toml` file for Shuttle deployment with the following content:\n\n```toml\nDATABASE_URL='mysql://root:1337@localhost:3306/swimdb'\nRUST_LOG=\"info,sqlx=off,async_graphql=warn,api=info\"\nlocal_uri=\"postgres://postgres:postgres@localhost:5432/swimdb\"\nJWT_SECRET=\n```\n\n3. Install the `cargo-shuttle` tool by running:\n\n```bash\ncargo install cargo-shuttle\n```\n\n4. Setup a project on [Shuttle-rs](https://www.shuttle.rs/)\n\n5. Setup [Supabase](https://supabase.com) or any other JWT/JWK provider\n\n6. in `/swimtimes/app/app.config.ts` set the config\n```ts\nconst config = {\n  apiUrl: process.env.NODE_ENV === 'development' ? 'http://localhost:8000' : 'https://\u003curl\u003e.shuttleapp.rs',\n  authClientUrl: \"https://\u003cid\u003e.supabase.co\",\n  anonKey: \"\u003canonkey\u003e\"\n};\n\nexport default config;\n```\n\n7. Start the container using Docker Compose:\n\n```bash\ndocker-compose up -d\n```\n\n8. Run the application with:\n\n```bash\ncargo shuttle run\n```\n\n## Application Overview\n\n### Entities\n\n#### Swimmer\n\n| Field           | Type       | Description           |\n| --------------- | ---------- | --------------------- |\n| id              | i32        | Primary Key           |\n| name            | String     | Swimmer's name        |\n| date_of_birth   | Date       | Swimmer's date of birth|\n| team            | i32 (FK)   | Foreign key to Team   |\n\n#### Team\n\n| Field           | Type       | Description           |\n| --------------- | ---------- | --------------------- |\n| id              | i32        | Primary Key           |\n| name            | String     | Team's name           |\n| founding_date   | Date       | Team's founding date  |\n| address         | String     | Team's address        |\n| zip_code        | String     | Team's zip code       |\n\n#### SwimTime\n\n| Field           | Type       | Description           |\n| --------------- | ---------- | --------------------- |\n| id              | i32        | Primary Key           |\n| competition     | i32 (FK)   | Foreign key to Competition |\n| distance        | i32        | Swim distance in meters|\n| stroke          | String     | Swim stroke type      |\n| time            | i32        | Swim time in seconds  |\n| swimmer         | i32 (FK)   | Foreign key to Swimmer|\n\n### Tech Stack\n\n- Docker\n- Node.js\n- React\n- Vite\n- Rust\n- Axum\n- SQLx/Sea ORM\n- GraphQL (async-graphql)\n- Postgresql\n- Supabase \n\n### Directory\n\n```\n├── Cargo.lock\n├── Cargo.toml\n├── LICENSE\n├── Secrets.toml\n├── Shuttle.toml (use this instead of .env)\n├── api (API library for Axum server)\n├── app (React app)\n├── docker-compose.yml\n├── entities.sh (Migration command, creates entity files)\n├── entity (Contains all models/entities for the project)\n├── example.env\n├── migration (Sea ORM migrations)\n├── repository (manages commands to DB)\n├── src (main crate, spins up web server from API using Shuttle-rs)\n├── static (output directory for building react app. Will be served by API)\n├── target\n└── tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjiwm%2Fswimtimes-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjiwm%2Fswimtimes-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjiwm%2Fswimtimes-api/lists"}