{"id":24736540,"url":"https://github.com/phukon/citysort","last_synced_at":"2026-04-13T20:01:37.045Z","repository":{"id":206002053,"uuid":"712595184","full_name":"phukon/citysort","owner":"phukon","description":"A live index of the best cities🏙 to live and work in India.","archived":false,"fork":false,"pushed_at":"2024-02-05T01:32:31.000Z","size":1307,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T17:28:44.021Z","etag":null,"topics":["sqlite"],"latest_commit_sha":null,"homepage":"https://citysort.rkph.me","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/phukon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-10-31T19:31:01.000Z","updated_at":"2024-03-01T22:08:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0bb04d7-1222-4b53-a1f0-49e93362ff13","html_url":"https://github.com/phukon/citysort","commit_stats":null,"previous_names":["phukon/citysort"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/phukon/citysort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fcitysort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fcitysort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fcitysort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fcitysort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phukon","download_url":"https://codeload.github.com/phukon/citysort/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fcitysort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31768649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["sqlite"],"created_at":"2025-01-27T21:26:12.369Z","updated_at":"2026-04-13T20:01:37.008Z","avatar_url":"https://github.com/phukon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![pocketbase](https://img.shields.io/badge/PocketBase-B8DBE4?style=for-the-badge\u0026logo=PocketBase\u0026logoColor=white)\n![tailwindcss](https://img.shields.io/badge/Tailwind_CSS-38B2AC?style=for-the-badge\u0026logo=tailwind-css\u0026logoColor=white)\n![nginx](https://img.shields.io/badge/Nginx-009639?style=for-the-badge\u0026logo=nginx\u0026logoColor=white)\n![docker](https://img.shields.io/badge/Docker-2CA5E0?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n![vercel](https://img.shields.io/badge/Vercel-000000?style=for-the-badge\u0026logo=vercel\u0026logoColor=white)\n![aws](https://img.shields.io/badge/Amazon_AWS-FF9900?style=for-the-badge\u0026logo=amazonaws\u0026logoColor=white)\n\n\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eCitySort\u003c/h1\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n     A live index of the best cities to live and work in India, based on crowdsourced data.\n    \u003cbr /\u003e\n    \u003ca href=\"https://citysort.vercel.app\"\u003eWebsite\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/phukon/citysort/issues\"\u003eIssues\u003c/a\u003e\n  \u003c/p\u003e\n    \u003cimg src=\"https://github.com/phukon/citysort/assets/60285613/2b3f8f79-8845-49fe-85f5-8112ef06e637\" alt=\"b25464c1-41fb-464d-a44e-5dd70245b70b\"\u003e\n\u003c/p\u003e\n\n## How It Works\n\n### Infrastructure Configuration\nThe foundational structure commenced with the establishment of a Docker Pocketbase server encapsulated within a container. This containerized setup operated by forwarding its port to 8080 on the host system, thereby compartmentalizing services for streamlined management and resource optimization.\n\n\n![ctsd](https://github.com/phukon/citysort/assets/60285613/f06acefc-5f20-4cc7-9005-582a242f5522)\n\nNginx Reverse Proxy Setup:\nThe integration of an Nginx reverse proxy served as a pivotal layer facilitating efficient routing and secure communication between the frontend and backend systems.\n\n```bash\nserver {\n    server_name server.rikiphukon.com;\n\n    location / {\n        proxy_pass http://127.0.0.1:8080/;\n    }\n\n    location /admin {\n        proxy_pass http://127.0.0.1:8080/_/;\n    }\n\n    location ~ ^/api(/.*)$ {\n        proxy_pass http://127.0.0.1:8080/api$1;\n    }\n\n    location /server {\n        proxy_pass http://localhost:80;\n    }\n}\n```\n\nThis Nginx configuration efficiently directed requests based on URL paths, ensuring proper handling of diverse endpoints and locations for seamless communication between components.\n\n### SSL Certification\nSSL certificates were generated for the subdomain server1.rikiphukon.com.\n\n### Systemd Service Integration\nA systemd service was orchestrated for the container housing the Pocketbase server. This orchestration facilitated seamless management, auto-start capabilities, and monitoring of the Pocketbase server, ensuring its persistent availability and operational efficiency.\n\n---\n\nThe core objective of this project is to compile and organize crowdsourced data pertaining to various cities. This data is primarily derived from surveys, providing insights into diverse aspects of urban life. The project's database architecture comprises four key collections:\n\n- `citysort`: This collection encompasses fundamental city data, establishing a one-to-one relationship with entities within the city_json collection.\n\n- `city_json`: Housing detailed information about city attractions and weather, the city_json collection maintains a one-to-one relationship with the unique identifiers in the citysort entities.\n\n- `city_data_buffer`: Essential for managing survey data, this collection allows for multiple survey datasets associated with individual cities.\n\n- `survey_data`: A comprehensive aggregation of data sourced from the entirety of cities within the city_data_buffer.\n\n![fewwdwd](https://github.com/phukon/citysort/assets/60285613/78e9d840-9255-4ee9-b789-eada07733f3e)\n\n---\n\n### Interpreting Survey Data:\nWithin the `survey_data` collection, I devised an approach to compute and interpret 'No' values without storing them explicitly in the database. This method involves the storage of affirmative responses only, represented as \u003cb\u003e1\u003c/b\u003e for each \u003cb\u003e'Yes'\u003c/b\u003e response to a particular survey question within a city's entry.\n\n### Storage of Affirmative Responses\nEach 'Yes' response to a specific survey question within the `survey_data` entry for a city is logged as a numerical value of \u003cb\u003e1\u003c/b\u003e. These \u003cb\u003e1s\u003c/b\u003e are aggregated across various survey questions, forming the cumulative count of \u003cb\u003e'Yes'\u003c/b\u003e responses for that city.\n\n### Calculating No Responses\nTo derive the count of \u003cb\u003e'No'\u003c/b\u003e responses for a particular question within a specific city, the subtraction methodology comes into play. By subtracting the total count of  \u003cb\u003e'Yes'\u003c/b\u003e responses from the overall number of surveys conducted for that city, the remaining count represents the implicit  \u003cb\u003e'No'\u003c/b\u003e responses. This method allows for the determination of \u003cb\u003e'No'\u003c/b\u003e responses without explicitly storing them in the database.\n\n### Radar Overview Visualization:\nThe Radar visual representation based on the derived counts of \u003cb\u003e'Yes'\u003c/b\u003e and \u003cb\u003e'No'\u003c/b\u003e responses is generated by subtracting the \u003cb\u003e'Yes'\u003c/b\u003e count from the total number of surveys for a specific city, enabling a comparative analysis of affirmative and negative responses across different cities.\n\nCitySort operates as a crowdsourced platform where users can contribute their ratings, reviews, and opinions about various cities in India. The platform is designed to be intuitive and user-friendly, allowing visitors to explore different cities, view aggregated ratings, and read detailed reviews to gain a comprehensive understanding of each location. The data may initially be limited, but it's the collective input from the community that will enhance and enrich the platform.\n\n## Background\n\nThe inception of CitySort stemmed from a viral tweet that prompted followers to rate their cities based on various parameters. Witnessing the engaging conversations in the comment section, the idea emerged to create a platform dedicated to collecting and aggregating data about Indian cities. Recognizing the power of collective knowledge, this project thrives on community contributions, valuing the diverse opinions and experiences of individuals across the country.\n\nThe primary goal of CitySort is to create a comprehensive and informative resource that offers valuable insights into different cities in India. By harnessing the collective knowledge of residents, workers, and visitors, the platform aims to assist individuals in making informed decisions about where to live, work, or visit within India.\n\n## Getting Started\n\nTo start contributing and making changes in CitySort, please ensure your commits follow the Conventional Commits specification and understand the principles of Semantic Versioning for version control. Your adherence to these guidelines will help maintain consistency and clarity throughout the project's development cycle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphukon%2Fcitysort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphukon%2Fcitysort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphukon%2Fcitysort/lists"}