{"id":17965827,"url":"https://github.com/thomas465xd/rest_api-product-management","last_synced_at":"2026-04-11T19:04:27.807Z","repository":{"id":259592074,"uuid":"878958966","full_name":"Thomas465xd/rest_api-product-management","owner":"Thomas465xd","description":"Simple REST API for a product management web app made using React, TypeScript and Express. For the DB PostgreSQL hosted in render and for the Testing Jest and Supertest","archived":false,"fork":false,"pushed_at":"2024-10-30T01:08:51.000Z","size":149,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T20:23:44.199Z","etag":null,"topics":["api","express","expressjs","json","node","nodejs","orm","pern","pern-stack","postgresql","rest-api","sequelize","sequelize-orm","ts","tsconfig"],"latest_commit_sha":null,"homepage":"https://rest-api-product-management.onrender.com/docs/","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/Thomas465xd.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":"2024-10-26T15:23:56.000Z","updated_at":"2024-10-30T00:52:16.000Z","dependencies_parsed_at":"2024-10-26T19:37:15.509Z","dependency_job_id":"a54b952f-4406-4488-bfa8-ea91cf4a6d00","html_url":"https://github.com/Thomas465xd/rest_api-product-management","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"551e1b2715688a87dd0c83e0364581d30d80529c"},"previous_names":["thomas465xd/rest_api-product-management"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Thomas465xd/rest_api-product-management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas465xd%2Frest_api-product-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas465xd%2Frest_api-product-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas465xd%2Frest_api-product-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas465xd%2Frest_api-product-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thomas465xd","download_url":"https://codeload.github.com/Thomas465xd/rest_api-product-management/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas465xd%2Frest_api-product-management/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745670,"owners_count":24813521,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"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":["api","express","expressjs","json","node","nodejs","orm","pern","pern-stack","postgresql","rest-api","sequelize","sequelize-orm","ts","tsconfig"],"created_at":"2024-10-29T13:05:38.663Z","updated_at":"2025-12-30T21:38:17.009Z","avatar_url":"https://github.com/Thomas465xd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API Product Management\n\nThis is a REST API built for managing products, using a simple CRUD (Create, Read, Update, Delete) functionality. The API is developed with TypeScript, Node.js, and Express and is designed to handle requests for a product management application. It is deployed on Render’s free tier for both the web service and database.\n\n## Table of Contents\n- [Overview](#overview)\n- [Technologies Used](#technologies-used)\n- [Features](#features)\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Environment Variables](#environment-variables)\n  - [Running the API](#running-the-api)\n  - [Testing](#testing)\n- [API Documentation](#api-documentation)\n- [Deployment](#deployment)\n\n## Overview\nThis API serves as the backend for a product management application, allowing users to create, view, update, and delete product records. It is designed to power a simple frontend interface for managing products.\n\n## Technologies Used\n- **Node.js** with **TypeScript**: For building the server and API logic.\n- **Express**: As the web application framework.\n- **PostgreSQL**: For database storage, with **Sequelize** as the ORM.\n- **Jest** and **Supertest**: For comprehensive testing, with 100% code coverage.\n- **Render**: For hosting the API and database on a free-tier environment.\n\n## Features\n- **RESTful API Endpoints** for full CRUD operations:\n  - `GET` to retrieve all products or a product by ID.\n  - `POST` to create a new product.\n  - `PUT` to update an existing product’s information.\n  - `PATCH` to modify a product’s availability.\n  - `DELETE` to remove a product by ID.\n- **Testing**: Includes unit and integration tests for each endpoint, ensuring 100% code coverage with Jest and Supertest.\n- **Error Handling**: Comprehensive error handling to manage invalid requests and database errors.\n\n## Getting Started\n\n### Installation\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/rest_api-product-management.git\n   cd rest_api-product-management\n2. Install Dependencies:\n  ```bash\n  npm install\n  ```\n### Environment Variables\n\nCreate a .env file in the root directory with the following variables:\n```.env\nDB_URL=your_database_url\nFRONTEND_URL=https://your-frontend-app-url\n```\nEnsure DB_URL points to your PostgreSQL database on Render (or locally for development).\n\n### Running the API\n1. **Development Mode:\n  ```bash\n  npm run dev\n  ```\n2. **Production Mode:\n  ```bash\n  npm run build\n  node dist/index.js\n  ```\n### Testing\nRun all tests with Jest and Supertest:\n```bash\nnpm test\n```\n\n## API Documentation\n\nThe API Documentation is made using swagger\n\n[Documentation URL](https://rest-api-product-management.onrender.com/docs/)\n\n## Deployment\nThe API is deployed on Render. To deploy this API:\n- 1. Link your repository to a Render web service.\n- 2. Add environment variables on Render corresponding to your .env file.\n- 3. Use Render’s PostgreSQL service for database hosting.\n \n ---\n\nMade with ♥️ **Thomas Schrödinger**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas465xd%2Frest_api-product-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomas465xd%2Frest_api-product-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas465xd%2Frest_api-product-management/lists"}