{"id":23326454,"url":"https://github.com/habidbesp/rest-api-node-typescript-server","last_synced_at":"2026-05-01T18:33:22.744Z","repository":{"id":260817003,"uuid":"881891073","full_name":"habidbesp/rest-api-node-typescript-server","owner":"habidbesp","description":"This project is a simple yet complete RESTful API built using Node.js, TypeScript, and PostgreSQL. It simulates an electronic product database for a fictional store, providing a single route for creating products. The API is designed with scalability in mind, includes testing with Jest and Supertest, and is fully documented using Swagger.","archived":false,"fork":false,"pushed_at":"2024-12-08T18:50:18.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T00:04:13.599Z","etag":null,"topics":["dotenv","express","express-validator","jest-tests","nodejs","postgresql","render","restful-api","sequelize-orm","supertest","swagger","swagger-ui","typescript"],"latest_commit_sha":null,"homepage":"https://rest-api-node-typescript-ke5s.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/habidbesp.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-11-01T12:57:45.000Z","updated_at":"2024-12-08T18:50:21.000Z","dependencies_parsed_at":"2024-12-08T19:23:32.534Z","dependency_job_id":"7cd385c8-32cd-4d7a-a4bd-7d2a16c7a91e","html_url":"https://github.com/habidbesp/rest-api-node-typescript-server","commit_stats":null,"previous_names":["habidbesp/rest-api-node-typescript-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/habidbesp/rest-api-node-typescript-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/habidbesp%2Frest-api-node-typescript-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/habidbesp%2Frest-api-node-typescript-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/habidbesp%2Frest-api-node-typescript-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/habidbesp%2Frest-api-node-typescript-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/habidbesp","download_url":"https://codeload.github.com/habidbesp/rest-api-node-typescript-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/habidbesp%2Frest-api-node-typescript-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32508901,"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":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["dotenv","express","express-validator","jest-tests","nodejs","postgresql","render","restful-api","sequelize-orm","supertest","swagger","swagger-ui","typescript"],"created_at":"2024-12-20T19:19:28.964Z","updated_at":"2026-05-01T18:33:22.723Z","avatar_url":"https://github.com/habidbesp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API with Node.js, TypeScript \u0026 PostgreSQL\n\nThis project is a simple yet complete RESTful API built using **Node.js**, **TypeScript**, and **PostgreSQL**. It simulates an electronic product database for a fictional store, providing a single route for creating products. The API is designed with scalability in mind, includes testing with **Jest** and **Supertest**, and is fully documented using **Swagger**.\n\n## Project Links\n\n- [Live API with Swagger Documentation](https://rest-api-node-typescript-ke5s.onrender.com/docs)\n- [Frontend Demo](https://electronic-store-rho.vercel.app)\n- [Frontend Repository](https://github.com/habidbesp/Electronic-Products)\n\n## Features\n\n- **Express.js** server built with TypeScript.\n- **PostgreSQL** as the database for storing electronic products.\n- API endpoints to **create products** in the database.\n- **Swagger** documentation for easy API exploration.\n- **Jest** and **Supertest** tests for API endpoint validation.\n- Deployed and accessible via **Render**.\n\n### Example Endpoints:\n\n- GET /api/products: Retrieve all products in the store.\n- POST /api/products: Create a new product in the store.\n- PUT /api/products/:id: Update a product by its ID.\n- PATCH /api/products/:id: Update de property `\"availability\"`.\n- DELETE /api/products/:id: Delete a product by its ID.\n\nVisit the Swagger UI to explore and test all the endpoints interactively.\n\n## Installation (Optional)\n\n- Node.js (\u003e=16.x)\n- PostgreSQL\n\n  ### Steps\n\n1. Clone the repository:\n\n```bash\n  git clone https://github.com/habidbesp/rest-api-node-typescript-server.git\n\n  cd rest-api-node-typescript-server\n```\n\n2. Install dependencies:\n\n```bash\n  npm install\n```\n\n3. Create a `.env` file in the root directory with the following variable (adjust as needed for your environment):\n\n```env\n  DATABASE_URL=your_postgresql_database_url\n```\n\n4. Run the development server:\n\n```bash\n  npm run dev\n```\n\nThis will start the server with Nodemon, and the API will be available at http://localhost:4000.\n\n## API Documentation\n\n- The API is fully documented using `Swagger`. You can access the documentation by navigating to:\n\n  ```bash\n    http://localhost:4000/docs\n  ```\n\n  This will open the Swagger UI, where you can explore the available endpoints.\n\n## Testing\n\nTo run tests with Jest and Supertest:\n\n```bash\nnpm run test\n```\n\nTo run tests with coverage:\n\n```bash\nnpm run test:coverage\n```\n\nThis will execute the tests and provide a detailed coverage report.\n\n## Technologies Used\n\n- **Node.js** and Express for the server.\n- **TypeScript** for type safety and development efficiency.\n- **PostgreSQL** as the database.\n- **Sequelize ORM** for interacting with the database.\n- **Swagger** UI and Swagger JSDoc for API documentation.\n- **Jest** and **Supertest** for testing.\n- **dotenv** for environment variable management.\n\n## Future Plans\n\nA frontend application for this API is currently in development using React and TypeScript. The frontend will provide a user-friendly interface to interact with the product data and enhance the functionality of this server. Stay tuned for updates!\n\n## License\n\nThis project is licensed under the ISC License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhabidbesp%2Frest-api-node-typescript-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhabidbesp%2Frest-api-node-typescript-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhabidbesp%2Frest-api-node-typescript-server/lists"}