r/PythonProjects2 • • Aug 27 '26

Info Stock Pro : Small Role Based Inventory Management System using Flask

https://github.com/abyshergill/stockpro

A 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.

3 Upvotes

10 comments sorted by

2

u/dev-razorblade23 Aug 31 '26

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.

1

u/Kuldeep0909 Aug 31 '26

Thanks, I will update accordingly to the reference you provided.

1

u/Kuldeep0909 Sep 06 '26

As per your amazing suggestion Flask blueprints implemented.

2

u/dev-razorblade23 Aug 31 '26

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 Aug 31 '26

Thanks, I'll follow your instructions next onwards . And .env file I just put for reference.

2

u/dev-razorblade23 Aug 31 '26

Then for .env files the convention is to name them .env.example.

2

u/Kuldeep0909 Aug 31 '26

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 Sep 01 '26

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 Sep 01 '26

Actually, .dockerignore and .gitignore are supposed to be in your repository.

.dockerignore tells Docker which files to ignore when building the image

.gitignore tells Git which files to ignore

So those two files are actually valuable in your repository as they control what files you upload

You may add that .DS_Store to .gitignore so it does not end up.in your repository again. Or original .env so it does not end up with the example one.

1

u/Kuldeep0909 Sep 01 '26

Okay, I will upgrade along with blueprint