{"id":19092832,"url":"https://github.com/basedhound/chili-sauces_api","last_synced_at":"2026-04-14T05:33:40.019Z","repository":{"id":173925851,"uuid":"524766528","full_name":"basedhound/chili-sauces_api","owner":"basedhound","description":" RESTful API built with Node.js and Express, featuring authentication, MongoDB integration, and full CRUD operations. It includes robust security and validation measures for secure data handling.","archived":false,"fork":false,"pushed_at":"2024-08-06T10:07:01.000Z","size":9918,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T07:45:56.548Z","etag":null,"topics":["angular","api","bcrypt","crypto-js","dotenv","express","fullstack","helmet","jsonwebtoken","mongodb","mongoose","mongoose-unique-validator","multer","nodejs"],"latest_commit_sha":null,"homepage":"","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/basedhound.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":"2022-08-14T19:54:11.000Z","updated_at":"2024-08-06T10:07:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2a1b428-cf60-48ed-beeb-dcf4e74d39ec","html_url":"https://github.com/basedhound/chili-sauces_api","commit_stats":null,"previous_names":["basedhound/api_hot-takes_crud","basedhound/chili-sauce_api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/basedhound/chili-sauces_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedhound%2Fchili-sauces_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedhound%2Fchili-sauces_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedhound%2Fchili-sauces_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedhound%2Fchili-sauces_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basedhound","download_url":"https://codeload.github.com/basedhound/chili-sauces_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedhound%2Fchili-sauces_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31784253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"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":["angular","api","bcrypt","crypto-js","dotenv","express","fullstack","helmet","jsonwebtoken","mongodb","mongoose","mongoose-unique-validator","multer","nodejs"],"created_at":"2024-11-09T03:22:16.994Z","updated_at":"2026-04-14T05:33:39.989Z","avatar_url":"https://github.com/basedhound.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"\" target=\"_blank\"\u003e\n      \u003cimg src=\"/.docs/preview/preview.png\" alt=\"Project Banner\"\u003e\n    \u003c/a\u003e\n  \u003ch3 align=\"center\"\u003eChili Sauces\u003c/h3\u003e\n  \u003ch4 align=\"center\"\u003eSchool Project\u003c/h4\u003e\n\u003c/div\u003e\n\n## \u003cbr /\u003e 📋 \u003ca name=\"table\"\u003eTable of Contents\u003c/a\u003e\n\n- ✨ [Introduction](#introduction)\n- ⚙️ [Tech Stack](#tech-stack)\n- 📝 [Features](#features)\n- 🚀 [Quick Start](#quick-start)\n\n## \u003cbr /\u003e \u003ca name=\"introduction\"\u003e✨ Introduction\u003c/a\u003e\n\n**[EN]** This project focuses on building a RESTful API using Node.js and Express for a school assignment at OpenClassrooms. The API features robust authentication, database integration with MongoDB, and full CRUD operations. Security tools include Bcrypt, Crypto-js, Helmet, Jsonwebtoken, and Password-validator, along with Mongoose, Dotenv, Multer, Mongoose-unique-validator, and Validator. The API integrates seamlessly with the provided Angular frontend, demonstrating essential web development and security skills. For more information, see the [docs](/.docs) folder.\n\n**[FR]** Ce projet se concentre sur la création d'une API RESTful en utilisant Node.js et Express pour un examen OpenClassrooms. L'API comprend une authentification robuste, une intégration de base de données avec MongoDB, et des opérations CRUD complètes. Les outils de sécurité incluent Bcrypt, Crypto-js, Helmet, Jsonwebtoken, et Password-validator, ainsi que Mongoose, Dotenv, Multer, Mongoose-unique-validator, et Validator. L'API s'intègre parfaitement avec le frontend Angular fourni, démontrant des compétences essentielles en développement web et en sécurité. Pour plus d'informations, consultez le dossier [docs](/.docs).\n\n## \u003cbr /\u003e \u003ca name=\"tech-stack\"\u003e⚙️ Tech Stack\u003c/a\u003e\n\n- [**Angular**](https://v17.angular.io/docs) is a comprehensive framework for building web applications that can range from single-page applications (SPAs) to multi-page applications (MPAs). Developed by Google, Angular provides a powerful set of tools for building dynamic, scalable, and maintainable applications. It features robust client-side routing, two-way data binding, and a modular architecture that supports component-based development. Angular also supports server-side rendering through Angular Universal, enhancing performance and SEO. Its capabilities make it suitable for a wide range of web application scenarios beyond just SPAs.\n\n- [**Node.js**](https://nodejs.org/en/learn/getting-started/introduction-to-nodejs) is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to execute JavaScript on the server side, enabling the creation of scalable and high-performance applications. Node.js's non-blocking, event-driven architecture makes it particularly suitable for building real-time, data-intensive applications.\n\n- [**Express**](https://expressjs.com/en/starter/installing.html) is a minimal and flexible Node.js web application framework that provides a robust set of features for building web and mobile applications. It simplifies the process of creating RESTful APIs by providing a thin layer of fundamental web application features, including routing, middleware support, and HTTP utilities.\n\n- [**NPM**](https://nodejs.org/en/learn/getting-started/an-introduction-to-the-npm-package-manager) (Node Package Manager) is the default package manager for Node.js. It allows developers to install, share, and manage dependencies in their projects. NPM provides access to a vast repository of open-source packages, facilitating the rapid development and integration of new features.\n\n- [**REST API**](https://blog.postman.com/rest-api-examples/) (Representational State Transfer Application Programming Interface) is a specific type of API that adheres to the principles of REST, an architectural style for designing networked applications. REST APIs use standard HTTP methods (GET, POST, PUT, DELETE) to interact with resources, which are typically represented in JSON or XML format. REST APIs are stateless, meaning each request from a client to the server must contain all the information needed to understand and process the request. This approach simplifies the interactions between client and server and ensures scalability and performance.\n\n- [**MongoDB**](https://www.mongodb.com/docs/atlas/getting-started/) is a NoSQL database that stores data in flexible, JSON-like documents. It is designed for scalability and high performance, making it suitable for applications that handle large volumes of data. MongoDB's document model allows for easy data manipulation and querying, providing a more natural way to work with data compared to traditional relational databases.\n\n- [**Mongoose**](https://mongoosejs.com/docs/guide.html) is an Object Data Modeling (ODM) library for MongoDB and Node.js. It provides a schema-based solution to model application data, ensuring data consistency and providing powerful tools for querying and validation. Mongoose simplifies the process of interacting with MongoDB by providing a higher abstraction layer.\n\n- [**Bcrypt**](https://www.npmjs.com/package/bcrypt) is a library for hashing passwords in a secure manner. It uses a salt to protect against rainbow table attacks and employs a computationally intensive hashing algorithm, making brute-force attacks impractical. Bcrypt ensures that passwords are stored securely, enhancing the overall security of an application.\n\n- [**Crypto-js**](https://www.npmjs.com/package/crypto-js) is a cryptography library in JavaScript that provides various cryptographic algorithms, such as hashing, encryption, and decryption. It is used to secure data, ensuring its integrity and confidentiality. Crypto-js is commonly used for encrypting sensitive information before storing or transmitting it.\n\n- [**Dotenv**](https://www.npmjs.com/package/dotenv) is a module that loads environment variables from a .env file into process.env. This practice helps manage configuration and secrets in Node.js applications, keeping them out of the source code and making it easier to change settings without modifying the application code.\n\n- [**Helmet**](https://www.npmjs.com/package/helmet) is a middleware for Express applications that helps secure apps by setting various HTTP headers. It mitigates common web vulnerabilities such as cross-site scripting (XSS), clickjacking, and other web attacks by configuring appropriate security-related HTTP headers.\n\n- [**Jsonwebtoken**](https://www.npmjs.com/package/jsonwebtoken) (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. It is commonly used for authentication and information exchange in web applications, allowing secure and verifiable transfer of information. JWTs are often used for implementing stateless authentication mechanisms.\n\n- [**Mongoose-unique-validator**](https://www.npmjs.com/package/mongoose-unique-validator) is a plugin for Mongoose that adds pre-save validation for unique fields within a Mongoose schema. It simplifies the enforcement of uniqueness constraints in MongoDB documents, ensuring that certain fields, such as usernames or email addresses, remain unique.\n\n- [**Multer**](https://www.npmjs.com/package/multer) is a middleware for handling multipart/form-data, which is primarily used for uploading files. It simplifies the process of handling file uploads in an Express application by providing various options for storage and file handling, making it easy to manage file uploads.\n\n- [**Password-validator**](https://www.npmjs.com/package/password-validator) is a library for validating password strength and compliance with defined rules. It helps enforce security policies by ensuring passwords meet specific criteria, such as length, complexity, and character variety. This enhances the security of user accounts by promoting the use of strong passwords.\n\n- [**Validator**](https://www.npmjs.com/package/validator) is a library for string validation and sanitization. It provides a set of functions for validating and sanitizing strings, helping ensure data integrity and security in web applications. Validator is commonly used for validating user input, ensuring that it meets the expected format and constraints.\n\n## \u003cbr/\u003e \u003ca name=\"features\"\u003e📝 Features\u003c/a\u003e\n\n👉 RESTful API Development: The project includes a robust RESTful API built with Node.js and Express. It supports standard HTTP methods (GET, POST, PUT, DELETE) for interacting with resources, enabling seamless CRUD operations.\n\n👉 Secure Data Storage: Data is securely stored using MongoDB with Mongoose. Passwords are hashed with Bcrypt, and sensitive information is encrypted using Crypto-js, ensuring data protection and confidentiality.\n\n👉 Compliance and Data Protection: The project implements a logical data model that adheres to regulatory standards. Data is validated and sanitized to meet security and compliance requirements.\n\n👉 Authentication and Authorization: Secure authentication is handled through Jsonwebtoken (JWT), providing a robust mechanism for verifying user identity and managing access to resources.\n\n👉 Enhanced Security Measures: The application uses Helmet to set security-focused HTTP headers, protecting against common web vulnerabilities. File uploads are managed securely with Multer.\n\n👉 Environment Management: Configuration and sensitive information are managed using Dotenv, keeping environment variables and secrets out of the source code.\n\n👉 Unique Data Validation: Ensures uniqueness of data fields using Mongoose-unique-validator, preventing duplicate entries in the database.\n\n👉 Integration with Angular Frontend: The backend API integrates smoothly with the provided Angular frontend, facilitating dynamic and interactive user experiences.\n\n👉 Comprehensive Error Handling: Implements thorough error handling and logging mechanisms to track and resolve issues effectively.\n\n👉 Testing and Validation: Includes testing processes to ensure the reliability and correctness of the API functionality.\n\n## \u003cbr /\u003e \u003ca name=\"quick-start\"\u003e🚀 Quick Start\u003c/a\u003e\n\nFollow these steps to set up the project locally on your machine.\n\n\u003cbr/\u003e**Prerequisites**\n\nMake sure you have the following installed on your machine:\n\n- [Git](https://git-scm.com/)\n- [Node.js](https://nodejs.org/en)\n- [npm](https://www.npmjs.com/) (Node Package Manager)\n\nInstall nodemon globally on your machine, open your terminal and run the following command:\n```bash\nnpm install -g nodemon\n```\n\n- **Nodemon** is a tool that helps develop Node.js based applications by automatically restarting the node application when file changes in the directory are detected.\n\n\u003cbr/\u003e**Cloning the Repository**\n\n```bash\ngit clone {git remote URL}\n```\n\n\u003cbr/\u003e**Installation**\n\nLet's install the project dependencies for both the client and server, from your terminal, run:\n\n```bash\n# Navigate to the client directory\ncd client\n\n# Install the necessary dependencies for the client-side application\nnpm install\n# or\nyarn install\n\n# Navigate back to the root directory\ncd ..\n\n# Navigate to the server directory\ncd server\n\n# Install the necessary dependencies for the server-side application\nnpm install\n# or\nyarn install\n```\n\nIf you encounter any issues while installing the client dependencies, please refer to the [help file](/.docs/04%20How%20to%20fix%20front%20repo.pdf).\n\n\u003cbr/\u003e**Set Up Environment Variables**\n\nCreate a new file named `.env` inside the server folder and add the following content:\n\n```env\n# MongoDB: https://cloud.mongodb.com\nDB_USERNAME=\nDB_PASSWORD=\nDB_CLUSTER=\nDATABASE=\n\n# Json-Web-Token: https://jwt.io\nJWT_KEY=\n(Generate new key)\n\n# Crypto-JS: https://cryptojs.gitbook.io\nCRYPTOJS_KEY=\n(Generate new key)\n```\n\nReplace the placeholder values with your actual respective account credentials:\n\n- [MongoDB](https://cloud.mongodb.com)\n\n\u003cbr/\u003e**Running the Project**\n\nInstallation will take a minute or two, but once that's done, you should be able to run the following command:\n\n```bash\n# Navigate to the client directory\ncd client\n\n# Start client\nnpm start\n# or\nyarn start\n\n# Navigate back to the root directory\ncd ..\n\n# Navigate to the server directory\ncd server\n\n# Start server\nnpm start\n# or\nyarn start\n```\n\n- Client running on [`http://localhost:4200`](http://localhost:4200)\n- Server running on [`http://localhost:3000`](http://localhost:3000)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasedhound%2Fchili-sauces_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasedhound%2Fchili-sauces_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasedhound%2Fchili-sauces_api/lists"}