This repository contains the backend code for an application that handles orders and user authentication. Below are the details of the routes defined in the code:
- Clone this repository.
- Navigate to the project directory in your terminal.
- Run
npm install
to install the required dependencies. - Create a
.env
file and set the necessary environment variables.
Creates a new order.
Creates a new online order.
Verifies payment for an order. Requires authentication.
Retrieves the orders associated with the authenticated user. Requires authentication.
Retrieves details of a specific order by ID. Requires authentication.
Retrieves all orders. Requires authentication and admin authorization.
Processes an order by ID. Requires authentication and admin authorization.
Initiates the Google login process.
Handles the Google login callback and redirects to the frontend URL upon successful login.
Retrieves the profile of the authenticated user. Requires authentication.
Logs out the user.
Retrieves all users. Requires authentication and admin authorization.
Retrieves statistics for the application. Requires authentication and admin authorization.
- Make sure you have the required environment variables set in your
.env
file. - Run
npm start
to start the server. - Access the API routes using a tool like Postman or integrate them into your frontend application.
If you find any issues or would like to contribute, feel free to submit a pull request.