ππ This API is designed to simplify integration, offering a seamless pathway to building feature-rich e-commerce platforms. The user-friendly design ensures that developers can focus on crafting intuitive interfaces while relying on the API's robust backend functionalities. ππ
Follow the steps highlighted below to get the application running on your local computer
- Ensure you have
Nodewith version >=14 installed. - You have a text editor (preferably Vscode) installed on your computer
- MongoDB (if running locally)
- Postman (to test the APIs)
- Have a registered google account
- Clone the repository into your computer. Run command
git clone https://github.com/ismailtijani/E-Commerce-API.git - Open the project folder with your desire code editor
- Open a built in terminal
- Create a
.envenvironment variables (check .env.example file for details) - To install all dependencies used in the project, run
npm i - To ensure the project is open with rules specific by eslint used in this project, type in
npm run linton the terminal - Next, ensure the project files are rightly formatted by typing in
npm run format:check - Finally, to start the development server,
npm run dev - Redis needs to be up and running on your machine - (for windows user you can install Redis through wsl: windows system for linux, for Linux and Mac users just use the installer of your choice to install Redis and test to see if it's running on your machine) follow the link to get started with the installation https://redis.io/docs/getting-started/installation/
If everything went well, you should see the following printed on the terminal console <Server is running πππ on port 8000>
If you encounter any issues while doing any of the above commands, kindly see the sections below on the available scripts to find for little more insight.
If the issue persist, kindly contact Ismail => @ ismailtijani10@yahoo.com
- The application is responsible for creating new Admin and User
- Customer cannot create another user account
- [x]
POST β {{url}}/user/signup Example requestbody:
{
"firstName": "SOT",
"lastName": "Exmaple"
"email": "user@mail.com"
"phoneNumber": "08094706335",
"password": "example123"
}Example response body
{
"STATUS": "SUCCESS",
"MESSAGE": "Account created successfuly!",
}POST β {{url}}/user/login Example requestbody:
{
"email": "user@mail.com",
"password": "example123"
}Example response body
{
"STATUS": "SUCCESS",
"MESSAGE": "Authentication Code sent to ismailtijani10@yahoo.com ",
"DATA": "64d7c362c3ab032d8aa1fa36"
}- Clone repository
- Checkout an "all-time" branch using the following format <your name>-development (e.g git checkout -b sot-development)
NOTE: All Push and pull requests should be made toward the development branch.
Ensure to follow these steps when committing
- git add .
- npm run lint:fix
- git commit -m <message here>
- git pull origin development
- git push
- Go to github
- open a new Pull Request to development
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Builds the app for production to the build folder.
It correctly bundles Node in production mode and optimizes the build for the best performance.
Checks if files obeys all Eslint set rules properly
This script fixes all possible eslint errors in the project
Formats all files using prettier set rules at .prettierrc
Checks if all files are formatted properly