The Food-Recipes-Backend project is an API built using the Express.js framework to manage users, recipes, and categories data in an application. This API provides various key features including CRUD (Create, Read, Update, Delete) operations, sorting, searching, and pagination to efficiently manage data. The project also utilizes environment variable management (env) and comes with a Postman collection for API testing. PostgreSQL is used as the database for this project.
- Visual Studio Code
- NodeJS
- ExpressJS
- PostgreSQL for database (this is what i use)
- Multer and Cloadinary for photo
- Postman for testing API
- Node JS
- Express JS
- Nodemailer Package
- Cloudinary
- Morgan Package
- DotEnv Package
- JWT Package
- UUID Package
- Multer Package
- Argon2 Package
- Mime Types Package
- Clone Repository: Clone this repository to your local system.
git clone https://github.com/rikiprimus/BE-Recipes.git
- Install Dependencies: install all required dependencies and add 'dev' to the script section to use nodemon.
npm install
"scripts": {
"dev": "nodemon index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
- Environment Configuration: Set the necessary environment variables in the
.env
file to set the application settings.
DB_HOST=
DB_USER=
DB_NAME=
DB_PASSWORD=
DB_PORT=
JWT_KEY=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
- Run Server: Start the server with command.
npm run dev
- Test API: First, you need to import collections to Postman to test and explore the API.
- CRUD Operations: Allows users to create, read, update, and delete entities within the system.
- Authorization and Authentication: Validate the registered account.
- Upload File Photo: Upload photo files to cloadinary and save the link to the database.
- Sort: Provides options to sort data based on specific criteria, such as name, date, or price.
- Search: Enables users to search for data based on specific search criteria, with support for partial text search.
- Pagination: Divides search results or data into separate pages to improve performance and the user experience.
- Env Management: Utilizes environment variables to configure the application, such as database connections or other global settings.
- Postman Collection: Includes a Postman collection containing API requests that can be used to test and document the API.
- '/' GET
- '/' POST
- '/:id' DELETE : use 'id' for find data, then delete
- '/:id' UPDATE : use 'id' for find data, then update
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (git checkout -b your/branch)
- Commit your Changes (git commit -m 'Add some features')
- Push to the Branch (git push origin feature/yourbranch)
- Open a Pull Request
Contributors names and contact info
- AUTHOR
- Ricky Primus Saputra @RickyPrimusSaputra