{"id":22672196,"url":"https://github.com/jimlynchcodes/waf-repo","last_synced_at":"2025-03-29T11:24:52.383Z","repository":{"id":43531113,"uuid":"241526200","full_name":"JimLynchCodes/WaF-Repo","owner":"JimLynchCodes","description":"Mono-repo for the With-A-Friend App.","archived":false,"fork":false,"pushed_at":"2023-01-24T01:27:31.000Z","size":14325,"stargazers_count":1,"open_issues_count":58,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T11:55:07.302Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JimLynchCodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-19T03:44:55.000Z","updated_at":"2020-04-01T04:30:31.000Z","dependencies_parsed_at":"2023-02-13T09:01:19.586Z","dependency_job_id":null,"html_url":"https://github.com/JimLynchCodes/WaF-Repo","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/JimLynchCodes%2FWaF-Repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimLynchCodes%2FWaF-Repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimLynchCodes%2FWaF-Repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimLynchCodes%2FWaF-Repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JimLynchCodes","download_url":"https://codeload.github.com/JimLynchCodes/WaF-Repo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246176126,"owners_count":20735708,"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-09T16:18:17.854Z","updated_at":"2025-03-29T11:24:52.244Z","avatar_url":"https://github.com/JimLynchCodes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WaF-Repo\nMono-repo for the With-A-Friend App!\n\n## [Soon to be] Live Environments\n\n### Dev\n\n- frontend webapp: https://aws.123234.cloufront.io\n- socket server endpoint: https://aws.90534.cloufront.io\n- mongo cluster: mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster111111.mongodb.net/test?retryWrites=true\u0026w=majority\n\n### Staging\n\n- frontend webapp: https://aws.123234.cloufront.io\n- socket server endpoint: https://aws.90534.cloufront.io\n- mongo cluster: mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster2222222.mongodb.net/test?retryWrites=true\u0026w=majority\n\n### Production \n\n- frontend webapp: https://webapp.io\n- socket server endpoint: https://webappapi.net\n- mongo cluster: mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster333333.mongodb.net/test?retryWrites=true\u0026w=majority\n\n# Vision\nI think it is absolutely insane that I live in massive New York City yet I don't have a *good* way to make more friends here. \n\n_**WaF is a piece of software meant to connect people in real life.**_\n\nThere are some popular apps that already exist which try to do this, but to me none of them really cut it: \n\n- ____Facebook.com__ is just for family and people you already know._\n\n- ___Meetup.com__ turns out to be big group things where I'm not really engaged._\n\n- ___Dating apps__ are just about hooking up._\n\n\nWaF is different because WaF is about individuals who happen to exist in a similar place and time finding each other and becoming friends over common interests. \n\n\n# Concept Art\n\nInitial sketch drawings of the pages in the WaF app. \n\n\u003cimg src=\"./non-src-images/concept-art/WaF-Concept-Art.png\" /\u003e\n\n# Data\n\nFor each enrivonment, have 1 mongo \"database\" with three collections to hold users, listings, and conversations.\n\n\u003cimg src=\"./non-src-images/engineering-diagrams/mongo-layout-high-level.png\" /\u003e\n\n// TODO - describe each of the objects better- User, Listing, Message\n\n\n# Location\n\nThis app will be location-first (new buzzword?) meaning that the bulk of the application state will be dependent on location data. In this app, every user will have a location GeoJSON point (basically just two numbers: longitude and latitude), but specifically it's a regular JSON object with this  shape:\n\n```\n{\n    type: \"Point\",\n    coordinates: [0, 20]\n}\n```\n\n[Thanks to my good friends on reddit](https://www.reddit.com/r/mongodb/comments/f6oobg/how_to_query_for_users_within_a_certain_distance/) I'm thinking we can save a lat / long location point to each user and to each listing. When the user opens the app it then only fetches for listings that are \"near\" (within X meters of) the user:\n\n```\nConsider a collection places that has a 2dsphere index.\n\nThe following example returns documents that are at least 1000 meters from and at most 5000 meters from the specified GeoJSON point, sorted from nearest to farthest:\n\ndb.places.find(\n   {\n     location:\n       { $near :\n          {\n            $geometry: { type: \"Point\",  coordinates: [ -73.9667, 40.78 ] },\n            $minDistance: 1000,\n            $maxDistance: 5000\n          }\n       }\n   }\n)\n```\n^ see more about this [here](https://docs.mongodb.com/manual/reference/operator/query/near/#op._S_near).\n\n\n# Auth\n\nFor authentication we're using the good old auth0! Client-side code for the googel / facebook integrationg was inspired by [this nice repo](https://github.com/auth0-blog/gatsby-auth0).\n\nAuth0 on Jim's Gh, \"Single-page App\"\n\n- waf-dev\n- waf-staging\n- waf-production\n\n# Initial Sockets Architecture\n\nTo keep things realtime, most of the data transfer will happen via [socketIo](https://socket.io/docs/) events. Here's a diagram for the inial plan for the events for WaF app. \n_Note: the most up-to-date version of this is [here](https://docs.google.com/drawings/d/1oxLMYoFBzs7PLJfJP0kSswtDAGsNcgwF3tt53YYzvW4/edit?usp=sharing)- ask jim for permissions! :)_ \n\n\n\u003cimg src=\"./non-src-images/engineering-diagrams/WaF-App-SocketIO-Message-Structure.png\" /\u003e\n\n\n# Code\n\n## Front-End Code\n\nThe front-end code is a React webapp build with Gatsby (specifically, the awesome [TDD BDD template from Evaluates2](https://github.com/Evaluates2/Gatsby-Starter-TypeScript-Redux-TDD-BDD)).\n\n_Learn more about the frontend in the README in [waf-frontend-gatsby](https://github.com/JimLynchCodes/WaF-Repo/tree/master/waf-frontend-gatsby)!_\n\n## Back-End Code\n\nThe backend is a relatively simple [socket.io](https://socket.io/docs/) server that is just run with `node index.js`. \n\n_Learn more about the backend in the README in [waf-socket-server](https://github.com/JimLynchCodes/WaF-Repo/tree/master/waf-socket-server)!_\n\n\n# Release Plan\n\n// TODO 😅\n\nBasically, we need to set up three environments for dev, staging, and production. Then we can connect them to the CI / CD pipelines for the git branches dev, staging, and master (respectively).\n\n### Releases\n1. When features pass all the tests locally and looks good then the code is merged into dev and the ci pipeline deploys to the dev environment. \n\n2. If all good in the dev environment deployment, we merge the dev branch into staging and let the ci pipeline deploy to the staging environment.\n\n3. If all good in staging, we merge the staging code to the master branch and let the ci pipeline deploy to the production environment.\n\n_When deploying features from staging to production it's nice to leave git release tags as you go!_  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimlynchcodes%2Fwaf-repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimlynchcodes%2Fwaf-repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimlynchcodes%2Fwaf-repo/lists"}