{"id":23312373,"url":"https://github.com/vikasutf8/openflow-contribution","last_synced_at":"2025-04-07T02:29:29.121Z","repository":{"id":267298624,"uuid":"900811776","full_name":"vikasutf8/OpenFlow-Contribution","owner":"vikasutf8","description":"We'll leverage the latest Next.js for the frontend and Appwrite as our backend-as-a-service to manage user authentication and database operations.","archived":false,"fork":false,"pushed_at":"2024-12-21T07:18:29.000Z","size":561,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T07:36:39.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/vikasutf8.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-12-09T14:13:16.000Z","updated_at":"2024-12-21T07:18:32.000Z","dependencies_parsed_at":"2025-02-13T07:43:56.167Z","dependency_job_id":null,"html_url":"https://github.com/vikasutf8/OpenFlow-Contribution","commit_stats":null,"previous_names":["vikasutf8/openflow-contribution"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasutf8%2FOpenFlow-Contribution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasutf8%2FOpenFlow-Contribution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasutf8%2FOpenFlow-Contribution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasutf8%2FOpenFlow-Contribution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikasutf8","download_url":"https://codeload.github.com/vikasutf8/OpenFlow-Contribution/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247581138,"owners_count":20961718,"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-12-20T14:28:55.178Z","updated_at":"2025-04-07T02:29:29.100Z","avatar_url":"https://github.com/vikasutf8.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Openflow Contribution\nA new project ,including setting up the project directory, environment variables, and API keys. I demonstrates using Nextjs, TypeScript and Tailwind CSS, and explains configuring the Appwrite SDK for both client and server environments as Backend as a service.\n\n### Technology utilization :\n- Next.js(Client|Server side)\n- TypeScript\n- Tailwind CSS (Magic UI|Aceternity UI|Markdown githut)\n- Appwrite SDK (node Sdk)\n- Zustand (state Management)\n\n### Modeling/Collection Database \n\n\n### Functionality as StackOver-Flow \n- Question post(text/image)\n- Solution post(text/image)\n- Vote|Comment on question|solution\n- Authentication\n-- \n\n## Zustand(State Management Liberay):\n- [ ] why i use this middlewaare : as dbsetup or storageConfiguration done there so where we fireup them. as nextjs middleware is good options__ middleware just like puttting any things and when u need, where u need, use them in as routing,controller etc.\n- configuring Zustand with immer for easy state updates and persistent storage to retain state across sessions. \n- It also explains how to create a store, define interfaces, and implement methods like login, create account, and logout. \n- The use of middleware in Next.js is highlighted for initializing the database and storage setup.\n**In Statement management never change state instead always creating new states so we have list of states:**\n\n1. IMMER -- liberay make stuff easier ,under the hood always its creating new states ,it should presistent state \n2. PERSISTEN STORE DATA --it allow to store presistencly state in our local storage\n3. OnRehydrateStore --This option enables you to pass a listener function that will be called when the storage is **hydrated.**\n4. **Hydrated -- we stored data in local storage and to comming in that local storage to my state is hydration**\n[Adding Link ::https://zustand-demo.pmnd.rs/]\n-- \n## Appwrite :\n- creating collections : as sdk node server connection a\nconst result = await databases.**createCollection( '\u003cDATABASE_ID\u003e', **// **databaseId '\u003cCOLLECTION_ID\u003e'**, // collectionId '',** // name [\"read(\"any\")\"],**//permissions (optional) false, // documentSecurity (optional) false // enabled (optional) );\n\nthey give two type of Users as **any and usey**\n\n- creating attribute :\n- creating indexing : as sdk node server connections\n\n  ## Typical Part : \n  ### Controllers :- votes ,question\n--what was major idea of using appwrite backend as Service::all data manuplication done by appwrite, we just sending data/ doc ,filter ,query ,pagenate them etc.\n\nBUT in Operflow project :eeryting has multiple tocuhes collection of db eg: any post a question and we might want to increase user reputation,sometime answer was post we just want to see how much upvote/downvote are present as such increaing reputation on upvote and vic-versa.\n\n#### so best way to handing multiple touches of servers :handling with own custom servers,promises and so appwrite that do as MAGIC.\nprefereences  :: key -value \n\n                       reputation --  0\n\n[answer a question++ , upvote++ ,delete-- ,] couple test\n\n++/-- upvote as \u003c and \u003e button as like as ....working \n\n### Handing by Custom Apis :\npromise request @node-sdk appwrite \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikasutf8%2Fopenflow-contribution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikasutf8%2Fopenflow-contribution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikasutf8%2Fopenflow-contribution/lists"}