Welcome to the backend repository for Freshmate! This backend server is built using Node.js to provide the necessary APIs for the Freshmate ecommerce website frontend.
The Freshmate backend is designed to handle various functionalities required by the frontend application, including user authentication, product management, and order processing. It provides RESTful APIs that communicate with the frontend to ensure seamless interaction with the database and other services.
- User Authentication: Secure endpoints for user registration, login, and authentication.
- Product Management: CRUD operations for managing products and categories.
- Order Processing: APIs for creating, updating, and retrieving orders.
- Middleware Integration: Utilizes middleware for error handling, authentication, and request validation.
To run the Freshmate backend locally, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory in your terminal.
- Install dependencies by running
npm install
. - Create a
.env
file in the root directory of the project. - Add the following environment variables to the
.env
file: PORT=8000 MONGODB=<your_mongodb_connection_string> TOKEN_SECRET=<your_token_secret> Replace<your_mongodb_connection_string>
with your MongoDB connection string and<your_token_secret>
with a secret key for JWT token generation. - Start the server by running
npm run watch
. - The server will be running on port 8000 by default.
Once the backend server is running, it will be ready to handle requests from the Freshmate frontend application. Ensure that the frontend application is configured to communicate with the backend server (e.g., update API URLs).
The frontend for Freshmate is hosted in a separate repository. You can find it here.
Omar Ahmed |
Esraa Ahmed |
Salma Yousry |
Mostafa Fakhr |
Karim Mohamed |
Ahmed Adel |
This project is licensed under the MIT License.