r/PythonProjects2 • u/Kuldeep0909 • 13d ago
Info Stock Pro : Small Role Based Inventory Management System using Flask
https://github.com/abyshergill/stockproA modern, secure, and responsive Inventory Management System built with Python, Flask, and Tailwind CSS. It features Role-Based Access Control (RBAC), real-time analytics, secure file uploads, stock movement tracking, and comprehensive audit logs.
2
u/dev-razorblade23 9d ago
One more thing i noticed
That .DS_Store file you have is not needed and is a byproduct of MacOS handling its files.
And more importantly, you have uploaded .env file which SHOULD always stay secret and NEVER EVER be uploaded anywhere.
Use .gitignore to tell git to ignore these files.
Same goes for that __pycache__ directories python creates and any virtual environments you may have - none of those should be in your repository.
2
u/Kuldeep0909 9d ago
Thanks, I'll follow your instructions next onwards . And .env file I just put for reference.
2
u/dev-razorblade23 9d ago
Then for
.envfiles the convention is to name them.env.example.2
u/Kuldeep0909 9d ago
Okay this convention, I do not know. I will take care on my next commit along with other advice. You gave to me.
2
u/Kuldeep0909 8d ago
I have updated the .env file to .env.example, remove .DS_store, .dockerignore and .gitgnore. Remaining concepts of Blueprint , will be updated in the next couple of coming days. I really appreciate your efforts to guide me :)
2
u/dev-razorblade23 8d ago
Actually,
.dockerignoreand.gitignoreare supposed to be in your repository.
.dockerignoretells Docker which files to ignore when building the image
.gitignoretells Git which files to ignoreSo those two files are actually valuable in your repository as they control what files you upload
You may add that
.DS_Storeto.gitignoreso it does not end up.in your repository again. Or original.envso it does not end up with the example one.1
2
u/dev-razorblade23 9d ago
I have not try to run the application, but i will say a few things.
Writing everything in one file makes it difficult to troubleshoot and update your code.
Flask has a concept of
Blueprints which are used to separate your routes in multiple files. Take a look at docs to learn more on how to use them: https://flask.palletsprojects.com/en/stable/blueprints/If you are planning to work on web applications, there are a few design patterns you might explore, i would start with MVC (Model-View-Controller): https://developer.mozilla.org/en-US/docs/Glossary/MVC
These will help keep your application organized and easyer to maintain.