{"id":18011335,"url":"https://github.com/mhmzdev/full-stack-flutter-app","last_synced_at":"2025-03-26T15:32:47.236Z","repository":{"id":100129762,"uuid":"583722780","full_name":"mhmzdev/full-stack-flutter-app","owner":"mhmzdev","description":"Minimal flutter application with dart_frog as backend","archived":false,"fork":false,"pushed_at":"2024-04-01T13:02:09.000Z","size":13382,"stargazers_count":33,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T02:02:39.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhmzdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-12-30T17:39:16.000Z","updated_at":"2025-03-06T15:19:37.000Z","dependencies_parsed_at":"2024-10-30T03:51:16.316Z","dependency_job_id":null,"html_url":"https://github.com/mhmzdev/full-stack-flutter-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhmzdev%2Ffull-stack-flutter-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhmzdev%2Ffull-stack-flutter-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhmzdev%2Ffull-stack-flutter-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhmzdev%2Ffull-stack-flutter-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhmzdev","download_url":"https://codeload.github.com/mhmzdev/full-stack-flutter-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245681567,"owners_count":20655219,"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":"2024-10-30T03:09:32.530Z","updated_at":"2025-03-26T15:32:44.415Z","avatar_url":"https://github.com/mhmzdev.png","language":"Dart","readme":"### Full Stack Social Media App (in-progress)\nTrying to develop full-stack flutter application with `dart_frog` as backend\n\n- client/\n    - it's the flutter app\n- server/\n    - it's the `dart` server\n    - packages/db\n        - it's the package talking to the `postgres`\n    - packages/shared\n        - it's the shared code base among server and client, the purpose of using dart as backend and flutter on front-end is justified here.\n\n### 🎨 Design\nInspiration --\u003e https://dribbble.com/shots/18340567-Sosmad-Social-Media-App\n\nFigma Design --\u003e https://www.figma.com/file/83dXk35avf0BTHtYPWeyl7/Flutteram-Social-App\n\n\n### 👀 Look'n Feel (Underdevelopment)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/43790152/223090428-5741a54a-8857-43ab-9d0f-be46f5ceafdc.png\" height=\"530px\"\u003e \u003cimg src=\"https://user-images.githubusercontent.com/43790152/223090690-02b72209-a151-47d3-a91e-1d2806e26575.png\" height=\"530px\"\u003e \u003cimg src=\"https://user-images.githubusercontent.com/43790152/223090967-1c5d4dfb-84ed-42e0-8dad-eae1ed059f73.png\" height=\"530px\"\u003e \u003cimg src=\"https://user-images.githubusercontent.com/43790152/223091114-1ff21c00-3989-4395-aed5-d61222683a2a.png\" height=\"530px\"\u003e\n\n### 🧰 Developer Setup\nThis project is running on local environment because I'm just learning and playing with it. Hence, you might need to setup some stuff other than flutter/dart to get it up and running.\n\n### 🐟 Docker Setup\nDon't delete the file `server/docket-compose.yaml` ;p and don't worry about it if you don't know about what is docker and how it works. I didn't knew it either, so cheer up! 😁\n\nStep 1: Install docker\n\nStep 2: Fire up the docker app once its installed\n\nStep 3: Run the comment in `server/`\n```\ndocker-compose up -d\n```\nYou should see the following outputs that shows your database has been created and ready to use!\n\n```\nhamza@M1-Max server % docker-compose up -d\n[+] Running 15/1\n ✔ postgres 14 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                   76.5s \n[+] Running 1/3\n ⠦ Network server_default        Created                                                                                                                                         0.5s \n ⠴ Volume \"server_postgres\"      Created                                                                                                                                         0.5s \n ✔ Container postgres_container  Started  \n```\n\nJust to verify, try:\n```\ndocker container ls\n\nCONTAINER ID   IMAGE      COMMAND                  CREATED              STATUS              PORTS                    NAMES\nf7dce227ee38   postgres   \"docker-entrypoint.s…\"   About a minute ago   Up About a minute   0.0.0.0:5432-\u003e5432/tcp   postgres_container\n```\n### 🐘 Postico/Postgres Admin setup\nNow we need a client for our DB management, postgres admin and postico are pretty famous for this purpose So,\n\nStep 1: Simply install Postico or Postgres Admin to manage your DB\n\nNOTE: Postico is available only for mac\n\nStep 2: Create a server and make sure `username` and `password` are same as in `server/routes/_middleware.dart`\n\nNOTE: Don't do this for production server, I've added a comment to pull these creds. from cloud or .env something. This is just for learning purposes\n\nStep 3: Click on `Test` once you have setup the creds to make sure you've everything working\n\nStep 4: `Connect` and we have our backend setup locally to play with `dart_frog` 🚀\n\n### 👨🏼‍💻 ORM (Stormberry)\nYou can use any ORM as per your preference, I'm just using `stormberry` because I was following flutter observeable series. So, its a dart package and it has pretty detailed documentation for everything you need.\n\nStep 1: Now we need connect our ORM to our DB and for that run the following and make sure you are in `db/` this time:\n```\nDB_SSL=false DB_SOCKET=false DB_PASSWORD=changeme dart run stormberry migrate\n```\nNow, enter the name of db which is \"postgres\" and keep pressing \"enter\" for default values and lastly, just press \"yes\" and onwards to create your tables in postgres SQL\n\n```\nBuilding package executable... (1.0s)\nBuilt stormberry:stormberry.\nSelect a database to update: postgres\nEnter the database host address: \nEnter the database port: \nEnter the database username: \nGetting schema changes of postgres\n=========================\n++ TABLE posts\n++ TABLE comments\n++ TABLE users\n++ TABLE stories\n=========================\nDo you want to apply these changes? (yes/no): yes\nDatabase schema changed, applying updates now:\n---\nCREATE TABLE IF NOT EXISTS \"posts\" (\n\"id\" serial NOT NULL,\"uid\" int8 NOT NULL,\"caption\" text NOT NULL,\"has_image\" boolean NULL,\"image_url\" text NULL,\"has_video\" boolean NULL,\"video_url\" text NULL,\"likes\" _int8 NOT NULL,\"comments\" _int8 NOT NULL,\"created_at\" timestamp NOT NULL\n)\n---\nCREATE TABLE IF NOT EXISTS \"comments\" (\n\"id\" serial NOT NULL,\"uid\" int8 NOT NULL,\"content\" text NOT NULL,\"created_at\" timestamp NOT NULL\n)\n---\nCREATE TABLE IF NOT EXISTS \"users\" (\n\"id\" serial NOT NULL,\"first_name\" text NOT NULL,\"followers\" _int8 NOT NULL,\"following\" _int8 NOT NULL,\"posts\" _int8 NOT NULL,\"stories\" _int8 NOT NULL,\"last_name\" text NOT NULL,\"username\" text NOT NULL,\"email\" text NOT NULL,\"password\" text NOT NULL,\"bio\" text NULL,\"birthday\" timestamp NULL,\"image_url\" text NOT NULL,\"cover_url\" text NOT NULL\n)\n---\nCREATE TABLE IF NOT EXISTS \"stories\" (\n\"id\" serial NOT NULL,\"uid\" int8 NOT NULL,\"has_image\" boolean NULL,\"image_url\" text NULL,\"has_video\" boolean NULL,\"video_url\" text NULL,\"created_at\" timestamp NOT NULL\n)\n---\nALTER TABLE \"posts\"\nADD PRIMARY KEY ( \"id\" )\n---\nALTER TABLE \"comments\"\nADD PRIMARY KEY ( \"id\" )\n---\nALTER TABLE \"users\"\nADD PRIMARY KEY ( \"id\" )\n---\nALTER TABLE \"stories\"\nADD PRIMARY KEY ( \"id\" )\n========================\n---\nDATABASE UPDATE SUCCESSFUL\n```\nAnd on refreshing postico/postgres admin.... 🥁🥁🥁🥁\n\nCongrats! The setup is completed and you are good to go. Keep playing, fix my bugs, open PRs and enjoy!\n\n## 🔑 License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details\n\n## 🧑 Author\n\n#### Muhammad Hamza\n[![LinkedIn Link](https://img.shields.io/badge/Connect-Hamza-blue.svg?logo=linkedin\u0026longCache=true\u0026style=social\u0026label=Connect\n)](https://www.linkedin.com/in/mhmzdev)\n\nYou can also follow my GitHub Profile to stay updated about my latest projects:\n\n[![GitHub Follow](https://img.shields.io/badge/Connect-Hamza-blue.svg?logo=Github\u0026longCache=true\u0026style=social\u0026label=Follow)](https://github.com/mhmzdev)\n\nIf you liked the repo then kindly support it by giving it a star ⭐!\n\nCopyright (c) 2024 MUHAMMAD HAMZA","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhmzdev%2Ffull-stack-flutter-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhmzdev%2Ffull-stack-flutter-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhmzdev%2Ffull-stack-flutter-app/lists"}