{"id":21153491,"url":"https://github.com/noblessecoder/ecommdb","last_synced_at":"2025-07-09T10:33:37.400Z","repository":{"id":67996658,"uuid":"87644247","full_name":"NoblesseCoder/EcommDB","owner":"NoblesseCoder","description":"E commerce-Database driven web application using Flask","archived":false,"fork":false,"pushed_at":"2020-10-01T16:29:53.000Z","size":5836,"stargazers_count":10,"open_issues_count":1,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-04T22:33:21.420Z","etag":null,"topics":["dbms","ecommerce","flask","flask-extensions","flask-sqlalchemy","postgresql","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NoblesseCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-08T15:35:46.000Z","updated_at":"2024-07-13T15:04:01.000Z","dependencies_parsed_at":"2023-06-04T19:45:14.927Z","dependency_job_id":null,"html_url":"https://github.com/NoblesseCoder/EcommDB","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NoblesseCoder/EcommDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoblesseCoder%2FEcommDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoblesseCoder%2FEcommDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoblesseCoder%2FEcommDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoblesseCoder%2FEcommDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoblesseCoder","download_url":"https://codeload.github.com/NoblesseCoder/EcommDB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoblesseCoder%2FEcommDB/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264440490,"owners_count":23608720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbms","ecommerce","flask","flask-extensions","flask-sqlalchemy","postgresql","python"],"created_at":"2024-11-20T10:56:29.936Z","updated_at":"2025-07-09T10:33:37.389Z","avatar_url":"https://github.com/NoblesseCoder.png","language":"Python","readme":"# EcommDB\nEcommDB is an E-commerce Database driven by a Flask(Python) based web application.\n\nEcommDB allows you to buy products online and make safe payments to the suppliers(also chose from different suppliers).You also have anoption of tracking down your order.(Security functionality is dummy in this project as for now.)\n\nI made this as a part of my DBMS mini-project where we were asked to build an application so as to demonstrate the interacion of a web-application with a relational database and to perform some basic CRUD operations on the database.\n\n### The database chosen in this project is postgresql.I have used flask-sqlalchemy(an ORM) on top of it.You would have to make some changes in code if you use a different ORM or database.\n\n\n## Installations required(Linux(Ubuntu) users)-\n\n    pip install Flask\n      or sudo pip install Flask\n    pip install Flask-Migrate\n    pip install psycopg2\n    pip install flask-sqlalchemy\n\nOther basic reqirements can be seen from the requirements.txt file.\n\n## Setting up postgresql\n\nOnce postgres is installed in the machine.\nlogin to postgres-\nsudo su postgres\nThen enter psql to enter psql prompt.\n\nFollow the following commands to set up a database with user access.\n\n    CREATE USER username with PASSWORD 'passwd';\n    CREATE DATABASE db_name;\n    GRANT ALL PRIVILEGES ON DATABASE db_name to username;\n\nThis will set up a database with a user and password for external applications to access the database.You will require the username,database name and the password to set up the flask app to querry from the database\n\n## File Structure-\n\n### 1.flask_app.py\nThis python file is the main app that starts the local host and thus the application itself.\n### 2.views.py\nThis python file contains the code for ruting of the app to different references and also rendering of HTML files.\nThis also contains the interactions with the database.\n\nThe code in views.py could be put in flask_app.py itself.\nI have done this split up for a better understanding of different functionalities.\n### 3.manager.py\nYou could call this as models.py.This file contains the classes of all the relational models of your database.\n### 4.migrations\nThis is a result of flask migrate.It is an extension that handles SQLAlchemy database migrations for Flask applications using Alembic. The database operations are made available through the Flask command-line interface or through the Flask-Script extension.\n\n#### Useful Commands-\n\n    python manager.py db init\n    python manager.py db migrate\n    python manager.py db upgrade\n\nThe app has to be configured to interact with the database before any further operations.You can configure it as follows-\n\napp.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://user:password@localhost/database_name'\n\n(1) adds migration folder to the repository.Track records of all the migrations are kept in this folder.\n(2)Generating initial migrations.\n(3)The third command is to apply the migration to the database.\n\nEach time the database models change repeat the migrate and upgrade commands.\n\n### 5.static\nThis folder contains all the static files like images and the css stylesheets.\n### 6.templates\nThis directory contains all the HTML files that need to be rendered.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoblessecoder%2Fecommdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoblessecoder%2Fecommdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoblessecoder%2Fecommdb/lists"}