{"id":28445330,"url":"https://github.com/suptarr/backendimmifit","last_synced_at":"2026-04-30T19:31:42.401Z","repository":{"id":104399557,"uuid":"523554479","full_name":"SupTarr/BackendImmifit","owner":"SupTarr","description":"Backend service for the Immifit application, built using the Elysia.js framework and MongoDB.","archived":false,"fork":false,"pushed_at":"2025-11-23T03:07:24.000Z","size":457,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-23T05:15:28.767Z","etag":null,"topics":["elysiajs","jwt","mongodb","typescript"],"latest_commit_sha":null,"homepage":"https://immifit-backend.suptarr.vercel.app/","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"firstnapat/backend_final_project_genth","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SupTarr.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":"2022-08-11T01:57:55.000Z","updated_at":"2025-11-23T03:07:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"44d26064-1add-46b3-accb-a60d9a5a41ba","html_url":"https://github.com/SupTarr/BackendImmifit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SupTarr/BackendImmifit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupTarr%2FBackendImmifit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupTarr%2FBackendImmifit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupTarr%2FBackendImmifit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupTarr%2FBackendImmifit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SupTarr","download_url":"https://codeload.github.com/SupTarr/BackendImmifit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupTarr%2FBackendImmifit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["elysiajs","jwt","mongodb","typescript"],"created_at":"2025-06-06T10:12:31.284Z","updated_at":"2026-04-30T19:31:42.396Z","avatar_url":"https://github.com/SupTarr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Immifit API - Backend Service\n\n## Overview\n\nThe Immifit API is the backend service for the Immifit application, built using the Elysia.js framework and MongoDB. It handles user authentication, profile management, and activity tracking.\n\n## Features\n\n- **Authentication**: Secure user registration, login, JWT-based session management (access and refresh tokens), and logout.\n- **User Management**: Retrieve user details.\n- **Profile Management**: Create and update user profiles, including automatic BMI calculation based on height and weight.\n- **Activity Tracking**: CRUD operations for user activities (Running, Cycling, Swimming, etc.), including image uploads to Cloudinary.\n- **Validation**: Request body and parameter validation using Elysia's built-in validation.\n- **CORS**: Configured Cross-Origin Resource Sharing for specific allowed origins.\n- **Environment-Aware**: Supports running locally via Node.js/Bun and deployment to Vercel (using `app.fetch`).\n\n## Technologies\n\n- **Framework**: [Elysia.js](https://elysiajs.com/)\n- **Language**: TypeScript\n- **Database**: MongoDB with [Mongoose](https://mongoosejs.com/) ODM\n- **Authentication**: JSON Web Tokens ([jsonwebtoken](https://github.com/auth0/node-jsonwebtoken)), [bcrypt](https://github.com/kelektiv/node.bcrypt.js) for password hashing\n- **Image Storage**: [Cloudinary](https://cloudinary.com/)\n- **Runtime**: Node.js / Bun / Vercel\n- **Environment Variables**: [dotenv](https://github.com/motdotla/dotenv)\n- **Validation**: Elysia's built-in TypeBox validation\n\n## Prerequisites\n\n- Node.js (v22.x recommended, see `package.json`) or Bun\n- npm, yarn, or pnpm\n- MongoDB instance (local or cloud-based like MongoDB Atlas)\n- Cloudinary account\n\n## Installation\n\n1. **Clone the repository:**\n\n    ```bash\n    git clone \u003cyour-repository-url\u003e\n    cd BackendImmifit\n    ```\n\n2. **Install dependencies:**\n\n    ```bash\n    npm install\n    # or yarn install / pnpm install\n    ```\n\n3. **Set up environment variables:**\nCreate a `.env` file in the root directory by copying `.env.example` (if provided) or creating it manually. Fill in the required values:\n\n    ```dotenv\n    # MongoDB\n    MONGO_URI=your_mongodb_connection_string\n    MONGO_USER=your_mongodb_user # Optional, depending on connection string/options\n    MONGO_PASSWORD=your_mongodb_password # Optional\n    MONGO_DATABASE=your_mongodb_database_name\n\n    # JWT Secrets\n    ACCESS_TOKEN_SECRET=your_strong_access_token_secret\n    REFRESH_TOKEN_SECRET=your_strong_refresh_token_secret\n\n    # Cloudinary\n    CLOUDINARY_NAME=your_cloudinary_cloud_name\n    CLOUDINARY_KEY=your_cloudinary_api_key\n    CLOUDINARY_SECRET=your_cloudinary_api_secret\n\n    # Server\n    PORT=4001 # Default port for local development\n\n    # Deployment (Set to true if deploying to Vercel)\n    IS_VERCEL=false\n    ```\n\n## Running the Application\n\n### Local Development (using Bun)\n\nThe project is configured to use Bun for development with hot-reloading:\n\n```bash\nbun run dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuptarr%2Fbackendimmifit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuptarr%2Fbackendimmifit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuptarr%2Fbackendimmifit/lists"}