{"id":26993219,"url":"https://github.com/linkoucommander/protein-management-api","last_synced_at":"2026-05-15T23:05:03.274Z","repository":{"id":283784733,"uuid":"952203379","full_name":"LinkouCommander/Protein-Management-API","owner":"LinkouCommander","description":"A Node.js-based REST API for protein sequence management, including protein creation, retrieval, updating, and deletion. Built with Express and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2025-03-24T08:09:13.000Z","size":1064,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T23:17:21.913Z","etag":null,"topics":["express-js","javascript","node-js","postgresql","restful-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/LinkouCommander.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}},"created_at":"2025-03-20T22:38:56.000Z","updated_at":"2025-04-01T07:36:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"228f2172-1f6e-4457-b14a-0c20f2811fde","html_url":"https://github.com/LinkouCommander/Protein-Management-API","commit_stats":null,"previous_names":["linkoucommander/protein-api-server","linkoucommander/protein-management-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LinkouCommander/Protein-Management-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FProtein-Management-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FProtein-Management-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FProtein-Management-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FProtein-Management-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinkouCommander","download_url":"https://codeload.github.com/LinkouCommander/Protein-Management-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FProtein-Management-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265175567,"owners_count":23722661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["express-js","javascript","node-js","postgresql","restful-api"],"created_at":"2025-04-03T23:17:24.133Z","updated_at":"2026-05-15T23:04:58.239Z","avatar_url":"https://github.com/LinkouCommander.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Protein Management API\n\nThis is a RESTful API for managing protein data. The API provides functionalities to create, retrieve, update, and delete proteins and fragments, and supports searching based on various criteria. Built with Express and PostgreSQL.\n\n## Table of Contents\n\n- [Features](#features)\n- [Tech Stack](#tech-stack)\n- [Installation and Setup](#installation-and-setup)\n- [API Endpoints](#api-endpoints)\n- [Error Handling](#error-handling)\n\n## Features\n\n- Create new proteins and their fragments.\n- Retrieve protein information by ID.\n- Search proteins based on specific criteria.\n- Get fragments of a specific protein.\n- Update protein name and description.\n- Delete proteins.\n- Support downloading protein sequences.\n\n## Tech Stack\n\n- Node.js\n- Express\n- PostgreSQL\n- dotenv\n- fs\n\n## Installation and Setup\n\n1. **Clone the repository**\n\n2. **Install the dependencies listed in `package.json`**\n```\nnpm install\n```\n\n3. **Set up PostgreSQL:** Follow the instructions in [PostgreSQL Configuration](/POSTGRESQL_CONFIGURATION.md)\n\n4. **Set up environment:** Create a `.env` file in the root directory and add the following variables:\n```\nPG_HOST=\u003cyour-database-host\u003e\nPG_PORT=\u003cyour-database-port\u003e\nPG_DATABASE=\u003cyour-database-name\u003e\nPG_USER=\u003cyour-database-username\u003e\nPG_PASSWORD=\u003cyour-database-password\u003e\nPORT=3000\nMAX_PROTEIN_LENGTH=2000\n```\n\n5. **Server boost:**\n```\nnpx nodemon server.js\n```\n\n6. **Access the API:** Open browser and go to `http://localhost:3000/api` to start using the API.\n\n## API Endpoints\n\n### GET /api/proteins\nRetrieve information about all proteins with support for pagination.\n\n**Query Parameters**:\n- `limit`: Maximum number of records to return (optional).\n- `offset`: Record to start returning from (optional).\n\n### GET /api/proteins/search\nSearch proteins based on the provided criteria.\n\n**Query Parameters**:\n- `name`: Protein name (optional).\n- `molecularWeight`: Filter by molecular weight.\n- `sequenceLength`: Filter by sequence length.\n- `motif`: Filter by specific motif.\n- `sort`: Sort by specified field (optional).\n\n### GET /api/proteins/:proteinId\nRetrieve information about a specific protein by ID.\n\n### GET /api/proteins/:proteinId/fragments\nRetrieve fragment information for a specified protein.\n\n### GET /api/fragments/:fragmentId\nRetrieve information about a specific fragment by ID.\n\n### POST /api/proteins/sequence\nCreate a new protein by providing its sequence.\n\n**Request Body**:\n```txt\nACDEFGHIKLMNPQRSTVWY\n```\n\n### POST /api/proteins\nCreate a new protein by providing its sequence, name, and description.\n\n**Request Body**:\n```json\n{\n    \"sequence\": \"ACDEFGHIKLMNPQRSTVWY\",\n    \"name\": \"ProteinName\",\n    \"description\": \"Description of the protein\"\n}\n```\n\n### PUT /api/proteins/:proteinId\nUpdate the name and description of a specific protein.\n\n**Request Body**:\n```json\n{\n    \"name\": \"NewProteinName\",\n    \"description\": \"Updated description\"\n}\n```\n\n### DELETE /api/proteins/:proteinId\nDelete the protein with the specified ID.\n\n## Error Handling\nThe API uses custom error classes to handle errors and returns appropriate HTTP status codes and error messages. Supported error classes include:\n- `BadRequestError`\n- `UnauthorizedError`\n- `NotFoundError`\n- `ConflictError`\n\n## Reference\n\n* [HW7](/hw7-ee547-25sp.pdf)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkoucommander%2Fprotein-management-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkoucommander%2Fprotein-management-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkoucommander%2Fprotein-management-api/lists"}