{"id":25478630,"url":"https://github.com/poomcha/bringit","last_synced_at":"2025-11-06T12:30:28.612Z","repository":{"id":225908455,"uuid":"766930121","full_name":"Poomcha/bringit","owner":"Poomcha","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-30T20:15:26.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-31T19:30:56.130Z","etag":null,"topics":[],"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/Poomcha.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":"2024-03-04T11:55:03.000Z","updated_at":"2024-05-30T20:15:30.000Z","dependencies_parsed_at":"2024-05-30T18:57:15.782Z","dependency_job_id":"4d5133db-091f-4b23-9874-7114ddd06a29","html_url":"https://github.com/Poomcha/bringit","commit_stats":null,"previous_names":["poomcha/bringit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Poomcha%2Fbringit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Poomcha%2Fbringit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Poomcha%2Fbringit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Poomcha%2Fbringit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Poomcha","download_url":"https://codeload.github.com/Poomcha/bringit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239493707,"owners_count":19647995,"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":[],"created_at":"2025-02-18T14:53:24.760Z","updated_at":"2025-11-06T12:30:28.268Z","avatar_url":"https://github.com/Poomcha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BringIt!\n## Video Demo:  https://youtu.be/gOjZlnKX3NE\n### Description:\nBringIt! is a website to create colaborative lists.\n\nIt handles creation of an user and login, creation of an user profile, creation of lists and items.\n\nBasically, a user create a list for a birthday for example, in this list he added all participants and created items he wants them to bring.  \nOn their view of the application, participants can choose which item they want to bring to the event.\n\n### Important Files:\n- **/app/\\_\\_init\\_\\_.py**  \nLoad the app, initialize the db and register all blueprints.  \nI chose to use blueprints by reading Flask documentation because I have much more function than in classes projects, so it's better organized and maintainable.\n\n- **/app/schema.sql**  \nContain the structure of the app database.  \n    * **users:**  \n    Each user have an id, an email and a password associate to him, separated from the user infos.  \n    * **users__users:**  \n    This table is used to track relationship between users.  \n    sender_id and receiver_id are users id, and the relationship is the status, depending if users have accepted each other or rejected for example.\n    * **infos:**  \n    Contains all informations about the user, for example his lastname or profile picture url.  \n    Related to each user by his unique user id.\n    * **lists:**  \n    All informations about a list excluding users and items related which will be added later.\n    * **items:**  \n    All informations about an item, same as list.\n    * **lists_items:**  \n    This table is used to store list / item association.  \n    * **lists_users:**  \n    Store lists / users association, and also the right of the user on the list associated to him, essentially if he's the creator of the list or not.\n    * **items_users:**  \n    Store items / users association, used to store who subscribe to any item. \n\n- **/app/db.py**  \nThis file contains useful functions to interact with the database that are used all over the app, get_db() connect to the database and return database object used to perform operation on it.  \nclose_db() just simply close the database connection once it's not needed anymore.\nAnd init_db() is used to execute schema.sql in order to create the database. It's used by init_db_command() that allow the admin to create the database with a Flask command in terminal.\n\n- **/app/models/*.py**  \nDefine all data models useful to the app with ***marshmallow*** module to simplify creation and validation of datas.  \nEach file contain a class with the name of a table, and class \"TableSchema\" inheriting from marshmallow Schema classes, which implements the different data of each table, with a basic validation associated to it.  \nEach models are imported and used in corresponding blueprints files to structure and validate incoming datas.\n\n\n- **/app/helpers/handle_image.py**  \nFunctions to handles image files upload on an external service, imgbb.com.  \nupload_image(image) convert image in paramater (FileStorage object) to a stream and then it is uploaded by a post request to imgbb which will store the image for us and give us back multiple URLs (3 for different image sizing, and one for deleting the image). These URLs are then returned by the function, and store on the database on each blueprint files.  \nThe 3 delete_image functions are very useful to quickly handle delete of an image when a list or item is modified or deleted for example.  \n\n\n- **/app/auth.py**  \nBlueprint of the authentification functionnality.  \nDefine the functions to signup, signin and logout users.  \nLoad user's infos in a special g object accessible on each requests.  \nAlso define useful decorators (login_required and login_prohibited) which will be used all over to restrict use of functions, if user is logged in or not.  \n\n- **/app/profile.py**  \nBlueprint to handle CRUD operations on user profile.  \nAllow user to create and modify his profile, update his password and delete his account.\n\n- **/app/lists.py**  \nBlueprint to handle CRUD operations on lists AND items because they are submitted simulteanously from the same form on the same endpoint.  \nAllow user to create, modify, read and delete lists. \n\n- **/app/item.py**  \nBlueprint for user to subscribe/unsubscribe to items.\n\n- **/app/bringers.py**  \nBlueprint to handle relationship between users.  \nBy design users can only add others by their usernames, discord like. So you have to give someone your username in the first place to be added. I think it's better for privacy and against spamming.  \n\n\n- **/app/templates/*.jinja**  \nContains multiple templates for each pages.\nTrying to be the most reusable possible.\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoomcha%2Fbringit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoomcha%2Fbringit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoomcha%2Fbringit/lists"}