A cloud-based inventory management tool to easily manage, track and search products at one place.
NOTE: aaj kuch toofani karte hai
- Ensure you have Node.js installed. You can verify this by typing the following command in your terminal.
node --version
If you get a response as shown below, you do have it installed, otherwise you can download it from here.
v18.18.2
-
Fork the repository to create a copy of it on your GitHub account
-
Clone the forked repository by running the code below in your terminal
git clone https://github.com/[your-username]/inventory-management2.0.git
NB:
- Replace
[your-username]
with your GitHub username.- Also, if you changed the name of the repository, remember to change it in the url.
- Install project dependencies by running the following command in your terminal from the root directory of the project.
npm install
-
Setup a MongoDB database (you can use mongodb compass, mongodb shell or mongodb community server)
-
Take note of the
connection string
of the database.
# example
mongodb://localhost:27017/inventory-management
# or
mongodb+srv://localhost/inventory-management
# where `inventory-management` is the name of your database
- Create a
.env.local
file in the root directory of the project with the following environment variables.
JWT_SECRET=topSecret
MONGODB_URL=mongodb://localhost:27017/inventory-management
JWT_SECRET
is a string to be used for encrypting and decrypting JWT tokens.
MONGODB_URL
is theconnection string
for the database created earlier.
- Spin up the development server by running command below
npm run dev
- The application should start on
http://localhost:3000
.
You are all set to rock!
Contributions are what make the open source community an amazing place to learn new things, come up with innovate ideas and solutions to problems, and develop skills and abilities. Any contributions you make are greatly appreciated.
Feel free to open an issue to discuss it, or directly create a pull request with necessary changes.
-
Setup the project locally.
Head over to the Get Started if you are yet to do this.
-
Create a branch with a descriptive name highlighting the changes you intend to add.
- Supposing you want to add code of conduct file,
code-of-conduct
could be your branch name. You can create acode-of-conduct
branch by running the command below:
git checkout -b code-of-conduct
- Supposing you want to add code of conduct file,
-
Add the
code-of-conduct.md
file (or whatever changes you want to make). -
Add your changes to git.
git add .
- Commit your changes
git commit -m "Add code-of-conduct.md file"
- Push changes to your GitHub repository
If this is your first time pushing changes to your repository from your current branch (code-of-conduct
), run the following command:
git push --set-upstream origin code-of-conduct
else run the following in your terminal
git push
- Create a new Pull Request on GitHub.
- Switch to the main branch
git switch main
- Add a remote for the original repository (if you haven't already).
git remote add upstream https://github.com/codewithsonyy/inventory-management2.0.git
- Pull the latest data unto your local repository
git pull upstream main
- Push the new changes, if any, to your forked repository
git push origin main
- Repeat steps
2
-6
of the previous section
This project is inspired by YouTuber codewithharry